Fix catalog PDF links; add bring-online guide; feature zappier billing
Some checks are pending
offline / test (push) Waiting to run
Some checks are pending
offline / test (push) Waiting to run
PDFs rewrite in-document .md/.html links to sibling PDFs. Catalog start page is GETTING-STARTED (install, first-up, monitor). Billing and user platform is zappier-edge (original ~/zappier tree).
This commit is contained in:
parent
e401635fd6
commit
65bfa544b2
10 changed files with 149 additions and 25 deletions
19
scripts/pdf-links.lua
Normal file
19
scripts/pdf-links.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
-- Rewrite in-document links so catalog PDFs point at other PDFs, not .md/.html.
|
||||
function Link(el)
|
||||
local t = el.target or ""
|
||||
if t:match("^https?://") and not t:match("zapier%.georgelambert%.org") then
|
||||
return el
|
||||
end
|
||||
if t:match("^mailto:") or t:match("^#") then
|
||||
return el
|
||||
end
|
||||
local path, frag = t:match("^(.-)(#.*)$")
|
||||
if not path then
|
||||
path, frag = t, ""
|
||||
end
|
||||
if path:match("%.md$") or path:match("%.html$") then
|
||||
path = path:gsub("%.md$", ".pdf"):gsub("%.html$", ".pdf")
|
||||
el.target = path .. frag
|
||||
end
|
||||
return el
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue