-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs next #858
Docs next #858
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few tweaks imo but looks good.
I'm wondering how this quickstart would look if Zola had a default theme like asked in #672
What do you think?
@@ -0,0 +1,202 @@ | |||
+++ | |||
title = "Overview" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we call that Quickstart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding default theme, yes, that would be great. Bulma (bulma.io) and Spectre (https://picturepan2.github.io/spectre/) are two ligthweight CSS frameworks. Maybe something based on them?
I called this section "Overview" to be consistent with other sections (they all have an "Overview" page) and this page gives an overview of Zola and how it works. Quickstart is also good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think we should use any CSS framework for a default theme. It is easy to write a theme without framework (I did one https://git.42l.fr/HugoTrentesaux/toucan) and it makes the template easier to read and modify and shows better the interest of native SASS compilation. I made a theme with Bulma (https://git.42l.fr/HugoTrentesaux/dunitrust_website) and I am currently thinking about a rewrite without it. If I had to choose a framework, I would rather go to https://www.knacss.com/ or https://purecss.io/. But this is really a question of taste. We can later develop themes for each of this frameworks, but for now, I prefer to stick to CSS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The toucan theme is great for showing SASS integration. I'll use it for the full tutorial. For the Quickstart, I'll remove Bulma and use toucan if it's the default. If not, it's probably ok to just use pure HTML because it's meant to just give a quick taste of Zola, not produce an actual site.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with removing Bulma/any css for the quickstart. It is not that important for a Zola quickstart.
|
||
## Zola at a Glance | ||
|
||
Zola is a static site generator (SSG), similar to [Hugo](https://gohugo.io/), [Pelican](https://blog.getpelican.com/), and [Jekyll](https://jekyllrb.com/) (for a comprehensive list of SSGs, please see the [StaticGen](https://www.staticgen.com/) site). It is written in [Rust](https://www.rust-lang.org/) and uses the [Tera](https://tera.netlify.com/) template engine, which is similar to [Jinja2](https://jinja.palletsprojects.com/en/2.10.x/), [Django templates](https://docs.djangoproject.com/en/2.2/topics/templates/), [Liquid](https://shopify.github.io/liquid/), and [Twig](https://twig.symfony.com/). Content is written in [Markdown](https://www.markdownguide.org/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content is written in CommonMark https://commonmark.org/
I think it's important to mention that since there are many flavours of Markdown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's very important. I'll update it to CommonMark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content is written in CommonMark, a strongly defined, highly compatible specification of Markdown.
|
||
SSGs use dynamic templates to transform content into static HTML pages. Static sites are thus very fast and require no databases, making them easy to host. A comparison between static and dynamic sites, such as WordPress, Drupal, and Django, can be found [here](https://dev.to/ashenmaster/static-vs-dynamic-sites-61f). | ||
|
||
If you are new to SSGs, please see the quick overview below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything below seem specific to Zola though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that people familiar with Hugo, Pelican, Jekyll, etc. would know about the basics (templates, Markdown, etc.), but I see your point. I'll change it to "To get a taste of Zola, please see the quick overview below.".
|
||
> This command must be run in the base Zola directory, which contains `config.toml`. | ||
|
||
If you point your web browser to [127.0.0.1:1111](http://127.0.0.1:1111), you should see a "Welcome to Zola" message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Markdown you can automatically have links like that by doing <http://127.0.0.1:1111>
instead of [127.0.0.1:1111](http://127.0.0.1:1111)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
|
||
> Note that although no variables are mandatory, the opening and closing `+++` are required. | ||
|
||
*sort_by = "date"* tells Zola to use the date to order our section pages (more on pages below). *template = "blog.html"* tells Zola to use `blog.html` in the `templates` directory as the template for listing the Markdown files in this section. *page_template = "blog-page.html"* tells Zola to use `blog-page.html` in the `templates` directory as the template for individual Markdown files. For a full list of section variables, please see the [section](@/documentation/content/section.md) documentation. We will use *title = "List of blog posts"* in a template (see below). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be more readable as a bullet list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make this a bullet list. Is italics ok for variable names and values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
|
||
### Templates | ||
|
||
Let's now create some templates. In the `templates` directory, create a `blog.html` file with the following contents: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've already created the homepage! Maybe "some more templates"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. Yes, "some more".
This is my first blog post. | ||
``` | ||
|
||
The *title* and *date* will be avaiable to us in the `blog-page.html` template as `{{ page.title }}` and `{{ page.date }}`, respectively. All text below the closing `+++` will be available to us as `{{ page.content }}`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text below will be available as HTML
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"All text below the closing +++
will be available as HTML in the {{ page.content }}
variable."? I'm currently using
for directories and template variables names (TOML variables are in italics). Should I change to bold for template variables?
@photong Do you have more changes coming? |
I'll make a few more changes this weekend. |
I'll need a few more days. |
No worries, take your time |
@photong let me know if I can help! |
Yes, please. Sorry for the radio silence. I've had some work/family things going on and don't have much free time. |
What can I do to help? |
I'll merge that for now to avoid potential conflicts. Thanks a lot |
* Update installation.md * Update cli-usage.md * Update installation.md * Update directory-structure.md * Update configuration.md * Update overview.md * Update section.md * Update page.md * Update section.md * Update configuration.md * Update page.md * Update section.md * Update page.md * Update shortcodes.md * Update linking.md * Update table-of-contents.md * Update syntax-highlighting.md * Update taxonomies.md * Update search.md * Update sass.md * Update index.md * Update multilingual.md * Update overview.md * Update pages-sections.md * Update pagination.md * Update taxonomies.md * Update rss.md * Update sitemap.md * Update robots.md * Update 404.md * Update archive.md * Update overview.md * Update installing-and-using-themes.md * Update creating-a-theme.md * Update netlify.md * Update github-pages.md * Update gitlab-pages.md * Updates. * Skip link checking for URL with prefix in config (#846) * Fix some doc changes * Section extra -> SitemapEntry (#850) * Update deps * Remove tutorial link. * Update overview.md * Update page.md * Update section.md * Update netlify.md * Update overview.md * Change some wording. * Update overview.md Co-authored-by: Tjeu Kayim <[email protected]> Co-authored-by: Vincent Prouillet <[email protected]> Co-authored-by: Stan Rozenraukh <[email protected]>
This is a new overview section for "Getting Started". It gives an overview of what Zola is and provides a very quick tutorial on how to achieve a basic blog. This will be very helpful for new users.