Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/getzola/zola:
  Using cargo install (getzola#2218)
  Documented CNAME file for custom domains (getzola#2219)
  Clarifying documentation around themes. (getzola#1541)
  remove libsass from build instructions (getzola#2217)
  Add gburghoorn example to EXAMPLES.md (getzola#2212)
  Complete output for get_taxonomy in the documentation (getzola#2204)
  Update themes gallery (getzola#2203)
  Fix typo in page.md (getzola#2192)
  docs: update expired Documents  documentation (getzola#2185)
  Update themes gallery (getzola#2180)
  Update deploy action to the latest version and make version consistant (getzola#2173)
  Update docs
  Update snap
  minor updates to overview docs (getzola#2158)
  Update documentation for multilingual use of taxonomies (getzola#2157)
  Update Metainfo (getzola#2148)
  • Loading branch information
theowenyoung committed Jun 4, 2023
2 parents 507b655 + 0f819fc commit 4cdd651
Show file tree
Hide file tree
Showing 90 changed files with 1,446 additions and 473 deletions.
1 change: 1 addition & 0 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@
| [castor](https://castorisdead.xyz) | https://github.com/whoisYoges/website |
| [mrkaran](https://mrkaran.dev) | https://github.com/mr-karan/website |
| [giuseppedepalma](https://giuseppedepalma.com/) | https://github.com/giusdp/giuseppedepalma.com/ |
| [Gijs Burghoorn](https://gburghoorn.com) | https://github.com/coastalwhite/gburghoorn.com/ |

2 changes: 1 addition & 1 deletion docs/content/documentation/content/multilingual.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ summary = "My blog"
```

Note: By default, Chinese and Japanese search indexing is not included. You can include
the support by building `zola` using `cargo build --features search/indexing-ja --features search/indexing-zh`.
the support by building `zola` using `cargo build --features indexing-ja --features indexing-zh`.
Please also note that, enabling Chinese indexing will increase the binary size by approximately
5 MB while enabling Japanese indexing will increase the binary size by approximately 70 MB
due to the incredibly large dictionaries.
Expand Down
10 changes: 5 additions & 5 deletions docs/content/documentation/content/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ an underscore (`_`) or a dash (`-`) will use that date as the page date, unless
in the front matter. The page name will be anything after `_`/`-`, so the file `2018-10-10-hello-world.md` will
be available at `[base_url]/hello-world`. Note that the full RFC3339 datetime contains colons, which is not a valid
character in a filename on Windows.
This behavior can be disabled by setting `slugify.paths_keep_date` to `true` (the default is `false`). Note that a `_` separating the date would be slugified into a `-` with the default value for `slugify.paths` of `"on"`.
This behavior can be disabled by setting `slugify.paths_keep_dates` to `true` (the default is `false`). Note that a `_` separating the date would be slugified into a `-` with the default value for `slugify.paths` of `"on"`.

As you can see, creating an `about.md` file is equivalent to creating an
`about/index.md` file. The only difference between the two methods is that creating
Expand All @@ -49,17 +49,17 @@ If you want URLs containing non-ASCII characters, `slugify.paths` needs to be se

The output path for the page will first be read from the `slug` key in the page's frontmatter.

**Example:** (file `content/zines/mlf-kurdistan.md`)
**Example:** (file `content/zines/élevage-chèvre.md`)

```
+++
title = "Le mouvement des Femmes Libres, à la tête de la libération kurde"
slug = "femmes-libres-libération-kurde"
title = "L'élevage de chèvres, la carrière alternative de tous dévelopeurs'"
slug = "élevage-chèvre-carrière-alternative"
+++
This is my article.
```

This frontmatter will output the article to `[base_url]/zines/femmes-libres-libération-kurde` with `slugify.paths` set to `"safe"` or `"off"`, and to `[base_url]/zines/femmes-libres-liberation-kurde` with the default value for `slugify.paths` of `"on"`.
This frontmatter will output the article to `[base_url]/zines/élevage-chèvre-carrière-alternative` with `slugify.paths` set to `"safe"` or `"off"`, and to `[base_url]/zines/elevage-chevre-carriere-alternative` with the default value for `slugify.paths` of `"on"`.

### Path from filename

Expand Down
25 changes: 13 additions & 12 deletions docs/content/documentation/content/taxonomies.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,20 @@ taxonomies = [
**Example 2:** (multilingual site)

```toml
# These taxonomies go in the main section
taxonomies = [
{name = "director", feed = true, lang = "fr"},
{name = "director", feed = true, lang = "eo"},
{name = "director", feed = true, lang = "en"},
{name = "genres", feed = true, lang = "fr"},
{name = "genres", feed = true, lang = "eo"},
{name = "genres", feed = true, lang = "en"},
{name = "awards", feed = true, lang = "fr"},
{name = "awards", feed = true, lang = "eo"},
{name = "awards", feed = true, lang = "en"},
{name = "release-year", feed = true, lang = "fr"},
{name = "release-year", feed = true, lang = "eo"},
{name = "release-year", feed = true, lang = "en"},
{name = "director", feed = true},
{name = "genres", feed = true},
{name = "awards", feed = true},
{name = "release-year", feed = true},
]

[languages.fr]
taxonomies = [
{name = "director", feed = true},
{name = "genres", feed = true},
{name = "awards", feed = true},
{name = "release-year", feed = true},
]
```

Expand Down
10 changes: 7 additions & 3 deletions docs/content/documentation/deployment/github-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: checkout
uses: actions/[email protected]
- name: build_and_deploy
uses: shalzz/zola-deploy-action@v0.16.1-1
uses: shalzz/zola-deploy-action@v0.17.2
env:
# Target branch
PAGES_BRANCH: gh-pages
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: 'checkout'
uses: actions/[email protected]
- name: 'build'
uses: shalzz/zola-deploy-action@v0.16.1
uses: shalzz/zola-deploy-action@v0.17.2
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: .
Expand All @@ -92,7 +92,7 @@ jobs:
- name: 'checkout'
uses: actions/[email protected]
- name: 'build and deploy'
uses: shalzz/zola-deploy-action@v0.16.1
uses: shalzz/zola-deploy-action@v0.17.2
env:
PAGES_BRANCH: master
BUILD_DIR: .
Expand Down Expand Up @@ -163,3 +163,7 @@ If your site is using a custom domain, you will need to mention it in the `ghp-i
`ghp-import -c vaporsoft.net -n public` for example.

Credits: The Travis-CI section of this page is based on the article https://vaporsoft.net/publishing-gutenberg-to-github/

## Custom Domain

If you're using a custom domain for your GitHub Pages site, put the CNAME in static/CNAME so that Zola puts it in the root of the public folder which is where GitHub expects it to be.
34 changes: 13 additions & 21 deletions docs/content/documentation/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,28 +197,15 @@ Zola does not work in PowerShell ISE.

## From source
To build Zola from source, you will need to have Git, [Rust and Cargo](https://www.rust-lang.org/)
installed. You will also need to meet additional dependencies to compile [libsass](https://github.com/sass/libsass):
installed.

- OSX, Linux and other Unix-like operating systems: `make` (`gmake` on BSDs), `g++`, `libssl-dev`
- NixOS: Create a `shell.nix` file in the root of the cloned project with the following contents:
```nix
with import <nixpkgs> {};
pkgs.mkShell {
buildInputs = [
libsass
openssl
pkgconfig
];
}
```
- Then, invoke `nix-shell`. This opens a shell with the above dependencies. Then, run `cargo build --release` to build the project.
- Windows (a bit trickier): updated `MSVC` and overall updated VS installation

From a terminal, you can now run the following command:
From a terminal, you can now run the following commands:

```sh
$ cargo build --release
$ git clone https://github.com/getzola/zola.git
$ cd zola
$ cargo install --path .
$ zola --version
```

If you encountered compilation errors like `error: failed to run custom build command for 'ring v0.16.20'`, you can try the command below instead:
Expand All @@ -228,5 +215,10 @@ $ cargo build --release --no-default-features --features=native-tls
```

The binary will be available in the `target/release` directory. You can move it in your `$PATH` to have the
`zola` command available globally or in a directory if you want for example to have the binary in the
same repository as the site.
`zola` command available globally:

```sh
$ cp target/release/zola ~/.cargo/bin/zola
```

or in a directory if you want for example to have the binary in the same repository as the site.
17 changes: 12 additions & 5 deletions docs/content/documentation/getting-started/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Unlike some SSGs, Zola makes no assumptions regarding the structure of your site

### Initialize Site

> This overview is based on Zola 0.9.
> This overview is based on Zola 0.17.1.
Please see the detailed [installation instructions for your platform](@/documentation/getting-started/installation.md). With Zola installed, let's initialize our site:

Expand Down Expand Up @@ -66,15 +66,22 @@ For reference, by the **end** of this overview, our `myblog` directory will have
└── themes/
```

Let's start the Zola development server with:
Let's start the Zola development server within the newly created `myblog` directory:

```bash
$ cd myblog
$ zola serve
Building site...
-> Creating 0 pages (0 orphan), 0 sections, and processing 0 images
```
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

> This command must be run in the base Zola directory, which contains `config.toml`.
Web server is available at http://127.0.0.1:1111
```
If you point your web browser to <http://127.0.0.1:1111>, you should see a "Welcome to Zola" message.
Expand Down
2 changes: 2 additions & 0 deletions docs/content/documentation/templates/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ The type of the output is:
```ts
kind: TaxonomyConfig;
items: Array<TaxonomyTerm>;
lang: String;
permalink: String;
```

`lang` (optional) default to `config.default_language` in config.toml
Expand Down
4 changes: 2 additions & 2 deletions docs/content/documentation/themes/extending-a-theme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
+++
title = "Extending a theme"
title = "Customizing a theme"
weight = 30
+++

When your site uses a theme, you can replace parts of it in your site's templates folder. For any given theme template, you can either override a single block in it, or replace the whole template. If a site template and a theme template collide, the site template will be given priority. Whether a theme template collides or not, theme templates remain accessible from any template within `theme_name/templates/`.

## Replacing a template

When a site template and a theme template have the same path, for example `templates/page.html` and `themes/theme_name/templates/page.html`, the site template is the one that will be used. This is how you can replace a whole template for a theme.
When your site uses a theme, the generated structure follows the theme's structure whenever possible, i.e. there are no user defined templates with the same name and relative path as the theme's; for example: with two files `templates/page.html` and `themes/theme_name/templates/page.html`, the site template is the one that will be used. Such a conflict results in the theme's template being ignored in favor of the template defined by the user.

## Overriding a block

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ name has to be the name of the directory you cloned the theme in.
For example, if you cloned a theme in `themes/simple-blog`, the theme name to use
in the configuration file is `simple-blog`. Also make sure to place the variable in the top level of the
`.toml` hierarchy and not after a dict like [extra] or [markdown].
Some themes require additional configuration before they can work properly. Be sure to follow the instructions found on your chosen theme's documentation to properly configure the theme.

## Customizing a theme

Expand Down
4 changes: 3 additions & 1 deletion docs/content/documentation/themes/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ title = "Overview"
weight = 10
+++

Zola has built-in support for themes that makes it easy to customise and update them.
Themes are collections of layouts and styles used to facilitate the creation and management of Zola projects. As such, themes are Zola projects which provide their own templates, content and even static assets.

Zola has built-in support for themes which makes it easy to customise and update them.

All themes can use the full power of Zola, from shortcodes to Sass compilation.

Expand Down
Loading

0 comments on commit 4cdd651

Please sign in to comment.