zola
zola copied to clipboard
zola init shoud prefill basic example template
During my startup with Zola i found it hard to get a good gripe with how this (or any) static site generator works. The docs are fairly complete but lack a "hand holding session" which guides you trough your first template setup.
There have been some earlier issues made (#534 , #466) but they focus on the docs side of things and what i found when i ran zola init
was a bunch of empty directories. And the current docs are imo a better reference for when you have a basic setup.
So what i'd like to propose is to prepopulate the directories with a super basic template setup:
-
/sass
-
main.scss
with a simple head styling setup
-
-
/static
- Zola logo image
-
/content
-
index.md
with some markdown examples and links to the docs
-
-
/templates
-
index.html
with:- Logo from
/static
- css include from
/sass
- content block render
- Logo from
-
-
/themes
-
.keep
so git won't remove this directory
-
During my setup i found this very useful: https://github.com/getzola/zola/issues/534#issuecomment-551065726 so we might simplify and edit this setup.
This would be a very basic example but we can incorporate some best practices too like presetting some meta tags.
I think this would help newcomers a fair bit. And maybe ask if this should be done during the init.
P.s. additionally asking if git should be initialized might also be an good idea
Note that the docs now have a quickstart section: https://www.getzola.org/documentation/getting-started/overview/
Overview might be a bad name for it though. The issue I have with putting some files in zola init
is that right now if you do zola serve
you get some indications on what to do to proceed. We could have the same in a template/markdown but I am not really sure how to organise that.
The getting-started page is indeed very helpful to start.
But currently when you do zola init
you'll get just a bunch of empty folders.
And even some basic setup files (like what you get when you run zola serve
) would be helpful. Even if just to browse trough and not to have the getting-started page side-by-side
can we get hugo like experience for creating new posts by using cli. like zola new --post hello.md
zola new --post hello.md
is not going to happen
sorry, What can we do to make it happen.
You can probably write a Makefile for that but let's not derail the issue. This isn't about zola new
Thanks for reply
I think an example website to walkthrough might be helpful to solve this problem — even though it was in the documentation, it took me a while to figure out how to generate a list of all of my posts — I feel like an example site that I could poke around in would have been helpful
Sent with GitHawk
How about this one: https://github.com/emdete/zolaschool - i just wrote down what i did to get an understanding of zola :)
I want to echo the original request to pre-fill the basic example when running zola init
.
I would be perfectly happy with the most basic *.html and _index.md files that are described in this awesome document. https://www.getzola.org/documentation/getting-started/overview/#initialize-site
I think it will help adoption because it will enable newcomers like me to start adding my content and seeing on my localhost'ed version (thanks for the awesome zola serve
)
Ideally the default template should have show the template needed for rendering each page