14 ms·
Zola: A fast static site generator in a single binary
- CarVac 6y agoI use Zola for my project website. It's quite simple to use.
- jacques_chester 6y agoI tried Zola and liked the speed and simplicity. However support for its templating language is scarce and I'm not super keen on writing extensions in Rust. I have also looked at Hugo, which is determined to uphold evil and suffering by using Go's horrible templating minilanguage; Nanoc, which is cool but at times inscrutable and perhaps a little too obscure; now I'm playing with Jekyll. In short I am doing everything except actually writing.
- mroche 6y ago> by using Go's horrible templating minilanguage Any specifics that stand out to you? I haven’t done a lot with templating, but when I was investigating Hugo a while back it seemed straightforward enough. But that was at a high level.
- regus 6y agoI've used Go's templating a few times, most recently I used it in my own static site generator. For me the most difficult thing about it is that it is another language grafted on top of Go, and it does not always do what you expect it to do. The documentation is hard read and not always clear on how things are supposed to work. For example: - If I pass in a struct that contains a map of structs, how exactly can I access this data? - How can I use the boolean output of a function within an if statement? - How do the if statements even work? "eq"? "=="? What is the correct syntax here? I ended up losing a lot of time having of to wrestle with the templating engine because it often would not behave the way I expected it to.
- mroche 6y ago> For me the most difficult thing about it is that it is another language grafted on top of Go, and it does not always do what you expect it to do. ... Ah, I see. At my first glance I thought it was just normal Go syntax. I’ll have to look into this more, thanks!
- dagmx 6y agoI've been using Gatsby recently and it's been pretty good, as long as you're not opposed to node and JS.
- smt88 6y agoWe're looking at Gatsby now. We don't care about the language used to generate a site as long as it doesn't send silent errors into the finished result (always a concern with JS...) What else did you try before landing on Gatsby?
- egeozcan 6y ago(not op) I personally love next.js but I guess it'd bee too flexible for some.
- cercatrova 6y agoI'd personally try NextJS, it's a lot easier than Gatsby. This is the main article that turned my mind after trying both: https://jaredpalmer.com/gatsby-vs-nextjs https://jaredpalmer.com/gatsby-vs-nextjs
- dagmx 6y agoI tried Jekyll, Hugo and Pelican. Neither sat as well with me personally as Gatsby. I like only having to worry about a single language stack, and I can use typescript with Gatsby which negates some of my misgivings with js. Plus I can use react paradigms everywhere which is nice.
- strogonoff 6y agoUsing react-static here. Has some issues and not always free of regressions, but also not as bloated as say Gatsby. If you write React components in a way that leaves them functioning when statically rendered, I think it is relatively straightforward to roll your own generator that calls React’s built-in renderToString() on top-level app component during HTML generation, and bundles basic JS that does hydrate() in case user agent happens to have JS enabled (those two methods do a lot of the heavy-lifting). Devil’s in the details, of course, but have been low-key looking into that lately.
- ibraheemdev 6y agoWhat sort of templating support did you find to be scarce with Zola?
- dangoor 6y agoWhile I'm not a fan of Go's template syntax, I do appreciate that there are a bunch of themes available for Hugo, and now a pretty easy system for working with them (modules). I like not having to spend a lot of time on the formatting to get something decent.
- esperent 6y agoI went from Jekyll to Hugo, because, although Jekyll was great at first, as the numbers of pages grew it for slower and slower until it was taking about a minute to compile. Switched to Hugo and compilation takes about 2s for the same site. On the other hand, yeah, there's lots of other frustrations - besides the weird templating stuff, they have one of the least friendly and helpful dev teams I've come across when I've occasionally asked a question on their forum.
- southerntofu 6y ago> support for its templating language is scarce Hello, i would say there's a few missing template features in Zola (especially hashmap literals/functions) but i don't find it scarce. Could you elaborate with your painpoints so they can be addressed for others as well? Zola is constantly evolving for the better, and the community forums are also a good place to exchange feedback/criticism
- jacques_chester 6y agoThe Tera template language is not in wide use, so multi-language integrations with HTML were non-existent when I checked. That's tremendously inconvenient.
- southerntofu 6y agoWell there is only a single Rust implementation for the moment, but tera templates are really similar to jinja (only difference i know is usage of named arguments in filters/functions). If i may, what's your usecase?
- jacques_chester 6y agoJust an ordinary static website. Some standalone pages, some blogging posts. I can take another look at Zola and see if I've changed my mind -- the speed really is excellent.
- southerntofu 6y agozola should be really fit for that, let us know if you encounter any issues
- Keats 6y agoYou can compile Tera to WASM if you want but that's the only solution if you want to use Tera templates outside of Rust. As mentioned, it is _extremely_ similar to Jinja2 in Python, a good number of Jinja2 templates should be valid Tera and vice-versa.
- regus 6y agoI though this was about the wedding registry site at first. Anyway, I liked this line from the Github: > Hugo gets ehh for the template engine because while it is probably the most powerful template engine in the list (after Jinja2) it personally drives me insane, to the point of writing my own template engine and static site generator. Yes, this is a bit biased. This seems to be the life cycle of static site generators (SSG). It works at first, but you end up wanting to design your own custom SSG once you run up against something that goes against your mental model of how things should work. I did this exact thing when I got frustrated with Hugo. I made my own custom SSG in order to create my blog. The other thing that tends to happen with SSGs is that it can be a lot more fun to play around with the tech than actually writing blog posts! If you're interested you can read here to see how I made an SSG for my blog: https://joelregus.com/posts/blog/index.html https://joelregus.com/posts/blog/index.html
- bachmeier 6y agoThe problem I see with using a SSG is that (a) it probably doesn't do what you want, combined with (b) it's designed to automate specific workflows rather than to make customization easy. There are obviously some cases for which someone else's automated workflow is useful. I'm not sure how often the tradeoff is worth it if you are proficient with a programming language that you can use to automate the workflow yourself.
- patrickmcnamara 6y agoI think I’m just going to write a HTTP server for my website in Go, download the entire website with wget and host that statically. At least that way I can have any feature I want.
- egeozcan 6y agoWhy not varnish then?
- patrickmcnamara 6y agoSimply because a lot easier to host static files than it is to host a web server binary that has to be executed. I can just upload to GitHub Pages or AWS S3 and let them worry about the HTTP caching, TLS certs, upgrade to HTTP/3, etc.
- smartmic 6y agoJamstack lists 322 static site generators plus there are probably many homemade solutions using standard unix tools etc. I am wondering if there are any unique selling points not yet covered by less than a dozen projects. Fast compilation and zero dependencies seems no fit to that category. Do not get me wrong, I really appreciate the creativity and variety of open solution, I am just wondering what it needs to get highly ranked on HN. In this case, it is because of the "Rust" keyword?
- SiempreViernes 6y agoI think its because of the javascript problem: every second user of a product gets invested enough in the problem space they can't resist making just one tiny modifications. Then six weeks later there they are, editing a video for the homepage of their own project that does the same as the first product but in "their own voice".
- ibraheemdev 6y agoWhat "Rust" keyword? The word "Rust" is not included in the title, or anywhere on the home page.
- endisneigh 6y agohttps://www.getzola.org/documentation/getting-started/overview/ https://www.getzola.org/documentation/getting-started/overvi... You're right that it's not mentioned, but Zola is written in Rust. Perhaps others already knew of this?
- ibraheemdev 6y agoI really doubt it. (sigh, even if you don't mention Rust anywhere, people always bring this up)
- southerntofu 6y ago> any unique selling points Super fast. Simple for most usecases. Integrated feed support (Atom). Good-enough translations system. These points may be true for other SSGs as well, but they're personally why i ended up using zola.
- lqet 6y agoI see your single binary static site generator and raise you a single Makefile static site generator: https://github.com/patrickbr/hagel https://github.com/patrickbr/hagel
- gadders 6y agoWhat is stopping someone writing an offline GUI for a static site generator? I think that would help a bit with non-technical adoption.
- laurent123456 6y agoIf you can run a local web server, WordPress has a static site generator: https://wordpress.org/plugins/simply-static/ https://wordpress.org/plugins/simply-static/
- cujo 6y agoAnd if your wp site is fairly large be prepared to go take a nap while it runs. I just installed this plugin on a larger site and it's still churning 30 minutes in. On the flip side, we run a custom cms with hugo as the SSG on a much larger site and it builds and deploys in under a minute. WP has it's uses, but speedy sites are not a focus.
- marc_io 6y agoWP2Static is another option. https://wp2static.com/ https://wp2static.com/
- southerntofu 6y agoNothing is actively stopping it. In fact a lot of people would strongly appreciate it, maybe even contribute. I would really love to see something like that: - local-first CMS with a strong emphasis on folders/files - multiple DVCS integrations (git, mercurial, pijul) with commit signatures (PGP) - support for forge APIs and email-based workflow to simplify the cooperative PR/MR/patch process - strong translations support, to see at a glance missing/outdated translations There's been some work in this area, but netlify is really complex and is not meant to be selfhosted. And in any case these CMS overlays for SSGs end up making their own conventions that SSGs then have to comply with. It would be interesting to see an alternative approach where a CMS-as-a-library can be adapted to support any kind of SSG. Some complicated stuff to deal with when building a content editor for SSGs: - internal and relative links don't have the same semantics across SSGs, and don't point to the same place depending on the webroot - content may contain macros/shortcodes, the local editor needs to be aware of that in order to produce meaningful output - taxonomies and parenthood relationships also vary greatly from one implementation to another
- alberth 6y agoTangential Related: how do people use static site generators (SSG) when they have more than 1 team member who's publishing site updates? Are they having the SSG trigger off of a git push?
- kylenoteboom 6y agoMany people will have a Github Pages or GitLab Pages setup where their static website is hosted by Github or GitLab and generated by their respective continuous integration tools to automagically update the website upon pushing to the repository.
- deleted 6y ago[deleted]
- ibraheemdev 6y agoYup, most SSGs have pretty good support for GitHub actions or other CI tools.
- stusmall 6y agoYup, on a merge into a release branch. Netlify makes that workflow a breeze to set up. Zola also has pretty easy integration with netlify.
- digikata 6y agoZola has instructions for how to set up git -> site update automation to Netlify or Vercel through GitHub or GitLab. I setup that process to try that out on both for a website for a local org I volunteer for and it was quick to get going. Not sure how easy a non-technical user might find updates though.
- harlanji 6y agoDo you mean in the case of near-simultaneous commits? Continuous Integration (CI) can be setup to build each commit or abandon a build if a newer commit comes in, and then the deploy step would use the latest build available.
- axyz 6y agoZola seem the most popular static site generator that allows you to generate a website without any JS bundle without using some strange hack. This is the way I firstly stumbled upon it as I was looking for a fast way to generate a fully static site with the advantages of a generator and none of the overheads... It may be limited for certain use cases but I think it would be my first choice for editing a static site without JS
- cercatrova 6y ago> Zola seem the most popular static site generator that allows you to generate a website without any JS bundle without using some strange hack. I'd say Gatsby or NextJS are more popular due to being written in JS. They can both produce zero JS websites.
- ibraheemdev 6y agoI doubt people who want to avoid javascript will use a javascript based static site builder.
- cercatrova 6y agoSee my other comment [0], it seems only JS based ones use stuff like composition of content while most others are template-based, which is not as powerful. [0] https://news.ycombinator.com/item?id=26358978 https://news.ycombinator.com/item?id=26358978
- ThePadawan 6y agoI made that choice, based on two completely separate wishes: - "I want my visitors to be able to view this static page without enabling JS" and - "I already know React, I might as well just write this in TSX"
- mhd 6y agoIsn't that a bit like saying that people who want small web pages wouldn't want to use hugo, as it's a 60 megabyte binary?
- imjasonmiller 6y agoI'm using Hugo, but was looking at Zola earlier today. It's great to see that they're looking to support next-generation image formats. They're not in Hugo, as a requirement seems to be that dependencies are all fully written in Go, no use of bindings. It's a sensible decision from a maintenance perspective, but still unfortunate. What Hugo does have, and for which I couldn't find an alternative for in Zola, is something akin to `esbuild` that can build and bundle JavaScript and TypeScript. Is there some way to do this with Zola or does one need to setup a separate build step for that with e.g. `swc`?
- Keats 6y ago> What Hugo does have, and for which I couldn't find an alternative for in Zola, is something akin to `esbuild` that can build and bundle JavaScript and TypeScript. Is there some way to do this with Zola or does one need to setup a separate build step for that with e.g. `swc`? Not right no. My issue with that is usually people that want a JS build system will want webpack, loaders and other JS dependencies to also work. You end up just executing webpack command from the SSG while the user could just run it themselves, without a layer.
- imjasonmiller 6y agoAh, a familiar name! Thank you for taking the time to answer. I'll look into it, maybe I can get it to work.
- pdimitar 6y agoI keep trying to return to Zola but it seems I have to do much of the work there myself. It's kind of the other end of the spectrum for me: too much freedom! I wouldn't mind some convention-over-configuration there. Also the templating language isn't at all intuitive to me but it might be just me being stupid. But I also want multi-lingual articles and article revisions so maybe Zola is not for me. I absolutely love it how lightning fast it is, though, and I am sad that I still couldn't bring myself to learn it. These days my bandwidth (and desire) to invest fully in a new tool is at minimal values. :( I think Zola would get much more traction if it had several typical cases covered in the tutorials: not only blogs but simple company pages, semi-informal technical docs, and the like. Can somebody recommend something as fast as Zola but with more features -- or just it being much easier to learn? And don't say Hugo; it is really easy to start with but the moment you get off the beaten path you are looking at days of effort to modify your site.
- southerntofu 6y ago> I wouldn't mind some convention-over-configuration there. I strongly agree. I started some of that with my theme https://tildegit.org/southerntofu/zola-water https://tildegit.org/southerntofu/zola-water and i'd be pleased to cooperate on "standard" conventions across themes so we can swap themes easily without having to reconfigure/reorganize everything. > But I also want multi-lingual articles and article revisions so maybe Zola is not for me. zola supports translations, though the details of that are being reworked. Revisions are not supported so far, but is technically possible by building your site in a specific output folder for every commit (or something along those lines). Linking across revisions, as it is not supported by zola would require either an external component (eg. in an iframe) or a build script that rewrites output pages to be aware of their revisions. Though implementing a simple git interface to zola to expose commit names involving a specific page would not be hard (managing the different revisions as single pages, like is done for translations, would be more complex). > I think Zola would get much more traction if it had several typical cases covered in the tutorials Agreed. There is definitely a lot to improve on the website/documentation. If you have a more detailed proposal and/or would like to get involved, feel free to talk about it in the community forums https://zola.discourse.group/ https://zola.discourse.group/
- stusmall 6y agoIn the past I wrote a couple sites using jekyll and really liked it. For my personal site I decided to give zola a go on a whim. I was pleasantly surprised by how complete and easy to use it was. It had features for image manipulation built in that I had to get from a meh plugin for jekyll. I ended up reworking one of the sites I wrote in Jekyll in Zola on the next update. It was an art portfolio site so I leaned on these features heavily. It ended up being a pretty quick weekend rework and made the code base much easier to work in.
- cercatrova 6y agoI wish there were a way to use static site generators written in languages other than JS but still use JS features like JSX. I really dislike most templating languages because they are just hacks over a real programmatic way of composing content (via functions that return content). In templating languages, it's more like straight substitution of content. It's similar to macros vs actual functions in something like C++. Sure, you could write everything in macros but why not use actual composition?
- deleted 6y ago[deleted]
- jeromenerf 6y agoI use Hugo for projects, it’s plenty powerful and easy to automate with data. For personal stuff, I use org mode. It’s more free form and provides just enough publishing features. SSGs seems like popular bikeshedding matter.
- pdimitar 6y agoI tried Org Mode the other day and gave up when Emacs didn't allow me to edit an in-place SQL fragment with some cryptic error that you can't edit it in-line, so had to use a keybind to open a new buffer in order to be able to edit something that in Markdown is as as simple as triple backticks, the word "sql", the SQL code, and then another block of triple backticks. Am I missing something? Org Mode is always so glorified yet it failed a pretty basic use case for me.
- jeromenerf 6y agoI do edit inline code and I have never had this issue. It is indeed a basic feature that should just work. Most probably a plug-in bug. Emacs, org and Babel are great to write “live” documents.
- pdimitar 6y agoI am using it with Spacemacs so there's likely something there. I love Emacs but after ~18 years with it it's basically a death by a thousand paper cuts. It gets tiring to always have to fight for some basic features. :(
- natrys 6y agoI suspect I encountered the same bug (in vanilla Emacs). It seems in Emacs 27 they introduced support for sql-indent-mode[1][2] which is not shipped by default but is in elpa. However there is a hook that checks if that package is installed, if so then loads it by default. It seems when not installed, somehow said hook messes things up in org-mode. Thanks to some investigative work from Doom Emacs people[3][4], I have found that my issue was fixed by simply installing the sql-indent package. Of course you would need to make sure these settings are set to true to enable tab acting according to native mode in source code blocks: (setq org-src-tab-acts-natively t) (setq org-src-preserve-indentation t) (setq org-src-fontify-natively t) And yes, I wasn't amused by this. I had another problem with shell mode indentation in org source blocks as well. That said, while the lack of cohesion due to decentralised nature of Emacs development occasionally surfaces like this, I think it would be unfair to not mention that org-mode when not buggy - which is more often than not - makes a lot of great features accessible. For instance, it automatically connects to Postgres, runs my query fragment, and populates an org-mode table (which are awesome) with the resulting output - I find this feature invaluable. Oh and if you are a Spacemacs user, perhaps give Doom Emacs a try. [1] https://github.com/alex-hhh/emacs-sql-indent https://github.com/alex-hhh/emacs-sql-indent [2] https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.27#L1141 https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.2... [3] https://github.com/hlissner/doom-emacs/issues/3787 https://github.com/hlissner/doom-emacs/issues/3787 [4] https://github.com/alex-hhh/emacs-sql-indent/issues/96 https://github.com/alex-hhh/emacs-sql-indent/issues/96
- xemoka 6y agoI run a few (well, one published, one in the works, a couple one-offs for student showcases) websites built with Zola. It's a great, little, simple piece of software. What I like: * Already supports the tooling I enjoy → SCSS out of the box, django/jade-like template engine (Terra, its sister project), markdown w/ TOML frontmatter * Fast → build times are almost instant, dev server builds to memory and does live-reload * Gets out of your way → it doesn't do more than it can, yet provides enough to work * Builds a search index for client-side searching if needed * Single Binary → I can pass the executable around with the repo and installation and environments are not an issue (ruby and python are painful for part-time developers it seems, at least with my non-developer academic peers). I like that it provides a simple base to build on. I have one site that uses webpack to generate bundles for a couple JS files to allow for modern JS (babel) → all I have to use webpack for is JS, Zola handles the rest. I migrated our Django theme for our previous site in an afternoon. I've found that those I work with often don't really understand how formatting in a CMS will apply in the published result, and often have to go back in and edit their pages for conformance → If I have to touch it anyway, I'd rather do it in markdown myself, something I enjoy using. I have students/interns who have picked up markdown faster than any other markup or CMS. I've tried mezzanine [^meh] and wagtail [^excellent, but heavy for our brochure-ware] in python, wordpress is a pain [^either too flexible, or not flexible enough, research interns don't easily see how complex theme interactions occur] and some others like cockpit [^neat but flexible to a fault, yet too rigid for how free-form folks want to interact with it]. Markdown is translatable, and usable in other tools: it's a great common denominator with a very low bar for entry. Students continue to use it after first interacting with it on these projects after they've left. What I'm missing: * a way to build from an API endpoint instead of markdown, i.e.: point to an endpoint to get the section list, build children as pages. Then I could use content from a postgrest instance, or build it from a list of remote markdown files... (no, I haven't really thought this through very well) YMMV.
- ibraheemdev 6y ago> a way to build from an API endpoint instead of markdown Sounds like remote content[0] might work for that? 0: https://www.getzola.org/documentation/templates/overview/#remote-content https://www.getzola.org/documentation/templates/overview/#re...
- mitchmindtree 6y agoOn the topic of SSGs, is anyone using styx[1]? As a keen NixOS user, I love the idea of configuring my site with nix and embedding nix exprs in markdown. However, I'm unsure whether the project is still active, or if the whole thing was more of an experiment. The repo[2] seems a little quiet, but the documentation is extensive and great considering! I wonder if the author just considers it complete? Curious to here experiences from anyone who has had a play. [1]: https://styx-static.github.io/styx-site/ https://styx-static.github.io/styx-site/ [2]: https://github.com/styx-static/styx/ https://github.com/styx-static/styx/
- swayvil 6y agoI do my site with .md files and ParseDown. And a smidge of PHP and CSS. It's mind bogglingly robust and manageable. I've tried several "simple CMS" packages. This is way better.
- southerntofu 6y agoHello, i'm not the creator/maintainer but i contribute to zola, and i'm happy to answer questions and receive feedback/criticism. In particular for the next release, we're currently talking about making paths/links more consistent across zola [1], reworking the translations/internationalization system [2], and improving the README. [3] [1] https://github.com/getzola/zola/issues/977 https://github.com/getzola/zola/issues/977 [2] https://zola.discourse.group/t/rfc-internationalization-system-rework/546 https://zola.discourse.group/t/rfc-internationalization-syst... [3] https://github.com/getzola/zola/pull/1373 https://github.com/getzola/zola/pull/1373
- vyuh 6y agoA few months ago I tried my hand at this because it had some better defaults. Also, I didn't like camel case variables everywhere in Hugo. Then, I gave up when I realised that Zola does not even allow YAML config files. Nit picks everywhere..
- southerntofu 6y agoHey there's some healthy skepticism about YAML on zola's side. In particular, the maintainer believes encouraging people to use a broken/dangerous (in terms of remote-code execution in some implementations) serialization format is not a good idea, even though Rust YAML parser is safe from that. There's also a concern for maintenance: maintaining the zola codebase to support more serialization formats is more work. If more contributors get involved regularly, it will be less of a problem. In fact, zola started supporting YAML frontmatter for compatibility reasons lately, but it's explicitly stated in the docs this is not the recommended/supported way to do things.
- bookmarkable 6y agoMy input as a former technologist turned marketing guy over the years - where is a decent SSG (perhaps like Zola) with page building drag and drop tools like a Wix or a Squarespace? I'd love to move our site off of Wix - and have full control when needed and work offline before publishing pages - but inevitably you dive back into code or the guts of database queries once you leave these WYSIWYG tools. Between Wix and Zola is an opportunity, in my opinion.
- cpach 6y agoThere are starting to appear lots of interesting tools in that space. See e.g. https://www.sanity.io/ https://www.sanity.io/ or https://www.contentful.com/ https://www.contentful.com/
- badsectoracula 6y agoSome time ago i found about Publii which is a desktop-based static site CMS with a mostly WYSIWYG editor (i write "mostly" because you do not edit the text directly in the site like you'd do in, e.g. iWeb, but you still use a rich text editor). It works as a desktop application (it is actually written in Electron), you do all editing locally and then you upload the files to a server (you can do that either manually or using its automatic uploading functionality which -from what i can see in my installation- supports FTP/FTPS, SFTP, Amazon S3, GitHub Pages, GitLab, netlify and Google Cloud). The sites are stored in folders with an SQLite database for most stuff and media files in their own folders. Though in terms of customization is rather lite. There is theme support with custom themes so i guess it is possible, it just looks like a baklava of webdev layers to me that i didn't want to bother with. Most themes do seem to provide a tiny bit of customization though. I made a blog with it and so far the main limitation is that i don't feel there is much i have to write, not the software :-P. [0] https://getpublii.com/ https://getpublii.com/ [1] http://runtimeterror.com/devlog/ http://runtimeterror.com/devlog/
- chillfox 6y agoRapidWeaver [1] is a WYSIWYG SSG for Mac. I used it a few years ago and it was pretty good back then. [1] https://www.realmacsoftware.com/rapidweaver/ https://www.realmacsoftware.com/rapidweaver/
- bob1029 6y agoDefinitely going to give this one a spin. I was looking around yesterday for a static blog generator and was frustrated with the complexity of many offerings.
- freedomben 6y agoThis looks really neat. The first thing I look for now after using several different static generators is how they handle images (and other static media, but images are most important since they need optimizing). I'm going to give this project a try! Next.js is wonderful, but I've had a crazy amount of pain because `<Image>` can't be used if you want to export to purely static (which I strongly prefer), and other options seem to have died (if anybody has one they use or maintain, please let me know!!). I've ended up rolling my own solution in bash that uses Squoosh to crank out set sizes and the like, but it's gross and not useful for others that aren't me, which is a problem when I have to collaborate. Anyway, thanks for the project!
- cambalache 6y agoI am not a professional front-ender. I will tell you my experience with all the SSG I have tried. OK,cool, let's read the documentation.OK , first example, clone this template and blah blah. The template is always like 4 versions behind (the same for 90% of the templates that can be downloaded). Even doing the most simple change it is a pain,it almost feels black-boxy. At that moment I gave up and go back to simple JS/CSS with React if needed. Among that lot the one which seems the sanest is Next and even then it is too opinionated for my taste.
- mdpopescu 6y agoOut of curiosity, why is it "endblock content" everywhere but the base.html page (where it's just "endblock")?
- southerntofu 6y agoI believe the two are correct syntax and there's no specific reason to use one over the other.
- possibleworlds 6y agoNo mention of Eleventy [1] here. Definitely worth a look, my personal view is it nails the balance of simplicity, power and flexibility. I have used it for all sorts of projects, from marketing websites to quick client docs and presentations. For non-trivial usage in a project see google web.dev [2]. [1] https://www.11ty.dev https://www.11ty.dev [2] https://github.com/GoogleChrome/web.dev https://github.com/GoogleChrome/web.dev
- mtm7 6y agoI tried both Eleventy and Zola along with a few other SSGs for my blog [1], and ended up going with Eleventy. I love that it's flexible with my directory structure, that I can write shortcodes with JavaScript (without adding JS to the client), and preview my site from my phone without any extra setup. (It gives you a URL when you start up the development server! Magic!) It was almost trivial for me to add a social sharing image generator for my posts. [2] That's something I never thought my SSG would be able to do. Definitely check it out if you're looking at static generators. Zola too, which is amazing in its own right. [1] https://mtm.dev/static https://mtm.dev/static [2] https://mtm.dev/eleventy-social-sharing-images https://mtm.dev/eleventy-social-sharing-images
- benatkin 6y agoThe main template engine 11ty suggests is Nunjucks, which requires you to trust the template author. https://www.11ty.dev/docs/layouts/ https://www.11ty.dev/docs/layouts/ https://mozilla.github.io/nunjucks/templating.html#user-defined-templates-warning https://mozilla.github.io/nunjucks/templating.html#user-defi... Zola uses a similar template language called Tera that seems to be a lot safer.
- wheybags 6y agoAfter getting sufficiently pissed off at jekyll (I'm not a ruby developer, so dealing with ruby related tooling is a pain every time I need to) I realised that what I wanted was literally just a basic templating engine. I already use one of those pretty often - the c preprocessor. My personal website is just cpp macros / #includes now, and I honestly find it much more productive. Probably not to everyone's tastes though :D
- loughnane 6y agoI just got my site up with hugo... must resist the urge to poke around with another ssg
- rychco 6y agoI really like Zola and have been using it for my personal site for a few months now. I tried to use Hugo, which admittedly seems more capable, but found it to be too complicated for my use case. I was up and running with Zola, including my own CSS, site layout, and posts ported from a custom SSG within 2ish hours. I’ll continue to use it, it’s a very pleasant experience so far.
- deleted 6y ago[deleted]
- exporectomy 6y agoThe name sounds like the Chinese phrase "zou le" which means something like "walked away" or "gone". Kind of appropriate since it's supposed to get out of you way. There are a lot of homonyms with English and Chinese that you won't get from typical dictionary searches because even the romanized spelling is completely different.
- synergy20 6y agomkdocs is pretty easy and simple too: pip install --user mkdocs cd your-markdown-directory/../ echo 'site_name: mysite' > mkdocs.yml ln -s your-markdown-directory docs mkdocs build && mkdocs serve # if you don't like the default theme: mkdocs build -t readthedocs && mkdocs serve No you do not need add special meta info into your markdown files, any regular markdown files will work just fine.