Live data from Hacker News

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

jaredkrinke.github.io

21–30 of 42 posts

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

#21
post #19

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…

> 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 developm…

Perhaps your use case is already supported in a different way, by downloading a single self-contained binary md2blog release, and then

> To build and test the site locally (with automatic reloading), run:

> md2blog --clean --serve

> And open a browser to the "localhost" URL that is written to the console. You can kill the server with Ctrl+C.

as described in https://jaredkrinke.github.io/md2blog/quick-start.html

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

#22
post #19

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…

> 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 developm…

The simple answer to "why not run this in a web page?" is that I built this tool based on my own needs and I never had any need to run a file system-based tool in my browser.

On the other hand, if I wanted to ship something similar with a built-in editing experience, then I think running it in the browser would be the way to go. The problem I saw there (last time I checked) was that I couldn't write directories of files to the file system from a web page (and I definitely want to store everything in the file system).

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

#23

Do you have plans for Latex by any chance?

I recently wrote a few documents in latex after ignoring it for over a decade. Trying to get a working setup with latex + bibtex + a few custom styles was quite annoying (and i work as a backend developer, so i probably tolerate annoying command line tools more than most people). I can appreciate that people (e.g. researchers) who just want to author a document with some equations in latex but who are not programmers or avid command line users might find the entire experience of getting a tolerable latex workflow set up very challenging. I guess that might be partly why https://www.overleaf.com/ has a business model! Hide all the package management and command line tooling nonsense behind a simple web interface.

I was very excited to find Thomas Weise had wrangled latex and a Tex Live installation into a docker container: https://github.com/thomasWeise/docker-texlive-thin

Another useful tool is latexmk, which is already installed inside the docker-texlive-thin container : https://mg.readthedocs.io/latexmk.html

By containing the madness of latex tooling and package management with docker and some volume mounts, I could have a reasonably sane build process to manufacture PDFs from latex source files.

I don't recommend md2blog add mandatory dependencies on anything related to latex. Another way to think about it might be offering optional latex support through some md2blog plugin mechanism that doesn't know anything about latex. But that path sure won't produce anything resembling a "zero config" static site generator! Might end up with something closer to apache httpd.

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

#24
post #19

Earlier quoted context omitted.

> 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 developm…

The simple answer to "why not run this in a web page?" is that I built this tool based on my own needs and I never had any need to run a file system-based tool in my browser. On the other hand, if I wanted to ship something similar with a built-in editing experience , then I think running it in the browser would be the way to go. The problem I saw there (last time I checked) was that I couldn't write directories of f…

> The problem I saw there (last time I checked) was that I couldn't write directories of files to the file system

You mean to an arbitrary path—why would this be necessary? The only write operation that most static site generators make use of is putting exactly one file tree somewhere after processing the input. The same thing is achieved by the browser's native Save File handling. If it were running in the browser, you'd generate a ZIP containing that file tree.

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

#25
post #6

I definitely have spent too long learning and fiddling with SSG’s. Going to give this a try!

I’d greatly appreciate it if you let me know how it goes (even if you hate it). I built it for my own needs, but I’d like to know if anyone else finds it useful. Thanks!

So far so good! It matches my desired style and feature set, so I’m probably the ideal candidate ahah.

Left a GitHub issue with the precompiled binary install. But it might be my fault.

The closest thing to this in terms of out of the box simplicity is probably Material theme for MkDocs [1], which has other features, but no official blog support.

[1] https://squidfunk.github.io/mkdocs-material/

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

#27
post #24

Earlier quoted context omitted.

The simple answer to "why not run this in a web page?" is that I built this tool based on my own needs and I never had any need to run a file system-based tool in my browser. On the other hand, if I wanted to ship something similar with a built-in editing experience , then I think running it in the browser would be the way to go. The problem I saw there (last time I checked) was that I couldn't write directories of f…

> The problem I saw there (last time I checked) was that I couldn't write directories of files to the file system You mean to an arbitrary path—why would this be necessary? The only write operation that most static site generators make use of is putting exactly one file tree somewhere after processing the input. The same thing is achieved by the browser's native Save File handling. If it were running in the browser,…

Saving a single zip file would work, thanks. But it still seems like a cumbersome workflow in this case because you’d have to unzip to view/upload the site.

I do like the idea in other contexts, just not here.

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

#29
post #28

Love the style and configs! Feature suggestion that I think fits the minimalist style. Support an optional “footer” argument in ‘site.json’. Useful for copyright, social links, ??

Not having some way to specify copyright, etc. is an oversight on my part. Thanks!

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

#30
post #26

Perhaps out of scope for your use case, but what’s the status of SEO support? Using frontmatter to generate basic meta tags, twitter/open graph for pretty links, etc. Might be a useful FAQ entry.

md2blog automatically adds the following meta tags: description, keywords.

The "keywords" tag includes both the post's category (derived from the parent directory name), as well as any keywords specified in YAML front matter.

I don't use Twitter/Facebook, so I wasn't aware of Open Graph. That might be worth looking into. I'm familiar with the concept, but didn't realize there was a standard.

Post reply on HN