Live data from Hacker News

Show HN: Md2blog – A zero-config static site generator for dev blogs

jaredkrinke.github.io

11–20 of 42 posts

Re: Show HN: Md2blog – A zero-config static site generator for dev blogs

#11
post #10

This looks great! I actually made a very similar tool called Markblog[1]. We did a lot the same way (even using Deno!), but we did themes a little differently. I used custom CSS-files, but your approach is even simpler. Not to detract from Md2blog, I just want to add it to the converstaion for anyone interested in these things :) Keep up! [1]: https://github.com/olaven/markblog

Thanks for sharing! Is there an example site built with Markblog? I didn’t see a link in the readme.

It certainly sounds very similar!

Edit: Found this link on the Markblog docs: https://olaven.org/

Edit again: I like that you appear to have an automated approach to deploying to GitHub Pages.

Re: Show HN: Md2blog – A zero-config static site generator for dev blogs

#12
It would be nice if as part of the zero config effort, programs (esp. programs that aim to be easy-to-use Web-authoring tools) would focus even more on being as close to zero setup/zero installation as possible, too. To wit:

This program is written in TypeScript, a browser-incompatible dialect of JS that is nonetheless regularly compiled to standard JS, e.g. to transform a given module into a form that can run in the browser—and yet md2blog itself doesn't. You are expected to either download an out-of-band, platform-specific binary or use Deno to run it.

Instead, one should be able to use md2blog and similar programs by using the browser itself to open and run the program, considering it's the universal platform that everyone already has, and it's reasonable to expect that you're going to use it at some point in the pipeline, anyway (e.g. for proofing your work).

Even better quick start instructions would look something like this:

0. Start with a directory that contains the site sources that you intend to publish.

1. Save a copy of "md2blog.html" there, too (or anywhere, really).

2. Open the md2blog program in your browser by double clicking md2blog.html.

3. Drag and drop the directory with your Markdown sources (same one from steps 0 and 1) into the newly opened md2blog tab.

(For good measure, a copy of these quick start instructions would be shown when you open md2blog.html.)

Re: Show HN: Md2blog – A zero-config static site generator for dev blogs

#13
post #12

It would be nice if as part of the zero config effort, programs (esp. programs that aim to be easy-to-use Web-authoring tools) would focus even more on being as close to zero setup/zero installation as possible, too. To wit: This program is written in TypeScript, a browser-incompatible dialect of JS that is nonetheless regularly compiled to standard JS, e.g. to transform a given module into a form that can run in the…

Your instructions sound like the description for tiddlywiki.

Re: Show HN: Md2blog – A zero-config static site generator for dev blogs

#15
post #12

It would be nice if as part of the zero config effort, programs (esp. programs that aim to be easy-to-use Web-authoring tools) would focus even more on being as close to zero setup/zero installation as possible, too. To wit: This program is written in TypeScript, a browser-incompatible dialect of JS that is nonetheless regularly compiled to standard JS, e.g. to transform a given module into a form that can run in the…

I much prefer tools that run in a browser (both for convenience and for sand-boxing), but... I think a command line tool is better for a simple file system-based case like this, at least beyond an initial first impression.

My workflow is that I write my posts in VS Code, and then if I want to preview or upload, I just hop over to the console and type a command (no mouse needed). Deno's built-in sand boxing is the most convenient command line alternative to browser-based apps that I'm aware of.

Edit to add: I have toyed with the idea of integrating VS Code's Monaco editor into a "dev blog in your browser" type of app, but (the last time I checked) durable storage for web app data wasn't reliable (it was more intended to be a cache). Maybe things have changed.

Re: Show HN: Md2blog – A zero-config static site generator for dev blogs

#16

the layout of the demo blog looks really nice, loads immediately, no bloat

Yes, the bloat (e.g. Facebook/Twitter logos) associated with many themes for other static site generators was one of the aspects that drove me to create md2blog's templates from scratch, by hand.

Re: Show HN: Md2blog – A zero-config static site generator for dev blogs

#17
post #12

