5 ms·
For the combination of Hugo and GitHub Pages, images are pretty effortless as well. For example, for a post with a path of `content/posts/post-title.md`: 1. Ad
by otras 4y ago
For the combination of Hugo and GitHub Pages, images are pretty effortless as well. For example, for a post with a path of `content/posts/post-title.md`:
1. Add the image at `content/posts/post-title/image-name.png`
2. Add markdown that references it, like ``
3. Build and push to main, and then the image is available in minutes at `https://<host>/posts/post-title/image-name.png https://<host>/posts/post-title/image-name.png`
Part of the reason I use Hugo is because it's so low friction — the hard part is the writing (and writing consistently), and keeping everything else easy is key.
- pcthrowaway 4y agoIs Hugo significantly different from Jekyll?
- otras 4y agoI'm not familiar with Jekyll, but if I recall correctly it's very, very similar. I just happened to pick Hugo at the start and haven't revisited the decision since, as it's tangential to the actual writing.
- ymolodtsov 4y agoHugo is much faster thanks to the fact it's written in Go. The approach by itself is the same. Also, seems to have one of the most active communities among blog-focused static generators.
- schemescape 4y agoHugo is distributed as a single binary, but Jekyll requires a Ruby environment (assuming you want to test locally).
- clintonb 4y agoI found that Hugo requires a shift in asset organization in the sense that assets are collocated with posts. If your post has three images, those images are in the same directory as the post markdown. Jekyll keeps assets separated. Your posts live in _posts. Your static assets live together in a different directory. I briefly experimented with switching from Jekyll to Hugo, but had too much invested—custom plugins and reliance on existing Jekyll plugins—in the Jekyll ecosystem to make the switch worthwhile.
- fmajid 4y agoHugo and Cloudflare Pages is basically free, but you need to find somewhere to host your search.
- nindalf 4y agoCloudflare workers?
- meto 4y agoI use Astro SSG and Cloudflare Pages. I use https://github.com/cloudcannon/pagefind https://github.com/cloudcannon/pagefind for search on my Astro setup. You can test the search functionality here https://tinyrocket.pages.dev/ https://tinyrocket.pages.dev/. From its repo: "Pagefind runs after any static site generator and automatically indexes the built static files. Pagefind then outputs a static search bundle to your website, and exposes a JavaScript search API that can be used anywhere on your site." Pagefind is cool!
- fmajid 4y agoI don’t want to force JavaScript onto my users and wrote my own full-text search for Hugo that is skinned with your Hugo theme for a seamless look (only the URL changes): https://GitHub.com/fazalmajid/fts5index https://GitHub.com/fazalmajid/fts5index Demo: use the search sidebar on blog.majid.info. But yes, what you describe is how search works on Sphinx-generated documentation sites and is quite impressive technology even before WASM.
- ymolodtsov 4y agoWell, true, but: 1. You might want to resize image if it's a photo 2. You might prefer a CMS to a plain code editor and then you need to use its uploader (both Forestry and NetlifyCMS aren't very seamless) 3. Try doing that on mobile And don't get me wrong, I use Hugo as well.
- rcarr 4y agoNetlify CMS is dead[1] after the core dev left the company, Forestry is also officially dead as of April this year. Netlify CMS got forked into StaticCMS and the team behind Forestry have created TinaCMS. After experimenting with both last week, I recommend the latter if you're building a blog with Astro and want a Git based CMS. [1]https://answers.netlify.com/t/is-this-project-dead/70988 https://answers.netlify.com/t/is-this-project-dead/70988
- faizmokhtar 4y agoTIL. There's a bug with the text editor where cursor will jump towards the last line. Really annoying and I think it's still not being fixed yet. Had to scour through Github issue to find the fix.
- sgallant 4y agoForestry/Tina founder here. Just want to say thanks for the shout out. So many good points in this thread.
- corobo 4y agoRemember to strip EXIF yourself if you're used to blogging software. At least don't upload any pics you've taken at home without stripping out the GPS info