Okay so I’m trying to get an Obsidian to Hugo to Neocities workflow set up.
I have my Hugo folder going, working, ready on my desktop (I know, shame shame shhhhhhh)
I have my Obsidian vault pointed at the Hugo folder, so I can easily create new .md posts that will become pages on the Hugo site natively within Obsidian as text editing. I’m very happy with this, because it gets me a wysiwyg text editor that I already use for writing as my Hugo front end.
What are my next steps?
In an unordered list:
- Use 4rkal’s advice here to install obsidian shell commands plugin to build the Hugo site after I’m done creating content without needing to open the command line or shell
- Create a template with the Templater plugin that will
- prompt for a blog post title
- auto fill the note title with what I type in the prompt
- update the frontmatter with the title that I type in the prompt
- update the frontmatter with the creation date and time
- set the post as a draft in the front matter
- move the post to the posts folder in obsidian
- possibly redesign the site OR install a template that I like better than my custom/hand built
- There’s a layout called Today I Learned which has an amazing graph view.
- I should like to use it for a separate site with my d&d notes showing the relationship between my party and all their knowledge
- However it looks like it may require the use of node javascript and I’m not entirely sure thats something I’d like to explore have the inclination to learn or use
Okay I’m back. I have the templater done. See below:
blog post
<%*
let title = tp.file.title
if (title.startsWith("Untitled")) {
title = await tp.system.prompt("Title of post");
}
await tp.file.rename(title)
await tp.file.move("/content/posts/" + title);
-%>
<%"---"%>
title: <% title %>
date: <% tp.file.creation_date() %>
draft: true
<%"---"%>
I suppose we’ll see if wiki links or includes work in Hugo or not. (Spoiler they don’t)
On to the command line!
I have installed the plugin, set it to run the Hugo command and tested it on this very post. And lo and behold, it works! Away we go!