menu
Channels
Team

How could I help to add support for .org posts?

March 28, 2018 at 8:04am

How could I help to add support for .org posts?

March 28, 2018 at 8:04am

Yes, I'm one of the converts now ๐Ÿ˜„

Mainly thinking about support for footnotes and embedded React components/code blocks


March 28, 2018 at 8:22am

What do you mean by .org posts?

  • reply
  • like

For foonotes, should not be a problem, should be handled by the markdown transformation.

  • reply
  • like

For embedded react component, it's already possible! Here is how to do (https://github.com/phenomic/phenomic/tree/master/examples/react-app-markdown-with-custom-components (tell me if that's not clear enough with the code itself)

  • reply
  • like

For code block, I will have to make a last tweak so we choose with phenomic config what languages we want (as for now it "works" but break as soon as it found a specific language (which mean generic "code" is ok, but "sass code" for example will break). I have to finish a thing (wip, 99%) so we can pass config to plugins/presets (like babel config) in order to arrange the situation!

  • reply
  • like

It's the org-mode files used in emacs - super handy for writing and organizing stuff in general. Basic support has been added to Visual Studio Code as well recently, I think - at least for section folding and such.

Here's an overview:

https://www.youtube.com/watch?v=SzA2YODtgK4

Emacs can export org-mode to markdown, so there's a workaround, but I like to edit the files when they still end in .org as the section folding behavior is retained in the editor. I think it would be useful if some basic parsing could be hacked on top, it has good support for code blocks:

https://orgmode.org/manual/Structure-of-code-blocks.html

  • reply
  • like

Oh I see! In short it's another file format right? If so, we could just add a plugin like for markdown and asciidoc. It should be easy to take a look to markdown transformer and copy it to support .org files. Take a look to this https://github.com/phenomic/phenomic/tree/master/packages/plugin-transform-markdown and tell me what you think :)

  • reply
  • like

Adding any kind of transformation is pretty easy in fact. For example you can check json transformer (which is basically doing nothing special beside respecting phenomic transform api) https://github.com/phenomic/phenomic/blob/4cb9661cfa0841ec6ddd0a03839c92fa9990f98e/packages/plugin-transform-json/src/index.js

  • reply
  • like

@haywirez feel free to make a PR to the repo. I could also offer you write access if you don't want to handle a fork :) Just ask

  • reply
  • like

Cool, thanks!

  • reply
  • like

You have been invited to the org ;)

  • reply
  • like

March 29, 2018 at 10:59am

Cheers - just a heads-up, this is quite a challenge so it might take me a while ๐Ÿ˜€

I will schedule some time next week

  • reply
  • like