1 hour ago · Tech · hide · 0 comments

I figured out that I can file some inconveniences off the experience of writing Hugo sites in VS Code, and the result is a new VS Code extension called Hugo Habitat: mrled/vscode-extension-hugo-habitat. It can: Add a clickable glyph next to Hugo links to open that page in the editor Open the current page in a browser via a command Update frontmatter date to current time via a command Clickable references The extension adds a [↗] glyph next to each Hugo page reference. You can cmd-click that glyph to open the corresponding file in VS Code. Hugo has a bunch of different kinds of references. {{< ref unique-slug >}}: find the path to the content file for unique-slug {{< ref blog/habitat >}}: find the path to the unique tail, for instance, if you have /projects/habitat and /blog/habitat The same thing with relref shortcodes Can be configured to do the same for your own custom shortcodes, for instance, if you have a {{< page unique-slug >}} shortcode that emits <a…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.