getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
13.44k stars 941 forks source link

[Feature Request] `zola init`: Give option to explicitly generate all built-in files while creating a new Zola project #1502

Open rootkea opened 3 years ago

rootkea commented 3 years ago

Hello!

Zola uses many built-in files like anchor-link.html, templates/atom.xml, sitemap.xml, 404.html, gist.html, youtube.html etc. along with user-created files. In the spirit of hacking (UNIX culture) please give an option to explicitly show/generate all those built-in files which Zola uses.

This will serve 2 purposes IMHO:

  1. This will serve well for folks who are interested in looking under the hood avoiding the guesswork
  2. If somebody wants to change something which is controlled by built-in file (e.g. anchor icon (silver chain)) then they don't have to dive into documentation to find the built-in filename in order to override it.

Think of how in UNIX the "built-in" default files are in /etc in plain view.

I'm not saying this should be default (I'm all for it though!) but at least an option (like -b/--built-in) to zola init would be great!

Thanks!

rootkea commented 3 years ago

All such files should have a comment at the beginning like this:

# This file has been generated by Zola
# You can edit this file to make the desired changes in site
Keats commented 3 years ago

I'm not sure about that. This means that if you want to use a theme, you need to figure out which files you need to delete. The built-in shortcodes are a mistake but some people are using them not and there's no maintenance needed on those so it doens't make sense to remove them. Let's keep it open to see if more people want that though

doamatto commented 3 years ago

I think this could be a smart thing to-do if it's not the default. It would be nice to have all the built-ins provided to tweak exactly (say the Atom feed) and then remove anything I didn't modify (say the RSS feed). In otherwords: