Skip to content

Instantly share code, notes, and snippets.

@xenodium
Created January 28, 2024 12:31
Show Gist options
  • Save xenodium/5cd03e34ec8d2f8eb5d7ccd19fb69849 to your computer and use it in GitHub Desktop.
Save xenodium/5cd03e34ec8d2f8eb5d7ccd19fb69849 to your computer and use it in GitHub Desktop.
Converting my org blog to markdown
$ 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