I am quite happy with the tool at the moment but there are some small things I want to fix before making the tool open source.
Titles
Both Pandoc and Hugo tend to prefer the title in the frontmatter of the markdown document instead of the first header.
A title in the frontmatter should have all the same affordances as a title in the markdown.
The title should support rename, and be renamed when references to the document are renamed.
Front Matter
Add support for autocomplete of fields in front matter based on previous fields.
Single fields should autocomplete with single fields (i.e. draft: true/false), array fields should autocomplete each item as a single field. So
tags:
- |autocomplete here|
Default Content
I would like to provide hooks for various pieces of default content.
Default new note content
Default wikilink to link content. For example on netlify folder paths auto resolve to index.html. So if there is a file posts/index.html I want the link to resolve to posts. In Hugo we need shortcodes to resolve links correctly. So we would resolve to {{< rel ref "posts" >}}. This may need to be a javascript callback, but a snippet could be easier
At the moment I am publishing using my notes repo.
The notes repo does not support tags or higher level organization.
It is quite simple though.
I would like to support publishing with hugo eventually. But I really like pandoc. I put together an example of using the two together based on the information in this pull request. The benefit of publishing with hugo is the reloads are insanely quick compared to what I'm currently doing which is rebuilding everything on changes.
Copy the Metadata folder from the notes repo to /root/ and /static/
Basically everything should work now out of the box.
When running hugo use ./hugo to use the overridden version of hugo.
Caveats: the front matter is not passed to pandoc. In order to pass front matter you need to duplicate the front matter. The second front matter is passed to pandoc.
---
date: 2020-08-12T10:55:43-04:00
draft: true
title: My Second Post
---
---
toc: true
title: My Second Post
---
I am quite happy with the tool at the moment but there are some small things I want to fix before making the tool open source.
Titles
Both Pandoc and Hugo tend to prefer the
title
in the frontmatter of the markdown document instead of the first header. A title in the frontmatter should have all the same affordances as a title in the markdown. The title should support rename, and be renamed when references to the document are renamed.Front Matter
Add support for autocomplete of fields in front matter based on previous fields. Single fields should autocomplete with single fields (i.e. draft: true/false), array fields should autocomplete each item as a single field. So
Default Content
I would like to provide hooks for various pieces of default content.
posts/index.html
I want the link to resolve toposts
. In Hugo we need shortcodes to resolve links correctly. So we would resolve to{{< rel ref "posts" >}}
. This may need to be a javascript callback, but a snippet could be easierVSNotes has good examples of this.
Publishing
At the moment I am publishing using my notes repo. The notes repo does not support tags or higher level organization. It is quite simple though.
I would like to support publishing with hugo eventually. But I really like pandoc. I put together an example of using the two together based on the information in this pull request. The benefit of publishing with hugo is the reloads are insanely quick compared to what I'm currently doing which is rebuilding everything on changes.
root/hugo
root/bin/pandoc
/root/
and/static/
Basically everything should work now out of the box.
When running hugo use
./hugo
to use the overridden version of hugo.Caveats: the front matter is not passed to pandoc. In order to pass front matter you need to duplicate the front matter. The second front matter is passed to pandoc.