It would be nice if as part of the zero config effort, programs (esp. programs that aim to be easy-to-use Web-authoring tools) would focus even more on being as close to zero setup/zero installation as possible, too. To wit: This program is written in TypeScript, a browser-incompatible dialect of JS that is nonetheless regularly compiled to standard JS, e.g. to transform a given module into a form that can run in the…

I much prefer tools that run in a browser (both for convenience and for sand-boxing), but... I think a command line tool is better for a simple file system-based case like this, at least beyond an initial first impression. My workflow is that I write my posts in VS Code, and then if I want to preview or upload, I just hop over to the console and type a command (no mouse needed). Deno's built-in sand boxing is the mos…

There's the interactive use case while editing markdown where a UI is very nice, but there's also the use case of putting static site generation into an automated build and deployment process. Command line tools that respect standard command line conventions (exit nonzero meaning error, etc) offer an obvious pathway to automation. Often running a static site generator is but one of many steps in a repetitive process, and one part of usability is how easy it is to call the tool from a bash script or use it inside a rule in a makefile.

I can see you're offering self-contained prebuilt single-file binary releases. From my perspective those are a fine way to address the user request of "I want it to be easy to install without needing to first install and configure n other tools". That's one thing that I reckon hugo got right.

Out of curiosity I downloaded a linux binary md2blog release, and apart from needing to unzip and `chmod +x` it, it ran fine without dependencies -- i don't have any tooling related to deno or typescript installed locally.

Are you using `deno compile` [1] to build these self-contained release binaries?

[1] https://deno.land/manual/tools/compiler

Re: Show HN: Md2blog – A zero-config static site generator for dev blogs

#18
post #17

Earlier quoted context omitted.

I much prefer tools that run in a browser (both for convenience and for sand-boxing), but... I think a command line tool is better for a simple file system-based case like this, at least beyond an initial first impression. My workflow is that I write my posts in VS Code, and then if I want to preview or upload, I just hop over to the console and type a command (no mouse needed). Deno's built-in sand boxing is the mos…

There's the interactive use case while editing markdown where a UI is very nice, but there's also the use case of putting static site generation into an automated build and deployment process. Command line tools that respect standard command line conventions (exit nonzero meaning error, etc) offer an obvious pathway to automation. Often running a static site generator is but one of many steps in a repetitive process,…

Yes, md2blog's pre-built binaries are created using "deno compile".

Re: Show HN: Md2blog – A zero-config static site generator for dev blogs

#19
post #12

It would be nice if as part of the zero config effort, programs (esp. programs that aim to be easy-to-use Web-authoring tools) would focus even more on being as close to zero setup/zero installation as possible, too. To wit: This program is written in TypeScript, a browser-incompatible dialect of JS that is nonetheless regularly compiled to standard JS, e.g. to transform a given module into a form that can run in the…

I much prefer tools that run in a browser (both for convenience and for sand-boxing), but... I think a command line tool is better for a simple file system-based case like this, at least beyond an initial first impression. My workflow is that I write my posts in VS Code, and then if I want to preview or upload, I just hop over to the console and type a command (no mouse needed). Deno's built-in sand boxing is the mos…

> I think a command line tool is better

Why not both? It doesn't need to be mutually exclusive; write md2blog.html so it can run either from the command-line or be opened in the browser—whichever is preferable (easiest) at the time.

I don't understand your comment about durable storage. If you have a directory of Markdown files on your disk, that's already durable storage. I'm just talking about tweaking the development approach so the site generator's business logic can run using the browser process's JS runtime that's almost definitely already in memory. md2blog.html would be written to accept the same directory that the current incarnation reads; use ordinary file APIs—the input element or drag and drop. "Web app data" (I think you're talking about localStorage?) would only seem to come in after starting to expand the scope of the tool and is a separate matter.

Re: Show HN: Md2blog – A zero-config static site generator for dev blogs

#20
post #13
post #12

It would be nice if as part of the zero config effort, programs (esp. programs that aim to be easy-to-use Web-authoring tools) would focus even more on being as close to zero setup/zero installation as possible, too. To wit: This program is written in TypeScript, a browser-incompatible dialect of JS that is nonetheless regularly compiled to standard JS, e.g. to transform a given module into a form that can run in the…

Your instructions sound like the description for tiddlywiki.

[deleted]
Post reply on HN