-
-
Notifications
You must be signed in to change notification settings - Fork 216
Exporting Files
github-actions[bot] edited this page Jul 16, 2024
·
137 revisions
When sending files to people not invested in Neorg it's nice to be able to use a format
that they use. The core.export
module is a backend module providing functionality
to write your own exporter for any given filetype.
All export functionality is provided by the :Neorg export
command.
To export the currently opened buffer to another file format, you should use the :Neorg export to-file
command.
The command takes the following arguments:
-
path
- the path to export to. Examples are:my-file.md
,~/output.md
. If the second argument is not provided Neorg will try to infer the filetype to convert to through the file extension. -
filetype
(optional) - the filetype to export to. Useful if you want to use a non-standard extension, or if the filetype you're using cannot be inferred automatically. Note that this filetype must be a filetype that Neovim itself provides and/or understands, i.e.md
ormarkd
is not a valid filetype, howevermarkdown
is.
Neorg also supports exporting a directory of files: this is where the :Neorg export directory
command comes into play.
It takes 3 arguments:
-
directory
- the directory to export -
filetype
- the filetype to export to -
output-dir
(optional) - a custom output directory to use. If not provided will fall back toconfig.public.export_dir
(see configuration).
-
core.integrations.treesitter
- A module designed to integrate Treesitter into Neorg.
core.autocommands
core.clipboard
core.clipboard.code-blocks
core.completion
core.concealer
core.defaults
core.dirman
core.dirman.utils
core.esupports.hop
core.esupports.indent
core.esupports.metagen
core.export
core.export.markdown
core.fs
core.highlights
core.integrations.coq_nvim
core.integrations.nvim-cmp
core.integrations.nvim-compe
core.integrations.treesitter
core.itero
core.journal
core.keybinds
core.latex.renderer
core.looking-glass
core.neorgcmd
core.neorgcmd.commands.return
core.pivot
core.presenter
core.promo
core.qol.toc
core.qol.todo_items
core.queries.native
core.scanner
core.storage
core.summary
core.syntax
core.tangle
core.tempus
core.text-objects
core.todo-introspector
core.ui
core.ui.calendar