Open JonathanReeve opened 3 years ago
To add back org-mode support in neuron, I'd recommend checking out the Plugin system in master
branch. Support for other text formats is best added as a plugin. Part of this will involve figuring out how to best abstract out (without compromising neuron core's simplicity) the various places where Markdown-assumption is used (eg: when checking for .md
file extension).
Plugins are defined here: https://github.com/srid/neuron/tree/master/neuron/src/lib/Neuron/Plugin ... a plugin is just a set of hooks, telling neuron to do custom things at various stage of the build process.
However, the Plugin type itself is hardcoded to assume markdown format (see for example the _plugin_markdownSpec
hook). So we have to figure out a way to treat source formats polymorphically in the plugin type.
Okay, I did some WIP prototype, and realized that org-mode support can be done as builtin -- doesn't have to happen as a plugin ... however we have to think in terms of how it impacts existing plugins.
For eg., the tags plugin requires YAML metadata, but org files have no YAML metadata, and instead they pass their heading properties in Pandoc AST. So the org reader can manually build a YAML structure out of these properties. This way, the plugins can continue to function independently of zettel formats in use (except for the aforementioned _plugin_markdownSpec
, which may have to be refactored out).
Real-world neuron notebook using .org files: https://github.com/Nimor111/notebook
Use this for testing the PR for this work.
See https://neuron.zettel.page/next - but I'll make an exception for this one feature if anybody wants to open a PR. It will be in neuron for eternity.
Emanote now supports Org Mode: https://emanote.srid.ca/demo/orgmode
So I know org support has been removed in v2, but it seems to me that there are a lot of great reasons for supporting org-roam file formats in Neuron:
So I started adding some stub functions here on my fork. Any help there, either from org-roam contributors or neuron contributors, would be much appreciated, since I'm still fairly new to Haskell.