Skip to content

Commit

Permalink
Merge branch 'getzola:master' into merge_def_data_lang_data
Browse files Browse the repository at this point in the history
  • Loading branch information
vcrn authored Jan 14, 2023
2 parents d3f6009 + d899f3b commit 773d50b
Show file tree
Hide file tree
Showing 79 changed files with 715 additions and 254 deletions.
6 changes: 5 additions & 1 deletion EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| [shaleenjain.com](https://shaleenjain.com) | https://github.com/shalzz/shalzz.github.io |
| [Hello, Rust!](https://hello-rust.show) | https://github.com/hello-rust/hello-rust.github.io |
| [maxdeviant.com](https://maxdeviant.com/) | |
| [Uwes Blog](https://uwe-arzt.de) | https://github.com/uwearzt/site-uwe-arzt |
| [Uwes Blog](https://uwe-arzt.de) | https://codeberg.org/uwearzt/site-uwe-arzt |
| [ozkriff.games](https://ozkriff.games) | https://github.com/ozkriff/ozkriff.github.io-src |
| [Sylvain Kerkour](https://kerkour.fr) | https://gitlab.com/z0mbie42/kerkour.fr |
| [CodeShow by Bruno Rocha](https://codeshow.com.br) | https://github.com/codeshow/site |
Expand All @@ -43,3 +43,7 @@
| [146 Parks](https://146parks.blog/) | https://github.com/scouten/146parks.blog |
| [films.mlcdf.fr](https://films.mlcdf.fr) | https://github.com/mlcdf/films |
| [Mish Ushakov](https://mish.co) | |
| [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/ |

5 changes: 3 additions & 2 deletions docs/content/documentation/content/shortcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ weight = 40

Zola borrows the concept of [shortcodes](https://codex.wordpress.org/Shortcode_API) from WordPress.
In our case, a shortcode corresponds to a template defined in the `templates/shortcodes` directory or
a built-in one that can be used in a Markdown file. If you want to use something similar to shortcodes in your templates,
try [Tera macros](https://tera.netlify.com/docs#macros).
a built-in one that can be used in a Markdown file.

Broadly speaking, Zola's shortcodes cover two distinct use cases:

Expand All @@ -18,6 +17,8 @@ The latter may also be solved by writing HTML, however Zola allows the use of Ma
rather than `.html`. This may be particularly useful if you want to include headings generated by the shortcode in the
[table of contents](@/documentation/content/table-of-contents.md).

If you want to use something similar to shortcodes in your templates, you can use [Tera macros](https://tera.netlify.com/docs#macros). They are functions or components that you can call to return some text.

## Writing a shortcode
Let's write a shortcode to embed YouTube videos as an example.
In a file called `youtube.html` in the `templates/shortcodes` directory, paste the
Expand Down
51 changes: 51 additions & 0 deletions docs/content/documentation/deployment/edgio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
+++
title = "Edgio"
weight = 50
+++

If you don't have an account with Edgio, you can sign up [here](https://app.layer0.co/signup).

## Manual deploys

For a command-line manual deploy, follow these steps:

1. Install the Edgio CLI:

```bash
npm i -g @edgio/cli
```

2. Create a package.json at the root of your project with the following:

```bash
npm init -y
```

3. Initialize your project with:

```bash
edgio init
```

4. Update routes.js at the root of your project to the following:

```js
// This file was added by edgio init.
// You should commit this file to source control.

import { Router } from '@edgio/core/router'

export default new Router().static('public')
```

5. Build your zola app:

```bash
zola build
```

6. Deploy!

```bash
edgio deploy
```
18 changes: 10 additions & 8 deletions docs/content/documentation/deployment/github-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Using *Github Actions* for the deployment of your Zola-Page on Github-Pages is p
2. Create the *Github Action*.
3. Check the *Github Pages* section in repository settings.

Let's start with the token. Remember, if you are publishing the site on the same repo, you do not need to follow that step.
Let's start with the token. Remember, if you are publishing the site on the same repo, you do not need to follow that step. But you will still need to pass in the automatic `GITHUB_TOKEN` as explained [here](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#example-1-passing-the-github_token-as-an-input).

For creating the token either click on [here](https://github.com/settings/tokens) or go to Settings > Developer Settings > Personal access tokens. Under the *Select Scopes* section, give it *repo* permissions and click *Generate token*. Then copy the token, navigate to your repository and add in the Settings tab the *Secret* `TOKEN` and paste your token in it.
For creating the token either click on [here](https://github.com/settings/tokens/new?scopes=public_repo) or go to Settings > Developer Settings > Personal access tokens. Under the *Select Scopes* section, give it *public_repo* permissions and click *Generate token*. Then copy the token, navigate to your repository and add in the Settings tab the *Secret* `TOKEN` and paste your token in it.

Next we need to create the *Github Action*. Here we can make use of the [zola-deploy-action](https://github.com/shalzz/zola-deploy-action). Go to the *Actions* tab of your repository, click on *set up a workflow yourself* to get a blank workflow file. Copy the following script into it and commit it afterwards; note that you may need to change the `github.ref` branch from `main` to `master` or similar, as the action will only run for the branch you choose.

Expand All @@ -46,14 +46,16 @@ jobs:
if: github.ref == 'refs/heads/main'
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.0.0
- name: build_and_deploy
uses: shalzz/zola-deploy-action@v0.14.1
uses: shalzz/zola-deploy-action@v0.16.1
env:
# Target branch
PAGES_BRANCH: gh-pages
# Provide personal access token
TOKEN: ${{ secrets.TOKEN }}
# Or if publishing to the same repo, use the automatic token
#TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

This script is pretty simple, because the [zola-deploy-action](https://github.com/shalzz/zola-deploy-action) is doing everything for you. You just need to provide some details. For more configuration options check out the [README](https://github.com/shalzz/zola-deploy-action/blob/master/README.md).
Expand All @@ -75,9 +77,9 @@ jobs:
if: github.ref != 'refs/heads/main'
steps:
- name: 'checkout'
uses: actions/checkout@v2
uses: actions/checkout@v3.0.0
- name: 'build'
uses: shalzz/zola-deploy-action@v0.13.0
uses: shalzz/zola-deploy-action@v0.16.1
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: .
Expand All @@ -88,9 +90,9 @@ jobs:
if: github.ref == 'refs/heads/main'
steps:
- name: 'checkout'
uses: actions/checkout@v2
uses: actions/checkout@v3.0.0
- name: 'build and deploy'
uses: shalzz/zola-deploy-action@v0.13.0
uses: shalzz/zola-deploy-action@v0.16.1
env:
PAGES_BRANCH: master
BUILD_DIR: .
Expand Down
55 changes: 0 additions & 55 deletions docs/content/documentation/deployment/layer0.md

This file was deleted.

10 changes: 9 additions & 1 deletion docs/content/documentation/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ Zola is available in the official package repository.
$ doas pkg_add zola
```

### pkgsrc

Zola is available in the official package repository, with [pkgin](https://pkgin.net/).

```sh
$ pkgin install zola
```

### Snapcraft

Zola is available on snapcraft:
Expand All @@ -101,7 +109,7 @@ To use zola:
$ flatpak run org.getzola.zola [command]
```

To avoid having to type this everytime, an alias can be created in `~/.bashrc`:
To avoid having to type this every time, an alias can be created in `~/.bashrc`:

```sh
$ alias zola="flatpak run org.getzola.zola"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/documentation/getting-started/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ The `index.html` file inside the `templates` directory should be:
<h1 class="title">
This is my blog made with Zola.
</h1>
<p>Click <a href="{{/* get_url(path="@/blog/_index.md") */}}">here</a> to see my posts.</p>
<p>Click <a href="{{/* get_url(path='@/blog/_index.md') */}}">here</a> to see my posts.</p>
{% endblock content %}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/content/documentation/templates/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ in Tera.
Converts the given variable to HTML using Markdown. There are a few differences compared to page/section Markdown rendering:

- shortcodes evaluated by this filter cannot access the current rendering context: `config` will be available, but accessing `section` or `page` (among others) from a shortcode called within the `markdown` filter will prevent your site from building (see [this discussion](https://github.com/getzola/zola/pull/1358))
- `lang` in shortcodes will always be equal to the site's `default_lang` (or `en` otherwise) ; it should not be a problem, but if it is in most cases, but if you need to use language-aware shortcodes in this filter, please refer to the [Shortcode context](@/documentation/content/shortcodes.md#shortcode-context) section of the docs.
- `lang` in shortcodes will always be equal to the site's `config.default_language` (or `en` otherwise) ; it should not be a problem, but if it is in most cases, but if you need to use language-aware shortcodes in this filter, please refer to the [Shortcode context](@/documentation/content/shortcodes.md#shortcode-context) section of the docs.

By default, the filter will wrap all text in a paragraph. To disable this behaviour, you can
pass `true` to the inline argument:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/documentation/templates/pages-sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ toc: Array<Header>,
word_count: Number;
// Based on https://help.medium.com/hc/en-us/articles/214991667-Read-time
reading_time: Number;
// earlier / ligher
// earlier / lighter
lower: Page?;
// later / heavier
higher: Page?;
Expand Down
8 changes: 1 addition & 7 deletions docs/content/documentation/themes/creating-a-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,7 @@ to be able to build the theme from your repository.
## Submitting a theme to the gallery

If you want your theme to be featured in the [themes](@/themes/_index.md) section
of this site, the theme will require two more things:

- `screenshot.png`: a screenshot of the theme in action with a max size of around 2000x1000
- `README.md`: a thorough README explaining how to use the theme and any other information
of importance

The first step is to make sure that the theme meets the following three requirements:
of this site, make sure that the theme meets the following three requirements:

- have a `screenshot.png` of the theme in action with a max size of around 2000x1000
- have a thorough `README.md` explaining how to use the theme and any other information
Expand Down
6 changes: 3 additions & 3 deletions docs/content/themes/DeepThought/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
title = "DeepThought"
description = "A simple blog theme focused on writing powered by Bulma and Zola."
template = "theme.html"
date = 2022-08-16T14:32:26-05:00
date = 2022-12-04T21:40:33+02:00

[extra]
created = 2022-08-16T14:32:26-05:00
updated = 2022-08-16T14:32:26-05:00
created = 2022-12-04T21:40:33+02:00
updated = 2022-12-04T21:40:33+02:00
repository = "https://github.com/RatanShreshtha/DeepThought.git"
homepage = "https://github.com/RatanShreshtha/DeepThought"
minimum_version = "0.14.1"
Expand Down
6 changes: 3 additions & 3 deletions docs/content/themes/Ergo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
title = "Ergo"
description = "A simple blog Theme focused on writing, inspired by svbtle"
template = "theme.html"
date = 2022-08-16T14:32:26-05:00
date = 2022-12-04T21:40:33+02:00

[extra]
created = 2022-08-16T14:32:26-05:00
updated = 2022-08-16T14:32:26-05:00
created = 2022-12-04T21:40:33+02:00
updated = 2022-12-04T21:40:33+02:00
repository = "https://github.com/insipx/Ergo.git"
homepage = "https://github.com/insipx/Ergo"
minimum_version = "0.4.1"
Expand Down
6 changes: 3 additions & 3 deletions docs/content/themes/Zulma/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
title = "Zulma"
description = "A zola theme based off bulma.css"
template = "theme.html"
date = 2022-08-16T14:32:26-05:00
date = 2022-12-04T21:40:33+02:00

[extra]
created = 2022-08-16T14:32:26-05:00
updated = 2022-08-16T14:32:26-05:00
created = 2022-12-04T21:40:33+02:00
updated = 2022-12-04T21:40:33+02:00
repository = "https://github.com/Worble/Zulma.git"
homepage = "https://github.com/Worble/Zulma"
minimum_version = "0.6.0"
Expand Down
6 changes: 3 additions & 3 deletions docs/content/themes/abridge/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
title = "abridge"
description = "A fast and lightweight Zola theme using semantic html, a class-light abridge.css, and No JS."
template = "theme.html"
date = 2022-08-16T14:32:26-05:00
date = 2022-12-04T21:40:33+02:00

[extra]
created = 2022-08-16T14:32:26-05:00
updated = 2022-08-16T14:32:26-05:00
created = 2022-12-04T21:40:33+02:00
updated = 2022-12-04T21:40:33+02:00
repository = "https://github.com/Jieiku/abridge.git"
homepage = "https://github.com/jieiku/abridge/"
minimum_version = "0.16.0"
Expand Down
6 changes: 3 additions & 3 deletions docs/content/themes/adidoks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
title = "adidoks"
description = "AdiDoks is a Zola theme helping you build modern documentation."
template = "theme.html"
date = 2022-08-16T14:32:26-05:00
date = 2022-12-04T21:40:33+02:00

[extra]
created = 2022-08-16T14:32:26-05:00
updated = 2022-08-16T14:32:26-05:00
created = 2022-12-04T21:40:33+02:00
updated = 2022-12-04T21:40:33+02:00
repository = "https://github.com/aaranxu/adidoks.git"
homepage = "https://github.com/aaranxu/adidoks"
minimum_version = "0.15.0"
Expand Down
6 changes: 3 additions & 3 deletions docs/content/themes/after-dark/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
title = "after-dark"
description = "A robust, elegant dark theme"
template = "theme.html"
date = 2022-08-16T14:32:26-05:00
date = 2022-12-04T21:40:33+02:00

[extra]
created = 2022-08-16T14:32:26-05:00
updated = 2022-08-16T14:32:26-05:00
created = 2022-12-04T21:40:33+02:00
updated = 2022-12-04T21:40:33+02:00
repository = "https://github.com/getzola/after-dark.git"
homepage = "https://github.com/getzola/after-dark"
minimum_version = "0.11.0"
Expand Down
Loading

0 comments on commit 773d50b

Please sign in to comment.