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

Compatibility with Hugo for creation and modified #787

Closed
daniele-athome opened this issue Aug 19, 2019 · 6 comments

Comments

@daniele-athome
Copy link

@daniele-athome daniele-athome commented Aug 19, 2019

I'm not sure this is right, but I'll ask anyway also to see what you think about it.

I use Notable to maintain both my personal notebook and my Hugo content, using Markor on Android.

Hugo uses date and lastmod in the front matter for storing creation and modification times. Is it possible to modify Notable to use them? I'm also in the process of submitting a patch to Markor for adding a new Hugo-based markdown template used when creating new files.

Hugo is of course no standard to be followed, I'm mainly concerned about this because Markor author wants to keep 1 template format for both (Hugo and Notable), but I see now that Hugo and Notable are incompatible - so this is not only about Markor, but also about compatibility with static website generators such as Hugo. What do you think?

@fabiospampinato

This comment has been minimized.

Copy link
Member

@fabiospampinato fabiospampinato commented Aug 19, 2019

Using Notable in combination with some static website generator has been brought up multiple times already. It's something I find interesting too, but your proposed workaround isn't the right way to do this.

I've given the matter some thought, and I think the best way to solve your issue will be:

  • At some point we'll have an official mobile app #23, so you won't need to relay on Markor anymore.
  • At some point we'll add support for plugins #128, and I'm sure some kind of plugin for piping notes through Hugo/Gatsby/etc. will pop up.

Adding a workaround just to kind of support today's cool static website generator isn't the right approach, the right approach is to make Notable so powerful (via plugins), that you can do pretty much whatever you want with it.

In the meantime perhaps you could craft a shell script which copies the notes you want to pass to Hugo somewhere and does a bit of search & replace.

@daniele-athome

This comment has been minimized.

Copy link
Author

@daniele-athome daniele-athome commented Aug 19, 2019

Adding a workaround just to kind of support today's cool static website generator isn't the right approach, the right approach is to make Notable so powerful (via plugins), that you can do pretty much whatever you want with it.

Ok I can see and understand your vision, of course Hugo was just an example (and an excuse because it's the tool I'm currently using to produce HTML).
What I would like to argue about is the use of a standard front matter [1], a few projects seem to be following Jekyll which was the first one introducing the YAML front matter [2] (Hugo is one of them).

Yet again, I'm not saying that Jekyll is the standard, my personal issue is just finding a more-or-less standard way of producing metadata-powered Markdown files that are compatible with multiple apps. Because open and standardized (or sometimes just greatly popular) file formats often last longer than apps. My notebook will possibly last my whole life.

In the meantime perhaps you could craft a shell script which copies the notes you want to pass to Hugo somewhere and does a bit of search & replace.

That I can surely do :-)

[1] https://stackoverflow.com/a/28513112/1045199
[2] https://jekyllrb.com/docs/front-matter/

@fabiospampinato

This comment has been minimized.

Copy link
Member

@fabiospampinato fabiospampinato commented Aug 19, 2019

@daniele-athome I believe we are already using Jekyll-style YAML-based front matter, aren't we?

@daniele-athome

This comment has been minimized.

Copy link
Author

@daniele-athome daniele-athome commented Aug 19, 2019

You are, but you used incompatible field names, namely created and modified.
I know it's a minor issue, still...

Anyway, there is no equivalent in Jekyll for modified AFAIK (Hugo uses lastmod). Maybe Jekyll and Hugo should conform to Notable afterall :-)

In the end I'll probably fork Markor and create two templates, one for Hugo and one for Notable. When they'll converge, I'll merge the templates too.

@fabiospampinato

This comment has been minimized.

Copy link
Member

@fabiospampinato fabiospampinato commented Aug 19, 2019

@daniele-athome given how there's actually no proper Markdown spec and even YAML implementations vary wildly it seems, I don't think it's reasonable to expect properties written inside the front matter to use any sort of naming convention.

Notable notes aren't Jekyll pages, they are Notable notes.

@daniele-athome

This comment has been minimized.

Copy link
Author

@daniele-athome daniele-athome commented Aug 19, 2019

Alright. I had to try :-)
Thank you for your time and this great app!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.