Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back org support #557

Open
JonathanReeve opened this issue Feb 14, 2021 · 5 comments
Open

Bring back org support #557

JonathanReeve opened this issue Feb 14, 2021 · 5 comments
Labels
enhancement New feature or request v2 Next generation neuron -- simple core, with plugins

Comments

@JonathanReeve
Copy link

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:

  • Org-roam has a large user base already, and so Neuron would get a lot of users, too, if it supported org-roam format.
  • Org-roam doesn't yet have a killer HTML exporter, in my opinion. There are hacky versions out there: @jethrokuan's brain dump, and @rasendubi's org-braindump, but @jethrokuan's approach converts all org files to Markdown in order to serve them with Hugo, which seems a bit excessive, and @rasendubi's approach is a brand new org-mode parser in Typescript.
  • Neuron v1 (and early v2?) is already really close to supporting org-roam files, already, since Pandoc has a built-in Org parser, and there's an Org reader here, even though it's not very complete.
  • I just really like the Haskell / Neuron and Rib / Reflex approach to static site publishing.

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.

@srid srid added the as-plugin Should be implemented as a plugin label Feb 14, 2021
@srid
Copy link
Owner

srid commented Feb 14, 2021

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.

@srid srid removed the as-plugin Should be implemented as a plugin label Feb 21, 2021
@srid
Copy link
Owner

srid commented Feb 21, 2021

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).

@srid srid changed the title Support org-roam format Bring back org support Feb 21, 2021
@srid srid added the enhancement New feature or request label Feb 21, 2021
@srid srid self-assigned this Feb 21, 2021
@srid srid added the v2 Next generation neuron -- simple core, with plugins label Feb 24, 2021
@srid srid removed their assignment Feb 24, 2021
@srid srid added this to the 2.0 milestone Feb 25, 2021
@srid
Copy link
Owner

srid commented Apr 29, 2021

Real-world neuron notebook using .org files: https://github.com/Nimor111/notebook

Use this for testing the PR for this work.

@srid srid removed this from the 2.0 milestone Jul 28, 2021
@srid
Copy link
Owner

srid commented Aug 8, 2021

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.

@srid
Copy link
Owner

srid commented Jun 17, 2022

Emanote now supports Org Mode: https://emanote.srid.ca/demo/orgmode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2 Next generation neuron -- simple core, with plugins
Projects
None yet
Development

No branches or pull requests

2 participants