update `pandoc` data dir
parent
c098307fd7
commit
5f5f3e1463
|
@ -8,4 +8,5 @@ to: html5
|
||||||
filters:
|
filters:
|
||||||
- localize_quotes.lua
|
- localize_quotes.lua
|
||||||
- resolve_internal_links.part.lua
|
- resolve_internal_links.part.lua
|
||||||
|
- link_headings.lua
|
||||||
...
|
...
|
||||||
|
|
|
@ -3,11 +3,12 @@ from: markdown
|
||||||
toc: true
|
toc: true
|
||||||
citeproc: true
|
citeproc: true
|
||||||
csl: chicago-fullnote-sl
|
csl: chicago-fullnote-sl
|
||||||
reference-location: section
|
|
||||||
template: bavbavhaus.net.html5
|
template: bavbavhaus.net.html5
|
||||||
to: html5
|
to: html5
|
||||||
filters:
|
filters:
|
||||||
- localize_quotes.lua
|
- localize_quotes.lua
|
||||||
- collect_internal_linked.lua
|
- collect_internal_linked.lua
|
||||||
- resolve_internal_links.lua
|
- resolve_internal_links.lua
|
||||||
|
- link_headings.lua
|
||||||
|
- current_date.lua
|
||||||
...
|
...
|
||||||
|
|
|
@ -4,25 +4,25 @@ os.setlocale("C")
|
||||||
local Inlines = pandoc.Inlines
|
local Inlines = pandoc.Inlines
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{ Link = function(link)
|
{ Link = function(l)
|
||||||
-- early return for external links
|
-- early return for external links
|
||||||
if link.target:find("^https?%:%/%/") then return end
|
if l.target:find("^https?%:%/%/") then return end
|
||||||
if link.target:find("^mailto%:") then return end
|
if l.target:find("^mailto%:") then return end
|
||||||
|
|
||||||
local fp, slug, anchor = link.target:match("^((.+)%.md)#?(.*)$")
|
local fp, slug, anchor = l.target:match("^((.+)%.md)#?(.*)$")
|
||||||
-- early return for non markdown files
|
-- early return for non markdown files
|
||||||
if not fp then return end
|
if not fp then return end
|
||||||
|
|
||||||
local f = io.open(fp)
|
local f = io.open(fp)
|
||||||
-- early return for broken internal links
|
-- early return for broken internal links
|
||||||
if f == nil then return link.content else f:close() end -- @todo maybe log broken internal links
|
if f == nil then return l.content else f:close() end -- @todo maybe log broken internal links
|
||||||
|
|
||||||
local internal_link = link:clone()
|
local internal_link = l:clone()
|
||||||
internal_link.target = ("#%s%s"):format(slug, anchor)
|
internal_link.target = ("#%s%s"):format(slug, anchor)
|
||||||
|
|
||||||
link.content = "↪"
|
l.content = "↪"
|
||||||
link.target = ("%s.html#%s"):format(slug, anchor)
|
l.target = ("%s.html#%s"):format(slug, anchor)
|
||||||
|
|
||||||
return Inlines({ internal_link, link })
|
return Inlines({ internal_link, l })
|
||||||
end }
|
end }
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,20 +9,20 @@ return {
|
||||||
{ Meta = function(meta)
|
{ Meta = function(meta)
|
||||||
page_slug = meta["slug"]
|
page_slug = meta["slug"]
|
||||||
end },
|
end },
|
||||||
{ Link = function(link)
|
{ Link = function(l)
|
||||||
-- early return for external links
|
-- early return for external links
|
||||||
if link.target:find("^https?%:%/%/") then return end
|
if l.target:find("^https?%:%/%/") then return end
|
||||||
if link.target:find("^mailto%:") then return end
|
if l.target:find("^mailto%:") then return end
|
||||||
|
|
||||||
local fp, slug, anchor = link.target:match("^((.+)%.md)#?(.*)$")
|
local fp, slug, anchor = l.target:match("^((.+)%.md)#?(.*)$")
|
||||||
-- early return for non markdown files
|
-- early return for non markdown files
|
||||||
if not fp then return end
|
if not fp then return end
|
||||||
|
|
||||||
local f = io.open(fp)
|
local f = io.open(fp)
|
||||||
-- early return for broken internal links
|
-- early return for broken internal links
|
||||||
if f == nil then return link.content else f:close() end -- @todo maybe log broken internal links
|
if f == nil then return l.content else f:close() end -- @todo maybe log broken internal links
|
||||||
|
|
||||||
link.target = ("%s.html#%s%s"):format(page_slug, slug, anchor)
|
l.target = ("%s.html#%s%s"):format(page_slug, slug, anchor)
|
||||||
return link
|
return l
|
||||||
end }
|
end }
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,11 @@ $abstract$
|
||||||
</div>
|
</div>
|
||||||
$endif$
|
$endif$
|
||||||
$body$
|
$body$
|
||||||
|
$if(date)$
|
||||||
|
<footer>
|
||||||
|
<p>$date$</p>
|
||||||
|
</footer>
|
||||||
|
$endif$
|
||||||
</article>
|
</article>
|
||||||
<article id="recto">
|
<article id="recto">
|
||||||
$for(parts)$
|
$for(parts)$
|
||||||
|
|
Loading…
Reference in New Issue