Created
January 28, 2024 12:31
-
-
Save xenodium/5cd03e34ec8d2f8eb5d7ccd19fb69849 to your computer and use it in GitHub Desktop.
Converting my org blog to markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pandoc -f org -t markdown-smart --strip-comments --wrap=none --lua-filter=org.lua index.org -o output.md && sed -i '' 's/{width="[0-9]*%"}//g' output.md | |
org.lua: | |
function Header(el) | |
el.attr = pandoc.Attr("", {}, {}) | |
return el | |
end | |
function CodeBlock(el) | |
el.attributes['class'] = nil | |
return el | |
end | |
function Code(el) | |
el.attr.classes = {} | |
return el | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment