Browse Source

Add permalink to info box.

scossu 2 weeks ago
parent
commit
0c2678aac4
4 changed files with 11 additions and 6 deletions
  1. 3 3
      doc/roadmap.md
  2. 6 3
      src/generator.lua
  3. 1 0
      templates/coll.html
  4. 1 0
      templates/dres.html

+ 3 - 3
doc/roadmap.md

@@ -88,9 +88,9 @@ usage and opportunities for expanding adoption in relevant areas.
 
 ## Post-release
 
-- ✖︎ Deposit via remote hot folder (addressed by separate FTP server)
-  - FTP
-  - S3
+- ✖︎ Deposit via remote hot folder
+  - FTP [Addressed by separate FTP server]
+  - S3 [Not a good choice - implementations such as MinIO mangle all files and an additional S3 pull is required to get the deposited files. Not efficient.]
 - Incremental build
 - Rebuild only site assets
 - Custom templating

+ 6 - 3
src/generator.lua

@@ -214,8 +214,9 @@ local function generate_coll(s, mconf)
         head_tpl = templates.head.data,
         header_tpl = templates.header.data,
         mconf = mconf,
-        uri = s,
+        uid = path.basename(s.data),
         members = members,
+        permalink = pkar.gen_pairtree("/res", s.data, ".html", true),
         tn_url = get_tn_url(s),
         pref_rep = {
             url = pref_rep_url,
@@ -345,7 +346,7 @@ local function generate_dres(s, mconf)
         head_tpl = templates.head.data,
         header_tpl = templates.header.data,
         mconf = mconf,
-        uri = s,
+        uid = path.basename(s.data),
         dmd = dmd,
         rel = rel,
         children = children,
@@ -358,6 +359,7 @@ local function generate_dres(s, mconf)
         icon_url = get_icon_url(mconf.lineage),
         breadcrumbs = get_breadcrumbs(mconf),
         rdf_href = pkar.gen_pairtree("/res", s.data, ".ttl", true),
+        permalink = pkar.gen_pairtree("/res", s.data, ".html", true),
     })
 
     local res_path = pkar.gen_pairtree(M.res_dir, s.data, ".html")
@@ -455,7 +457,7 @@ local function generate_ores(s, mconf)
         head_tpl = templates.head.data,
         header_tpl = templates.header.data,
         mconf = mconf,
-        uri = s,
+        uid = path.basename(s.data),
         techmd = techmd,
         rel = rel,
         ls_next = ls_next,
@@ -463,6 +465,7 @@ local function generate_ores(s, mconf)
         breadcrumbs = get_breadcrumbs(mconf),
         pres = pres,
         thumbnail = tn,
+        permalink = pkar.gen_pairtree("/res", s.data, ".html", true),
         rdf_href = pkar.gen_pairtree("/res", s.data, ".ttl", true),
     })
 

+ 1 - 0
templates/coll.html

@@ -18,6 +18,7 @@
                 </section>
                 <section class="column column-30 toolbox">
                     <h4>Tools</h4>
+                    <p>Unique ID: <a href="<%= permalink -%>"><%= uid -%></a></p>
                     <p><a href="<%= rdf_href %>">Download RDF document</a></p>
                     <p><a href="#">Download Laundry List [TODO]</a></p>
                 </section>

+ 1 - 0
templates/dres.html

@@ -22,6 +22,7 @@
                 </section>
                 <section class="column column-30 toolbox">
                     <h4>Tools</h4>
+                    <p>Unique ID: <a href="<%= permalink -%>"><%= uid -%></a></p>
                     <p><a href="<%= rdf_href %>">Download RDF document</a></p>
                     <p><a href="#">Download Laundry List [TODO]</a></p>
                 </section>