News for hackers. Stuff that matters.
Re:Netlify Drop by yosito on Wednesday November 17, 2021 @12:32PM (#29256052)
Can anyone recommend the most effortless static site generators to go along with this?

I'd love something that I can just pick a template, write a command, and have a basic starter site for my idea up and running in less than 15 minutes.

My ideal workflow would be something like:

1) Buy a domain

2) npx create-fast-site --template basic-landing-page

3) echo "Hello, world!" > home.md

4) npm run build

5) Drag and drop build directory to Netlify

6) Add my domain to Netlify

Re:Netlify Drop by 40four on Wednesday November 17, 2021 @12:53PM (#29256365)
For what it’s worth, my favorite is Eleventy https://www.11ty.dev/ It has a plethora of templating options, and I find the dev experience to be very nice. It is very flexible, and does not force you to follow any rigid pattern, like many others do.
Re:Netlify Drop by crate_barre on Wednesday November 17, 2021 @01:33PM (#29256959)
I’ll do you one better. Make an HN account, submit your blog posts as a text submission. Get a domain and redirect it to:

https://news.ycombinator.com/submitted?id=yosito

Or even better better, get a domain, make an index.html with two tags in the body, like so:

<H1>My blog posts</H1>

<iframe src=“https://news.ycombinator.com/submitted?id=yosito” />

Then just make your posts on HN.

Re:Netlify Drop by reidjs on Wednesday November 17, 2021 @03:05PM (#29258194)
This is a clever hack, serverless!
Re:Netlify Drop by robbiemitchell on Wednesday November 17, 2021 @12:54PM (#29256382)
Review the list and pick something written in a language you're most comfortable with, which has a decent amount of stars indicating the dev/theme ecosystem.

https://jamstack.org/generators/

Re:Netlify Drop by nitrogen on Thursday November 18, 2021 @12:34PM (#29268087)
Do the letters in Jam stand for anything like they do in e.g. LAMP? There was no acronym expansion or mention of the name's origin on jamstack.org's top-level page.

Edit: eventually found an original definition on Wikipedia: "Javascript, API and Markup (generated by a static site generator)"

Re:Netlify Drop by srik on Wednesday November 17, 2021 @03:54PM (#29258688)
Jekyll still fits the bill. It is simple, does data with collections, supports templates(which accept parameters and can thus be "component-ized"). It's also supported natively by GitHub which is a big plus, because you can hook up your repo to a custom domain for free too.
Re:Netlify Drop by hnaccount141 on Wednesday November 17, 2021 @12:40PM (#29256159)
I've found Hugo to be a good option.

https://gohugo.io/

Re:Netlify Drop by DoctorOW on Wednesday November 17, 2021 @01:11PM (#29256614)
Hugo is absolutely fantastic and incredibly powerful. It's nowhere near as simple as was requested. It's the most setup of any of the SSGs worth using.
Re:Netlify Drop by knuthsat on Wednesday November 17, 2021 @03:38PM (#29258530)
I don't find it powerful at all. Very hard to map through structures in templates.

Much easier to write templates in a real language.

Most of the time I need to map data to something else suitable for rendering. That mapping goes from markdown frontmatter to some nice form.

I ended up not using templates at all due to how cumbersome it is to write any kind of data transformations inside the template language.

Might as well just generate html myself.

A nice example is generating menu contents from a list of menu items with their sort weight and links. Ends up being very cumbersome.

Re:Netlify Drop by skrtskrt on Wednesday November 17, 2021 @03:57PM (#29258723)
The biggest issue with Hugo for me was trying to create a custom theme (in order to get a stripped-down site without a bunch of BS), everything breaks if you don't arrange all the files exactly the way required by Hugo themes.

Once I got that, and learned some Go templating in the process, it's just markdown files, fire and forget.

Re:Netlify Drop by qudat on Wednesday November 17, 2021 @03:00PM (#29258151)
Agreed. I have been using hugo for my blog https://erock.io and I still don't completely understand how it works. I just have enough to pattern match on to figure things out
Re:Netlify Drop by cpach on Wednesday November 17, 2021 @01:50PM (#29257196)
It does indeed have a bit of a learning curve. IMHO it’s worth the investment, YMMV.
Re:Netlify Drop by jokethrowaway on Wednesday November 17, 2021 @12:40PM (#29256163)
1) Fork a svelte-kit or next project on GitHub

2) Open Vercel (or Netlify)

3) Select the repo you forked

4) Add domain

You're live

If you want something blog-like: https://github.com/rodneylab/sveltekit-blog-mdx

Re:Netlify Drop by tomnipotent on Wednesday November 17, 2021 @03:28PM (#29258418)
Can confirm. Took me about 20 minutes last week to purchase a new domain, change name servers to Cloudflare, create a Vercel account, setup a project, add a custom domain, and then update A/cname records. I'd never used Vercel before then.
Re:Netlify Drop by bravefoot on Wednesday November 17, 2021 @12:51PM (#29256348)
I've used eleventy (https://www.11ty.dev/) with Netlify and it was very simple. Eleventy is the most featureful static site generator out there, but its probably the easiest to use.
Re:Netlify Drop by machiaweliczny on Wednesday November 17, 2021 @02:16PM (#29257562)
For my blog I'm using Next.js with https://mdxjs.com/ and if you know react it's great
Re:Netlify Drop by yosito on Wednesday November 17, 2021 @02:19PM (#29257601)
Oh, mdx looks really cool. Could be cool to build a data viz blog with that and OWID's grapher.
Re:Netlify Drop by triptych on Wednesday November 17, 2021 @05:25PM (#29259647)
A new player here is Astro --> https://astro.build/ It is surprisingly simple. Made by the folks who created snowpack.
Re:Netlify Drop by primozk on Friday November 19, 2021 @07:21AM (#29276447)
Intresting that they're switching from Snowpack to Vite then.
Re:Netlify Drop by kuon on Wednesday November 17, 2021 @12:49PM (#29256313)
I use zola now. With esbuild if I need to compile/bundle js.
Re:Netlify Drop by mr-karan on Wednesday November 17, 2021 @01:25PM (#29256823)
+1 for Zola

I wrote a post on my reasons for moving away from Hugo

https://mrkaran.dev/posts/migrating-to-zola/

Re:Netlify Drop by asimpletune on Wednesday November 17, 2021 @01:00PM (#29256461)
I second Zola. I use it with tailwind too.
Re:Netlify Drop by tomnipotent on Wednesday November 17, 2021 @03:24PM (#29258382)
I was completely confused with tailwind/headlessui when I tried out the Next.JS starter kit a few months ago. Then I slowly replaced my custom CSS with tailwindcss, and in about an hour only tailwind was left.

Something delectable about starting off "wtf is this stupid shit?" and ending with "it all makes perfect sense". Also heroicons.

Re:Netlify Drop by tdhz77 on Wednesday November 17, 2021 @01:08PM (#29256570)
Been playing around with Zola. Need to get tailwindcss hooked up.

I ran into an issue when building with netlify.

https://tylerharpool.com/netlify/

Re:Netlify Drop by asimpletune on Thursday November 25, 2021 @02:57PM (#29344465)
Tailwind doesn’t work natively w Zola, but because Zola is so fantastic it’s super easy to use a makefile or npm build script or something and effectively bolt on the integration quite easily
Re:Netlify Drop by marcus_cemes on Wednesday November 17, 2021 @12:41PM (#29256177)
I've heard good things about https://gohugo.io/ (written in Go) and https://elderguide.com/tech/elderjs/ (uses Svelte), I've never used them though
Re:Netlify Drop by andyford on Wednesday November 17, 2021 @03:00PM (#29258158)
Bet on Eleventy... the creator of it works for Netlify
Re:Netlify Drop by 50 on Wednesday November 17, 2021 @08:59PM (#29261236)
Alternatively, you can use something like https://blot.im/ - "...turns a folder into a blog... you put files inside your blog’s folder [and] they become blog posts."
Re:Netlify Drop by tomcam on Thursday November 18, 2021 @01:19AM (#29262513)
Please please contact me. I’m working on something that’s even easier. It will be open source so this is not a marketing pitch. But it’s quite near the point where I would like outside eyes on it.
Re:Netlify Drop by dimitrios1 on Wednesday November 17, 2021 @02:13PM (#29257518)
I'm trying it out now, but I am finding that Svelte Kit does this.
Re:Netlify Drop by schwartzworld on Wednesday November 17, 2021 @07:44PM (#29260831)
pandoc