Hacker News new | past | comments | ask | show | jobs | submit login
Creating a minimalist blog with Jekyll Now (vdf.dev)
90 points by flamecoals 66 days ago | hide | past | favorite | 92 comments

The real problem with any SSG is where to host and edit Markdown files and images for flexible spur of the moment content creation. I've built my own Wordpress-export-to-static solution to use the native iOS App as a workaround but it feels somewhat clunky — Same with having to run a headless CMS for this in the background; Surprisingly with all the gazillion of MD editors, no one has ever built one with live editing files in, say, S3 + allowing to upload assets. And no, I don't consider content composition in a terminal window to be an inspiring environment because I'm a sucker for aesthetic apps.

Addendum: Mobile is just an added bonus. Best solution for me would be iA Writer as an editor, native image upload to a bucket like S3 and Apple allowing me to tap into these iCloud hosted .md files via an API. Then use a simple script to put the pieces together and move the stuff to Netlify or wherever.

I use GitHub actions for simple, text-only posts.

I set up an action that gets dispatched once an issue with the label "post" is opened. It then takes that, creates a markdown file with that content and creates a commit. The original issue is then closed.

For more convince, I also have an issue template called "Blog Post", which has already the label set etc. Then, you can bookmark/pin a link to the new issue on your phone's home screen.

I found myself using that instead of git, even if I have a fit client and the repository already cloned.

Currently, it does not support issues where the "post" label is added after issue creation (would be useful for drafts). But it would be entirely possible, as well as image/media/file support.

Hey this sounds like a really clever solution, actually, would love to look at it — do you have a link to the action, or have you not released it?

It is not available in public, since it's only a workflow in a private repository that uses four different actions in that order:

- actions/checkout

- A script that edits/changes a file based on the content of the opened issue

- stefanzweifel/git-auto-commit-action@v4

- peter-evans/close-issue@v1

One could make a fully-fledged action out of that. But for my case, this is sufficient.

I also tried a different way, which may also work for you: There are .devcontainers, which can be used for GitHub Code Spaces. It's basically a VSCode in the browser, including a terminal. You can specify which extensions have to be installed, like a spell checker or markdown formatter and use that VSCode in the browser to write posts.

I'm currently not using that because it doesn't work on mobile at all.

Just adding another option to the mix: https://blot.im. I've been using Blot for years. I write/edit in iA Writer on mobile and upload via the git option using Working Copy. You can use git or Dropbox with Blot.

This is my exact feeling. I have a Hugo-powered blog, but like you said, I miss the ability to draft something quickly when I'm inspired. Right now, the best option I have found is self-hosting Ghost with some aggressive Cloudflare caching.

I considered using wp2static[0] before starting with Ghost. Have you published your exporter?

[0] https://github.com/leonstafford/wp2static

Disclaimer: App Author

If your Hugo blog is stored in Git, you could try out GitJournal [0][1]. It's a mobile based Markdown editor integrated with Git. Many people seem to use it for managing their Hugo/Jekyll blogs.

[0] https://gitjournal.io

[1] https://github.com/GitJournal

This looks great! Is it possible to create templates or script workflows in this app?

For example, when publishing new blog entry in my Eleventy site, I have to create a new folder, then create a markdown file in that folder with some specific frontmatter. Can I have GitJournal do that all for me?

Kind of - There is an option to always add specific frontmatter when creating a new file. It's however in the pro version.

I'm yet to implement proper templating support.

Could you please vote on the issue? https://github.com/GitJournal/GitJournal/issues/20

I was in exactly this situation. I had a static site/blog thing on GitHub pages, but the process just wasn't conducive to spur of the moment writing. I nearly went back to WordPress but it's just far too bloated for my needs, so like you I ended up on Ghost. I went with Ghost because it was nice and streamlined, made writing quick and easy and wasn't too bloated. I still need to take some time to develop a super streamlined theme but it's good enough for now!

There's https://www.netlifycms.org/ it has drafts and you are not limited to Hugo with it.

For Windows users, DocxManager (https://docxmanager.com) the Word-document-based static site generator which supports S/FTP uploading (and S3 soon) will be expanded to be a tabbed markdown editor in the near future.

Yes, I'm the developer ;)

People will gladly use classes from tailwind such as mt-1 (margin top 0.25rem) but they will freak out when they see the MsoNormal class. Is there a way to make the styles of the exported site look less like a word export?

Don't get me wrong, amazing work anyway, I just wanted to give some constructive criticism.

@patates, Thanks for the feedback! Yes, I actually noticed the issue, and I do want to address the issue with an appropriate approach (but it still needs more thoughts). Of all the css frameworks tailwind is definitely the best fit as far as I see it, thanks to it's "utility first" concept.

Personally I write to myself on telegram, then take it from there once I'm on a computer. Doing detail editing on a phone is painful anyway.

This makes me think, a Telegram-bot-as-a-CMS would work great for micro blogging.

What is old is new again. This exact idea has floated for pretty much all messaging protocols that have had some kind of programmabilty already.

We can even imagine an email-based microblogging hack. Edit your boop (that's the new tweet) in your favorite MUA: the subject is the short text, the body is the long text. You can even put images and attachements in there. Send yourself this message, with a well-known prefix: it ends up in a specific IMAP folder. Have your third-party server that pulls messages from this folder and displays them in a "nice" view, so that anyone can browse and subscribe. To reply to boops, just reply to it in your MUA along with a copy for yourself and it will be present in your "Timeline" and in theirs. To address someone, send them a copy.

In a perfect world you could anonymously authenticate to anyone's IMAP server and read that "boops" folder, and even subscribe to it if you want. But I don't think any existing provider will ever implement something like that.

Email and RSS have all the fundamental building blocks for so many usecases already, but we keep reinventing the wheel again and again. The abstractions work. Imagine every company had to reinvent the whole TCP/IP stack every single time.

Great write-up. You're absolutely right, without having the protocols required to achieve this already in place, much of the web wouldn't exist today.

I think right now, we will all have to wait for the system that ends all present microblogging platforms. And with what we are seeing right now, this solution must be decentralised, censorship-free, and non-selective with who can participate, for the billions of internet users to even consider switching away from FB, Twitter, and the like.

Tumblr used to have this.

There is something already in place with the 'telegra.ph' site, which is connected with Telegram I believe:



Awesome! So 'telegra.ph' allows anyone to post a richly-formatted HTTPS site right from Telegram. Neat!

It should be fairly simple from here, to display contents of said HTTPS site on their own blog or website, so that they can write and edit their site directly from Telegram.

This is exactly what I imagined when I thought of Telegram-as-a-CMS. Thanks!

Something similar was posted on HN before [1], seems to be offline though. There’s an archived copy here: [2]

[1] https://news.ycombinator.com/item?id=17617675

[2] https://web.archive.org/web/20180726143328/https://telepost....

Telepost (which I just found out about from you) would be too expensive an option for a microblogging usecase, in my opinion.

Nevertheless, it is proof that something like that could work, although it would require large infrastructure cost today. Thanks for the links!

I was also thinking of SMS to blog via Twilio — Used to do this in the late 90s from a Nokia Communicator

Here's a nice SMS to blog how-to/setup: https://writxt.fun

Great find, thanks for this!

I do this with email for to-dos ;)

I'd suggest you give Forestry (https://forestry.io) a try. It's a great CMS for static sites (incl. asset management) and it has a really nice preview system.

Tried since day one but it seems dead.

Dead how? I find forestry with integrated cloudinary for asset hosting a really decent solution.

I ended up picking hexo [0], as the hexo admin plugin [1] provides a nice localhost CMS/editor that supports image pasting, tag editing etc (could be hosted online too for remote/mobile access, but wouldn't be truly static/server-less at that point).

> but it feels somewhat clunky

Yeah, still feels like there should be _something_ better out there

[0] https://hexo.io/

[1] https://github.com/jaredly/hexo-admin

Do you still have a regular WordPress host though? Do you use WordPress.com?

I always wanted to do this but every solution requires some non-free PHP hosting alongside the static host. WordPress.com doesn’t let you customize it unless you pay and if you want to use it headlessly you have to build a non-WordPress template elsewhere.

I have a low-traffic low-edit WordPress site I want to staticize, but no solution is server-free.

Yes I use wp.com as a dumb backend with a somewhat blank template so SEs won't find it. Then pull all posts via the API, download images, etc. Render them via Jinja and upload them to Netlify.

Yeah that sounds reasonable. I don’t know if I’ll ever get around to rewriting the templates.

By the way you could just use the images served from WordPress.com I assume… unless the ToS don’t allow that.

wp.com does some hotlinking prevention IIRC so I just download them with Python. Plus, I like hosting assets on my own turf. Peace of mind...


lektor offers some of this functionality. editing is done locally through a browser UI, but there may be a way to host the interface. deployments are easy.

> The real problem with any SSG is where to host and edit Markdown files and images for flexible spur of the moment content creation.

I'm with you there. I have a shortcut to a Google Drive on my phone homescreen that I use as my notebook that's worked out for me. I also have a reMarkable that I've been writing a lot on, but retyping everything has been a point of friction (and my handwriting is apparently so bad that OCR is only ~70% accurate and it takes about as much time to fix as to just retype it

> where to host and edit Markdown files and images for flexible spur of the moment content creation

That, and somehow I don't like drafts to be on a public repo.

Nothing stopping you using a private repo. I use Netlify to host and have it automatically deploy when I merge to main, but my repo is private. I write my drafts in a branch and merge when I'm ready to publish.

Same here. I’ve tried both a self-hosted deployment solution and AWS Amplify. Both of them has used private repositories on Github. No SEO juice to Github, only to my domain :)

GitHub and GitLab has pretty decent browser based editors for basic markdown and image uploading. Certainly not as easy to use as Wordpress but they’ve been good enough when I really need to edit something and can’t get to my workstation with the clone and a decent editor.

I have a cronjob on my vps that pulls the repo every 20 minutes, and if there are changes builds and uploads the site. I don’t write on mobile but if I would, I’d use iA Writer + Working Copy

Doesn't solve the problem with assets.

Well, it does for me as I stuff the assets into the git repo too. Or is the issue with the previews? That's one thing I haven't been able to figure out. (currently I just run the dev server and look on the generated website, but the iA writer preview is image-less)

Good point. However, there is so much innovation in this space right now so I’m pretty sure that something like what you described will emerge.

The combination of Typora (https://typora.io/) for writing markdown + `mkdocs serve` or `hugo serve` is pretty neat. Set up a gitlab-ci.yml that builds and pushes the final site to your hosted destination, that's it.

Image upload in Typora is done via some random hosting service IIRC.

Typora is a markdown editor. Hosting is done in Github, Gitlab etc. Typora is not a hosting solution afaik.

Why can't you work on posts in another editor and export to your repo (copy-paste or whatever) posts when they are ready for publishing? Why does writing and publishing have to be in the same tool?

You can write in something like Bear, or anything else with iCloud support to have cross-device sync.

1. Just use Github to write. 2. Gatsby.js can sync with most CMSs.

Doesn't solve the problem with assets.

a couple years back, github added an 'upload' button when browsing your own repo from the web.

Have you tried Next.js?

I'm going to add my personal take on this issue since I'm currently running a blog that's markdown-ish powered.

In my opinion the best solution is to find some sort of happy medium. Static site generators are excellent in terms of weight and speed but a lightweight file based CMS can be almost as fast while still providing the needed flexibility.

My site currently runs on Kirby (https://getkirby.com) but I write almost everything on iA both on my Mac while I'm at home and on my phone while I'm outside.

Updating the site is not as simple as typing a command on a terminal but it's just a few clicks on a very simple and minimal UI.

Images are hosted on my server like the rest of the content. It's a simply DO snippet with no fancy configuration.

If you want to go down a more automated solution, iA comes with support for micropub so you could in theory set it up so that you can upload a new post without leaving the iA interface.

But imo it's a lot of extra backend setup that needs to be monitored to save very little time in the long run so for me it's personally not worth it.

I am somewhat confused by this blog post, as GitHub directly renders Jekyll sites by default–no GitHub Actions or fiddling required. Is there a reason why this was not the right fit?

(author here) I did not know that :P. I thought it was an action because it behaved like one, but you are right, it is a built-in feature on github. This also makes using mainline Jekyll a much better alternative. I will correct the post and follow up updating it from Jekyll now to Jekyll. I used this built-in support thinking it was an action :P

Depends on your build I guess. We compile things like TailwindCSS in our build. Not sure if that's supported outside of Actions.

Was under the impression you can't use Github pages for commercial use? Not sure how heavily that is enforced.

This is GitHub's wording in the Pages docs:

> GitHub Pages is not intended for or allowed to be used as a free web hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS).


To me that sounds like a blog would be fine.

Consider using the regular Jekyll at https://jekyllrb.com/ (the Jekyll Now fork is no longer maintained)

FYI: Here's my little minimialist starter kit called Hello, Minima! - Get Started w/ GitHub Pages (Jekyll) in 60 Seconds using the Minima (Gem-Packaged) Theme [1].

[1]: https://github.com/henrythemes/hello-minima-theme

We run https://www.shoto.io completely on Jekyll. Until now, all modifications we needed were possible. I wonder if it is super future proof though. Once we start expanding the site with new features we might start "abusing" the setup.

In any case, I think the data is stored as MD and thus it can be probably easily migrated.

I will! I am going to add a note to the post letting people know. Maybe we can create a similar functionality that Jekyll Now had of forking the repo and having a github page right away.

Old school perhaps, but most everything here feels wildly overengineered for a static site. If the site is truly static, then there's no need for any server or client web languages at all. You need HTML (with perhaps some sort of generator), CSS, and e.g. rsync.

I've been doing mine with http://zim-wiki.org for years

> Instead of using a hosted service like Facebook or Medium, as I strongly believe in a decentralized web

So you put it on Github..

The way he's using Github is as a basic host, he could move to a different service and the blog would look the same, the URLs still work, and the visitors couldn't tell the difference.

That's day and night compared to publishing on Facebook or Medium.

(author here) Good point, but I still believe it is much better to use your own domain and have control of the whole html. Sadly because of the infrastructure currently available there is a balance between usability and centralization (but I don't think it needs to be this way). In the end, github page is being a commodity service, I could easily replace with any major provider to host the same website and users wouldn't even notice. If I wanted to be extremely radical I could host it on my personal machine on my house, but latency and availability would suffer. If I used a service like CloudFlare to improve it, we are back to centralization. Sadly, there isn't a black and white answer here.

I find creating a site with next.js then making a static export much easier and much more customizable than your typical ssg.

I'd love to hear other opinions though.

I dig the theme, its clean and old school.

One bit of feedback: you should bump up the overall font size and do a relative max-width, maybe 70%. I bumped up zoom by two to get things readable on my MacBook.

Much of your audience will be on screens that are at least 1200 pixels wide, so forcing folks to ~12pt / 600px ends up w/ things being pretty small and cramped.

Great feedback, I will experiment with your suggestions, thanks!

Jekyll Now seems great, but there has been no github activity since 2018. Are there more actively maintained alternatives?

Both Hugo and mkdocs appear to receive more updates than Jekyll these days. I was in the same situation as the author and decided for mkdocs, because it features better syntax highlighting and customization than hugo. I find it also better to read for long documentation-like posts (have a look du.nkel.dev). There are less themes available compared to Hugo, but those that exist feel more powerful and complete.

(author here) yes, the lack of updates is concerning. Interesting, I will check mkdocs out!

Yeah - I’m still on Jekyll because of built in GitHub pages support, but if I was starting today I’d probably use Hugo.

https://jamstack.org/generators/ is a great list of static site generators.

Last time I was evaluating static site generators, Dimples and Nanoc both stood out for this recent-updates reason, among other personal criteria.



Are updates needed?

They might be. I tried running it locally with the latest ruby LTS and ran into errors. It only worked with Ruby 2.7.

However, what isn't clear is if we need to discard the whole project and go to another one or just help the maintainers. I will see if I can help.

Maintenance is certainly useful even if there are no new features. I doubt the project is bug-free so no updates means no bugfixes either.

I wanted to do something similar, but I found Jekyll quite bloated. Pelican didn't work for syntax highlighting. I found Hugo the best. My current stack is Hugo with terminal theme hosted on GitHub pages.

Yeah, and if you ever wish to bloat up your Hugo install, there's always Hugo extended for that.

If I have just one piece of feedback here it would be:

    body { padding: 10px; }

Changing nothing else but this would make the site 10x better. Even a Terminal window has 5+px of padding.

body { font-size: 18px; } would help with squinting as well

Good point! Done!

read this whole post out of curiosity about what the heck Jekyll Now was...and then scratched head about why author wasn't just utilizing the github pages platform...aka hosted Jekyll.... c'mon get in touch man

Jekyll has been a dream for me, used it for about four years now. The problems I have with it are generally solvable on my own, but haven't quite passed that threshold where I want to take the time to solve them (i.e. a plugin for autocomplete for things like layouts, includes, etc).

What's wrong with hugo + self-hosted nginx on a VPS?

Author's case eliminates the "self-hosted nginx on a VPS" part. While there is no big difference (just a personal preference) if Hugo, Jekyll or other tool is being used to generate HTML from Markdown.

Ah, thanks, I missed that. I also somehow missed the “Just work” requirement which could rule out hugo. In my experience it requires quite a bit of tinkering to get going.

Now you have to keep patching a server for a static site

Should there be anything wrong?

txt file + org mode export - simple & easy to edit

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact