diff --git a/docs/content/documentation/getting-started/installation.md b/docs/content/documentation/getting-started/installation.md index 89ead4e8f..14af71cfe 100644 --- a/docs/content/documentation/getting-started/installation.md +++ b/docs/content/documentation/getting-started/installation.md @@ -175,7 +175,7 @@ jobs: steps: - uses: taiki-e/install-action@v2 with: - tool: zola@0.17.1 + tool: zola@0.19.1 # ... ``` @@ -187,26 +187,26 @@ Zola is available on [the GitHub registry](https://github.com/getzola/zola/pkgs/ It has no `latest` tag, you will need to specify a [specific version to pull](https://github.com/getzola/zola/pkgs/container/zola/versions). ```sh -$ docker pull ghcr.io/getzola/zola:v0.17.1 +$ docker pull ghcr.io/getzola/zola:v0.19.1 ``` #### Build ```sh -$ docker run -u "$(id -u):$(id -g)" -v $PWD:/app --workdir /app ghcr.io/getzola/zola:v0.17.1 build +$ docker run -u "$(id -u):$(id -g)" -v $PWD:/app --workdir /app ghcr.io/getzola/zola:v0.19.1 build ``` #### Serve ```sh -$ docker run -u "$(id -u):$(id -g)" -v $PWD:/app --workdir /app -p 8080:8080 ghcr.io/getzola/zola:v0.17.1 serve --interface 0.0.0.0 --port 8080 --base-url localhost +$ docker run -u "$(id -u):$(id -g)" -v $PWD:/app --workdir /app -p 8080:8080 ghcr.io/getzola/zola:v0.19.1 serve --interface 0.0.0.0 --port 8080 --base-url localhost ``` You can now browse http://localhost:8080. > To enable live browser reload, you may have to bind to port 1024. Zola searches for an open > port between 1024 and 9000 for live reload. The new docker command would be -> `$ docker run -u "$(id -u):$(id -g)" -v $PWD:/app --workdir /app -p 8080:8080 -p 1024:1024 ghcr.io/getzola/zola:v0.17.1 serve --interface 0.0.0.0 --port 8080 --base-url localhost` +> `$ docker run -u "$(id -u):$(id -g)" -v $PWD:/app --workdir /app -p 8080:8080 -p 1024:1024 ghcr.io/getzola/zola:v0.19.1 serve --interface 0.0.0.0 --port 8080 --base-url localhost` #### Multi-stage build @@ -214,7 +214,7 @@ Since there is no shell in the Zola docker image, if you want to use it from ins exec form of `RUN`, like: ```Dockerfile -FROM ghcr.io/getzola/zola:v0.17.1 as zola +FROM ghcr.io/getzola/zola:v0.19.1 as zola COPY . /project WORKDIR /project diff --git a/docs/content/documentation/getting-started/overview.md b/docs/content/documentation/getting-started/overview.md index 35eeff563..a1c985ff4 100644 --- a/docs/content/documentation/getting-started/overview.md +++ b/docs/content/documentation/getting-started/overview.md @@ -19,11 +19,11 @@ Unlike some SSGs, Zola makes no assumptions regarding the structure of your site ### Initialize Site -> This overview is based on Zola 0.17.1. +> This overview is based on Zola 0.19.1. Please see the detailed [installation instructions for your platform](@/documentation/getting-started/installation.md). With Zola installed, let's initialize our site: -```bash +``` $ zola init myblog ``` @@ -38,7 +38,7 @@ You will be asked a few questions. For our blog, let's accept the default values (i.e., press Enter for each question). We now have a `myblog` directory with the following structure: -```bash +``` ├── config.toml ├── content ├── sass @@ -66,28 +66,15 @@ For reference, by the **end** of this overview, our `myblog` directory will have └── themes/ ``` -Let's start the Zola development server within the newly created `myblog` directory: +Change directory into the newly-created `myblog` directory. -```bash -$ cd myblog -$ zola serve -Building site... -Checking all internal links with anchors. -> Successfully checked 0 internal link(s) with anchors. --> Creating 0 pages (0 orphan) and 0 sections -Done in 13ms. - -Listening for changes in .../myblog/{config.toml,content,sass,static,templates} -Press Ctrl+C to stop - -Web server is available at http://127.0.0.1:1111 -``` +### Templates -If you point your web browser to , you should see a "Welcome to Zola" message. +We'll first create some templates to describe the structure of our site. -### Home Page +#### Home Page Template -Let's make a home page. To do this, let's first create a `base.html` file inside the `templates` directory. This step will make more sense as we move through this overview. +Let's make a template for a home page. Create `templates/base.html` with the following content. This step will make more sense as we move through this overview. ```html @@ -109,7 +96,7 @@ Let's make a home page. To do this, let's first create a `base.html` file inside ``` -Now, let's create an `index.html` file inside the `templates` directory. +Now, let's create `templates/index.html` with the following content. ```html {% extends "base.html" %} @@ -123,38 +110,9 @@ Now, let's create an `index.html` file inside the `templates` directory. This tells Zola that `index.html` extends our `base.html` file and replaces the block called "content" with the text between the `{% block content %}` and `{% endblock content %}` tags. -### Content Directory - -Now let's add some content. We'll start by making a `blog` subdirectory in the `content` directory and creating an `_index.md` file inside it. This file tells Zola that `blog` is a [section](@/documentation/content/section.md), which is how content is categorized in Zola. - -```bash -├── content -│ └── blog -│ └── _index.md -``` +#### Blog Template -In the `_index.md` file, we'll set the following variables in [TOML](https://github.com/toml-lang/toml) format: - -```md -+++ -title = "List of blog posts" -sort_by = "date" -template = "blog.html" -page_template = "blog-page.html" -+++ -``` - -> 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). - -### Templates - -Let's now create some more templates. In the `templates` directory, create a `blog.html` file with the following contents: +To create a template for a page that lists all blog posts, create `templates/blog.html` with the following content. ```html {% extends "base.html" %} @@ -164,7 +122,8 @@ Let's now create some more templates. In the `templates` directory, create a `bl {{ section.title }}