Show HN: Publican – an HTML-first static site generator for Node.js

I'm Craig Buckler and Publican is my tiny, simple, fast, and free static site generator for Node.js.

I've used several SSGs including Jekyll, Metalsmith, and Eleventy. Why build another? The main reason: personal preference. All SSGs have features that I need, features I don't need, and features they don't support. Publican implements just enough with flexibility to extend it using JavaScript.

Publican templates use JavaScript literal ${ expressions } so there's no weird syntax to learn. You can also use !{ expressions } to output partially-built pages for runtime use in Express.js or elsewhere. Features include:

- process any content: markdown, HTML, CSS, JavaScript, TXT, SVG, RSS, XML, etc.

- simple JavaScript configuration

- clean URL routing

- automated navigation, pagination, directory, and tag index pages

- built-in syntax highlighting

- virtual content and templates (passed as strings)

- extendable function hooks

- use whatever client-side framework you like (or none!)

- fast site build and file watch rebuild

- full documentation at https://publican.dev/docs/

- starter themes at https://publican.dev/themes/

You can install Publican using npm: https://www.npmjs.com/package/publican

The code is available at: https://github.com/craigbuckler/publican

Also available for Publican:

- https://publican.dev/livelocalhost/ - a hot-reloading development server

- https://publican.dev/staticsearch/ - a search engine for any static site

All feedback is appreciated!

4 points ceeb 1 year ago 0 comments

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton