Browse Source

Update docs to refer to zola

index-subcmd
Vincent Prouillet 6 years ago
parent
commit
0101e5cb12
36 changed files with 160 additions and 161 deletions
  1. +1
    -1
      components/config/src/theme.rs
  2. +2
    -2
      docs/config.toml
  3. +1
    -1
      docs/content/documentation/content/image-processing/index.md
  4. +5
    -5
      docs/content/documentation/content/linking.md
  5. +9
    -9
      docs/content/documentation/content/overview.md
  6. +2
    -2
      docs/content/documentation/content/page.md
  7. +4
    -4
      docs/content/documentation/content/sass.md
  8. +7
    -7
      docs/content/documentation/content/search.md
  9. +2
    -2
      docs/content/documentation/content/section.md
  10. +6
    -6
      docs/content/documentation/content/shortcodes.md
  11. +3
    -3
      docs/content/documentation/content/syntax-highlighting.md
  12. +2
    -2
      docs/content/documentation/content/taxonomies.md
  13. +15
    -15
      docs/content/documentation/deployment/github-pages.md
  14. +14
    -15
      docs/content/documentation/deployment/netlify.md
  15. +1
    -1
      docs/content/documentation/deployment/overview.md
  16. +20
    -20
      docs/content/documentation/getting-started/cli-usage.md
  17. +5
    -5
      docs/content/documentation/getting-started/configuration.md
  18. +2
    -2
      docs/content/documentation/getting-started/directory-structure.md
  19. +11
    -11
      docs/content/documentation/getting-started/installation.md
  20. +1
    -1
      docs/content/documentation/templates/404.md
  21. +1
    -1
      docs/content/documentation/templates/archive.md
  22. +11
    -11
      docs/content/documentation/templates/overview.md
  23. +2
    -2
      docs/content/documentation/templates/pages-sections.md
  24. +1
    -1
      docs/content/documentation/templates/robots.md
  25. +2
    -2
      docs/content/documentation/templates/rss.md
  26. +1
    -1
      docs/content/documentation/templates/sitemap.md
  27. +1
    -1
      docs/content/documentation/templates/taxonomies.md
  28. +7
    -7
      docs/content/documentation/themes/creating-a-theme.md
  29. +1
    -1
      docs/content/documentation/themes/installing-and-using-themes.md
  30. +2
    -2
      docs/content/documentation/themes/overview.md
  31. +2
    -2
      docs/sass/_docs.scss
  32. BIN
      docs/static/favicon.ico
  33. +12
    -12
      docs/templates/index.html
  34. +1
    -1
      docs/templates/theme.html
  35. +1
    -1
      docs/templates/themes.html
  36. +2
    -2
      snapcraft.yaml

+ 1
- 1
components/config/src/theme.rs View File

@@ -9,7 +9,7 @@ use errors::{Result, ResultExt};




/// Holds the data from a `theme.toml` file. /// Holds the data from a `theme.toml` file.
/// There are other fields than `extra` in it but Gutenberg
/// There are other fields than `extra` in it but Zola
/// itself doesn't care about them. /// itself doesn't care about them.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Theme { pub struct Theme {


+ 2
- 2
docs/config.toml View File

@@ -1,5 +1,5 @@
base_url = "https://www.getgutenberg.io/"
title = "Gutenberg"
base_url = "https://www.getzola.org/"
title = "Zola"
description = "Everything you need to make a static site engine in one binary." description = "Everything you need to make a static site engine in one binary."


compile_sass = true compile_sass = true


+ 1
- 1
docs/content/documentation/content/image-processing/index.md View File

@@ -23,7 +23,7 @@ resize_image(path, width, height, op, quality)


### Image processing and return value ### Image processing and return value


Gutenberg performs image processing during the build process and places the resized images in a subdirectory in the static files directory:
Zola performs image processing during the build process and places the resized images in a subdirectory in the static files directory:


``` ```
static/processed_images/ static/processed_images/


+ 5
- 5
docs/content/documentation/content/linking.md View File

@@ -17,18 +17,18 @@ if the slug already exists for that article. For example:
``` ```


## Anchor insertion ## Anchor insertion
It is possible to have Gutenberg automatically insert anchor links next to the header, as you can see on the site you are currently
It is possible to have Zola automatically insert anchor links next to the header, as you can see on the site you are currently
reading if you hover a title. reading if you hover a title.


This option is set at the section level: the `insert_anchor_links` variable on the
This option is set at the section level: the `insert_anchor_links` variable on the
[Section front-matter page](./documentation/content/section.md#front-matter). [Section front-matter page](./documentation/content/section.md#front-matter).


The default template is very basic and will need CSS tweaks in your project to look decent.
If you want to change the anchor template, it can easily be overwritten by
The default template is very basic and will need CSS tweaks in your project to look decent.
If you want to change the anchor template, it can easily be overwritten by
creating a `anchor-link.html` file in the `templates` directory. creating a `anchor-link.html` file in the `templates` directory.


## Internal links ## Internal links
Linking to other pages and their headers is so common that Gutenberg adds a
Linking to other pages and their headers is so common that Zola adds a
special syntax to Markdown links to handle them: start the link with `./` and point to the `.md` file you want special syntax to Markdown links to handle them: start the link with `./` and point to the `.md` file you want
to link to. The path to the file starts from the `content` directory. to link to. The path to the file starts from the `content` directory.




+ 9
- 9
docs/content/documentation/content/overview.md View File

@@ -4,7 +4,7 @@ weight = 10
+++ +++




Gutenberg uses the folder structure to determine the site structure.
Zola uses the folder structure to determine the site structure.
Each folder in the `content` directory represents a [section](./documentation/content/section.md) Each folder in the `content` directory represents a [section](./documentation/content/section.md)
that contains [pages](./documentation/content/page.md): your `.md` files. that contains [pages](./documentation/content/page.md): your `.md` files.


@@ -40,7 +40,7 @@ While not shown in the example, sections can be nested indefinitely.
## Assets colocation ## Assets colocation


The `content` directory is not limited to markup files though: it's natural to want to co-locate a page and some related The `content` directory is not limited to markup files though: it's natural to want to co-locate a page and some related
assets, for instance images or spreadsheets. Gutenberg supports that pattern out of the box for both sections and pages.
assets, for instance images or spreadsheets. Zola supports that pattern out of the box for both sections and pages.


Any non-markdown file you add in the page/section folder will be copied alongside the generated page when building the site, Any non-markdown file you add in the page/section folder will be copied alongside the generated page when building the site,
which allows us to use a relative path to access them. which allows us to use a relative path to access them.
@@ -82,14 +82,14 @@ ignored_content = ["*.xlsx"]


## Static assets ## Static assets


In addition to placing content files in the `content` directory, you may also place content
In addition to placing content files in the `content` directory, you may also place content
files in the `static` directory. Any files/folders that you place in the `static` directory files in the `static` directory. Any files/folders that you place in the `static` directory
will be copied, without modification, to the public directory.
will be copied, without modification, to the public directory.


Typically, you might put site-wide assets (such as the site favicon, site logos or site-wide Typically, you might put site-wide assets (such as the site favicon, site logos or site-wide
JavaScript) in the root of the static directory. You can also place any HTML or other files that JavaScript) in the root of the static directory. You can also place any HTML or other files that
you wish to be included without modification (that is, without being parsed as Markdown files) you wish to be included without modification (that is, without being parsed as Markdown files)
into the static directory.
into the static directory.


Note that the static folder provides an _alternative_ to colocation. For example, imagine that you Note that the static folder provides an _alternative_ to colocation. For example, imagine that you
had the following directory structure (a simplified version of the structure presented above): had the following directory structure (a simplified version of the structure presented above):
@@ -109,12 +109,12 @@ have three options:
relative path from the `index.md` page. This is the approach described under **colocation**, relative path from the `index.md` page. This is the approach described under **colocation**,
above. above.
* You could save the image to a `static/blog/configuration` folder and link it in exactly the * You could save the image to a `static/blog/configuration` folder and link it in exactly the
same way as if you had colocated it. If you do this, the generated files will be identical to
if you had colocated; the only difference will be that all static files will be saved in the
same way as if you had colocated it. If you do this, the generated files will be identical to
if you had colocated; the only difference will be that all static files will be saved in the
static folder rather than in the content folder. Depending on your organizational needs, this static folder rather than in the content folder. Depending on your organizational needs, this
may be better or worse. may be better or worse.
* Or you could save the image to some arbitrary folder within the static folder. For example, * Or you could save the image to some arbitrary folder within the static folder. For example,
you could save all images to `static/images`. Using this approach, you would no longer be able you could save all images to `static/images`. Using this approach, you would no longer be able
to use relative links, but could use an absolute link to `images/[filename]` to access your
image. This might be preferable for small sites or for sites that associate images with
to use relative links, but could use an absolute link to `images/[filename]` to access your
image. This might be preferable for small sites or for sites that associate images with
multiple pages (e.g., logo images that appear on every page). multiple pages (e.g., logo images that appear on every page).

+ 2
- 2
docs/content/documentation/content/page.md View File

@@ -24,7 +24,7 @@ the `about` folder allows you to use asset colocation, as discussed in the


## Front-matter ## Front-matter


The front-matter is a set of metadata embedded in a file. In Gutenberg,
The front-matter is a set of metadata embedded in a file. In Zola,
it is at the beginning of the file, surrounded by `+++` and uses TOML. it is at the beginning of the file, surrounded by `+++` and uses TOML.


While none of the front-matter variables are mandatory, the opening and closing `+++` are required. While none of the front-matter variables are mandatory, the opening and closing `+++` are required.
@@ -88,7 +88,7 @@ Some content


## Summary ## Summary


You can ask Gutenberg to create a summary if you only want to show the first
You can ask Zola to create a summary if you only want to show the first
paragraph of each page in a list for example. paragraph of each page in a list for example.


To do so, add <code>&lt;!-- more --&gt;</code> in your content at the point To do so, add <code>&lt;!-- more --&gt;</code> in your content at the point


+ 4
- 4
docs/content/documentation/content/sass.md View File

@@ -11,9 +11,9 @@ may be of interest:
* The [official Sass website](http://sass-lang.com/) * The [official Sass website](http://sass-lang.com/)
* [Why Sass?](https://alistapart.com/article/why-sass), by Dan Cederholm * [Why Sass?](https://alistapart.com/article/why-sass), by Dan Cederholm


## Using Sass in Gutenberg
## Using Sass in Zola


Gutenberg processes any files with the `sass` or `scss` extensions in the `sass`
Zola processes any files with the `sass` or `scss` extensions in the `sass`
folder, and places the processed output into a `css` file with the same folder folder, and places the processed output into a `css` file with the same folder
structure and base name into the `public` folder: structure and base name into the `public` folder:


@@ -26,7 +26,7 @@ structure and base name into the `public` folder:
├── assets ├── assets
│ ├── fancy.scss // -> ./public/assets/fancy.css │ ├── fancy.scss // -> ./public/assets/fancy.css
│ ├── same_name.scss // -> ./public/assets/same_name.css │ ├── same_name.scss // -> ./public/assets/same_name.css
│ ├── same_name.sass # CONFLICT! This has the same base name as the file above, so Gutenberg will return an error.
│ ├── same_name.sass # CONFLICT! This has the same base name as the file above, so Zola will return an error.
│ └── _common_mixins.scss # This file won't get put into the `public` folder, but other files can @import it. │ └── _common_mixins.scss # This file won't get put into the `public` folder, but other files can @import it.
└── secret-side-project └── secret-side-project
└── style.scss // -> ./public/secret-side-project/fancy.css └── style.scss // -> ./public/secret-side-project/fancy.css
@@ -38,5 +38,5 @@ folder, but can still be used as `@import` dependencies. For more information, s


Files with the `scss` extension use ["Sassy CSS" syntax](http://sass-lang.com/documentation/#Formatting), Files with the `scss` extension use ["Sassy CSS" syntax](http://sass-lang.com/documentation/#Formatting),
while files with the `sass` extension use the ["indented" syntax](http://sass-lang.com/documentation/file.INDENTED_SYNTAX.html). while files with the `sass` extension use the ["indented" syntax](http://sass-lang.com/documentation/file.INDENTED_SYNTAX.html).
Gutenberg will return an error if a `scss` and `sass` file exist with the same
Zola will return an error if a `scss` and `sass` file exist with the same
base name in the same folder to avoid confusion -- see the example above. base name in the same folder to avoid confusion -- see the example above.

+ 7
- 7
docs/content/documentation/content/search.md View File

@@ -3,20 +3,20 @@ title = "Search"
weight = 100 weight = 100
+++ +++


Gutenberg can build a search index from the sections and pages content to
be used by a JavaScript library: [elasticlunr](http://elasticlunr.com/).
Zola can build a search index from the sections and pages content to
be used by a JavaScript library: [elasticlunr](http://elasticlunr.com/).


To enable it, you only need to set `build_search_index = true` in your `config.toml` and Gutenberg will
To enable it, you only need to set `build_search_index = true` in your `config.toml` and Zola will
generate an index for the `default_language` set for all pages not excluded from the search index. generate an index for the `default_language` set for all pages not excluded from the search index.


It is very important to set the `default_language` in your `config.toml` if you are writing a site not in
It is very important to set the `default_language` in your `config.toml` if you are writing a site not in
English: the index building pipelines are very different depending on the language. English: the index building pipelines are very different depending on the language.


After `gutenberg build` or `gutenberg serve`, you should see two files in your static directory:
After `zola build` or `zola serve`, you should see two files in your static directory:


- `search_index.${default_language}.js`: so `search_index.en.js` for a default setup - `search_index.${default_language}.js`: so `search_index.en.js` for a default setup
- `elasticlunr.min.js` - `elasticlunr.min.js`


As each site will be different, Gutenberg makes no assumptions about how your search and doesn't provide
As each site will be different, Zola makes no assumptions about how your search and doesn't provide
the JavaScript/CSS code to do an actual search and display results. You can however look at how this very site the JavaScript/CSS code to do an actual search and display results. You can however look at how this very site
is implementing it to have an idea: [search.js](https://github.com/Keats/gutenberg/tree/master/docs/static/search.js).
is implementing it to have an idea: [search.js](https://github.com/getzola/zola/tree/master/docs/static/search.js).

+ 2
- 2
docs/content/documentation/content/section.md View File

@@ -21,7 +21,7 @@ Any non-Markdown file in the section folder is added to the `assets` collection
The `_index.md` file within a folder defines the content and metadata for that section. To set The `_index.md` file within a folder defines the content and metadata for that section. To set
the metadata, add front matter to the file. the metadata, add front matter to the file.


The front-matter is a set of metadata embedded in a file. In Gutenberg,
The front-matter is a set of metadata embedded in a file. In Zola,
it is at the beginning of the file, surrounded by `+++` and uses TOML. it is at the beginning of the file, surrounded by `+++` and uses TOML.


After the closing `+++`, you can add content that will be parsed as markdown and will be available After the closing `+++`, you can add content that will be parsed as markdown and will be available
@@ -95,7 +95,7 @@ You can also change the pagination path (the word displayed while paginated in t
by setting the `paginate_path` variable, which defaults to `page`. by setting the `paginate_path` variable, which defaults to `page`.


## Sorting ## Sorting
It is very common for Gutenberg templates to iterate over pages or sections
It is very common for Zola templates to iterate over pages or sections
to display all pages/sections a given directory. Consider a very simple to display all pages/sections a given directory. Consider a very simple
example: a `blog` directory with three files: `blog/Post_1.md`, example: a `blog` directory with three files: `blog/Post_1.md`,
`blog/Post_2.md`, and `blog/Post_3.md`. To iterate over these posts and `blog/Post_2.md`, and `blog/Post_3.md`. To iterate over these posts and


+ 6
- 6
docs/content/documentation/content/shortcodes.md View File

@@ -6,7 +6,7 @@ weight = 40
While Markdown is good at writing, it isn't great when you need write inline While Markdown is good at writing, it isn't great when you need write inline
HTML to add some styling for example. HTML to add some styling for example.


To solve this, Gutenberg borrows the concept of [shortcodes](https://codex.wordpress.org/Shortcode_API)
To solve this, Zola borrows the concept of [shortcodes](https://codex.wordpress.org/Shortcode_API)
from WordPress. from WordPress.
In our case, the shortcode corresponds to a template that is defined in the `templates/shortcodes` directory or a built-in one that can In our case, the shortcode corresponds to a template that is 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/templates/#macros). 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/templates/#macros).
@@ -31,7 +31,7 @@ This template is very straightforward: an iframe pointing to the YouTube embed U
In terms of input, it expects at least one variable: `id`. Since the other variables In terms of input, it expects at least one variable: `id`. Since the other variables
are in a `if` statement, we can assume they are optional. are in a `if` statement, we can assume they are optional.


That's it, Gutenberg will now recognise this template as a shortcode named `youtube` (the filename minus the `.html` extension).
That's it, Zola will now recognise this template as a shortcode named `youtube` (the filename minus the `.html` extension).


The markdown renderer will wrap an inline HTML node like `<a>` or `<span>` into a paragraph. If you want to disable that, The markdown renderer will wrap an inline HTML node like `<a>` or `<span>` into a paragraph. If you want to disable that,
simply wrap your shortcode in a `div`. simply wrap your shortcode in a `div`.
@@ -78,7 +78,7 @@ Here is a YouTube video:
An inline {{/* youtube(id="dQw4w9WgXcQ", autoplay=true, class="youtube") */}} shortcode An inline {{/* youtube(id="dQw4w9WgXcQ", autoplay=true, class="youtube") */}} shortcode
``` ```


Note that if you want to have some content that looks like a shortcode but not have Gutenberg try to render it,
Note that if you want to have some content that looks like a shortcode but not have Zola try to render it,
you will need to escape it by using `{{/*` and `*/}}` instead of `{{` and `}}`. you will need to escape it by using `{{/*` and `*/}}` instead of `{{` and `}}`.


### Shortcodes with body ### Shortcodes with body
@@ -104,14 +104,14 @@ A quote
The body of the shortcode will be automatically passed down to the rendering context as the `body` variable and needs The body of the shortcode will be automatically passed down to the rendering context as the `body` variable and needs
to be in a newline. to be in a newline.


If you want to have some content that looks like a shortcode but not have Gutenberg try to render it,
If you want to have some content that looks like a shortcode but not have Zola try to render it,
you will need to escape it by using `{%/*` and `*/%}` instead of `{%` and `%}`. You won't need to escape you will need to escape it by using `{%/*` and `*/%}` instead of `{%` and `%}`. You won't need to escape
anything else until the closing tag. anything else until the closing tag.


## Built-in shortcodes ## Built-in shortcodes


Gutenberg comes with a few built-in shortcodes. If you want to override a default shortcode template,
simply place a `{shortcode_name}.html` file in the `templates/shortcodes` directory and Gutenberg will
Zola comes with a few built-in shortcodes. If you want to override a default shortcode template,
simply place a `{shortcode_name}.html` file in the `templates/shortcodes` directory and Zola will
use that instead. use that instead.


### YouTube ### YouTube


+ 3
- 3
docs/content/documentation/content/syntax-highlighting.md View File

@@ -3,10 +3,10 @@ title = "Syntax Highlighting"
weight = 80 weight = 80
+++ +++


Gutenberg comes with built-in syntax highlighting but you first
Zola comes with built-in syntax highlighting but you first
need to enable it in the [configuration](./documentation/getting-started/configuration.md). need to enable it in the [configuration](./documentation/getting-started/configuration.md).


Once this is done, Gutenberg will automatically highlight all code blocks
Once this is done, Zola will automatically highlight all code blocks
in your content. A code block in Markdown looks like the following: in your content. A code block in Markdown looks like the following:


````md ````md
@@ -120,7 +120,7 @@ Here is a full list of the supported languages and the short names you can use:
- TOML -> ["toml", "tml", "Cargo.lock", "Gopkg.lock"] - TOML -> ["toml", "tml", "Cargo.lock", "Gopkg.lock"]
``` ```


If you want to highlight a language not on that list, please open an issue or a pull request on the [Gutenberg repo](https://github.com/Keats/gutenberg).
If you want to highlight a language not on that list, please open an issue or a pull request on the [Zola repo](https://github.com/getzola/zola).
Alternatively, the `extra_syntaxes` config option can be used to add additional syntax files. Alternatively, the `extra_syntaxes` config option can be used to add additional syntax files.


If your site source is laid out as follows: If your site source is laid out as follows:


+ 2
- 2
docs/content/documentation/content/taxonomies.md View File

@@ -3,7 +3,7 @@ title = "Taxonomies"
weight = 90 weight = 90
+++ +++


Gutenberg has built-in support for taxonomies.
Zola has built-in support for taxonomies.


The first step is to define the taxonomies in your [config.toml](./documentation/getting-started/configuration.md). The first step is to define the taxonomies in your [config.toml](./documentation/getting-started/configuration.md).


@@ -15,7 +15,7 @@ A taxonomy has 4 variables:
For example the default would be page/1 For example the default would be page/1
- `rss`: if set to `true`, a RSS feed will be generated for each individual term. - `rss`: if set to `true`, a RSS feed will be generated for each individual term.


Once this is done, you can then set taxonomies in your content and Gutenberg will pick
Once this is done, you can then set taxonomies in your content and Zola will pick
them up: them up:


```toml ```toml


+ 15
- 15
docs/content/documentation/deployment/github-pages.md View File

@@ -3,7 +3,7 @@ title = "GitHub Pages"
weight = 30 weight = 30
+++ +++


By default, GitHub Pages uses Jekyll (A ruby based static site generator),
By default, GitHub Pages uses Jekyll (A ruby based static site generator),
but you can use whatever you want provided you have an `index.html` file in the root of a branch called `gh-pages`. but you can use whatever you want provided you have an `index.html` file in the root of a branch called `gh-pages`.
That branch name can also be manually changed in the settings of a repository. That branch name can also be manually changed in the settings of a repository.


@@ -15,7 +15,7 @@ Don't forget to also check if your repository allows GitHub Pages in its setting


Depending on how you added your theme Travis may not exactly know how to access Depending on how you added your theme Travis may not exactly know how to access
it. The best way to ensure it will have full access to the theme is to use git it. The best way to ensure it will have full access to the theme is to use git
submodules. When doing this ensure you are using the `https` version of the URL.
submodules. When doing this ensure you are using the `https` version of the URL.


```shell ```shell
$ git submodule add {THEME_URL} themes/{THEME_NAME} $ git submodule add {THEME_URL} themes/{THEME_NAME}
@@ -23,15 +23,15 @@ $ git submodule add {THEME_URL} themes/{THEME_NAME}


## Allowing Travis to push to GitHub ## Allowing Travis to push to GitHub


Before pushing anything, Travis needs a Github private access key in order to make changes to your repository.
If you're already logged in to your account, just click [here](https://github.com/settings/tokens) to go to your tokens page.
Otherwise, navigate to `Settings > Developer Settings > Personal Access Tokens`.
Generate a new token, and give it any description you'd like.
Before pushing anything, Travis needs a Github private access key in order to make changes to your repository.
If you're already logged in to your account, just click [here](https://github.com/settings/tokens) to go to your tokens page.
Otherwise, navigate to `Settings > Developer Settings > Personal Access Tokens`.
Generate a new token, and give it any description you'd like.
Under the "Select Scopes" section, give it repo permissions. Click "Generate token" to finish up. Under the "Select Scopes" section, give it repo permissions. Click "Generate token" to finish up.


Your token will now be visible!
Copy it into your clipboard and head back to Travis.
Once on Travis, click on your project, and navigate to "Settings". Scroll down to "Environment Variables" and input a name of `GH_TOKEN` with a value of your access token.
Your token will now be visible!
Copy it into your clipboard and head back to Travis.
Once on Travis, click on your project, and navigate to "Settings". Scroll down to "Environment Variables" and input a name of `GH_TOKEN` with a value of your access token.
Make sure "Display value in build log" is off, and then click add. Now Travis has access to your repository. Make sure "Display value in build log" is off, and then click add. Now Travis has access to your repository.


## Setting up Travis ## Setting up Travis
@@ -40,21 +40,21 @@ We're almost done. We just need some scripts in a .travis.yml file to tell Travi


```yaml ```yaml
before_script: before_script:
# Download and unzip the gutenberg executable
# Download and unzip the zola executable
# Replace the version numbers in the URL by the version you want to use # Replace the version numbers in the URL by the version you want to use
- curl -s -L https://github.com/Keats/gutenberg/releases/download/v0.3.1/gutenberg-v0.3.1-x86_64-unknown-linux-gnu.tar.gz | sudo tar xvzf - -C /usr/local/bin
- curl -s -L https://github.com/getzola/zola/releases/download/v0.5.0/zola-v0.5.0-x86_64-unknown-linux-gnu.tar.gz | sudo tar xvzf - -C /usr/local/bin


script: script:
- gutenberg build
- zola build


# If you are using a different folder than `public` for the output directory, you will # If you are using a different folder than `public` for the output directory, you will
# need to change the `gutenberg` command and the `ghp-import` path
# need to change the `zola` command and the `ghp-import` path
after_success: | after_success: |
[ $TRAVIS_BRANCH = master ] && [ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] && [ $TRAVIS_PULL_REQUEST = false ] &&
gutenberg build &&
zola build &&
sudo pip install ghp-import && sudo pip install ghp-import &&
ghp-import -n public &&
ghp-import -n public &&
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
``` ```




+ 14
- 15
docs/content/documentation/deployment/netlify.md View File

@@ -3,7 +3,7 @@ title = "Netlify"
weight = 20 weight = 20
+++ +++


Netlify provides best practices like SSL, CDN distribution, caching and continuous deployment
Netlify provides best practices like SSL, CDN distribution, caching and continuous deployment
with no effort. This very site is hosted by Netlify and automatically deployed on commits. with no effort. This very site is hosted by Netlify and automatically deployed on commits.


If you don't have an account with Netlify, you can [sign up](https://app.netlify.com) for one. If you don't have an account with Netlify, you can [sign up](https://app.netlify.com) for one.
@@ -11,12 +11,12 @@ If you don't have an account with Netlify, you can [sign up](https://app.netlify
## Automatic Deploys ## Automatic Deploys
Once you are in the admin interface, you can add a site from a Git provider (GitHub, GitLab or Bitbucket). At the end Once you are in the admin interface, you can add a site from a Git provider (GitHub, GitLab or Bitbucket). At the end
of this process, you can select the deploy settings for the project: of this process, you can select the deploy settings for the project:
- build command: `GUTENBERG_VERSION=0.3.3 gutenberg build` (replace the version number in the variable by the version you want to use)
- build command: `ZOLA_VERSION=0.5.0 zola build` (replace the version number in the variable by the version you want to use)
- publish directory: the path to where the `public` directory is - publish directory: the path to where the `public` directory is
With this setup, your site should be automatically deployed on every commit on master. For `GUTENBERG_VERSION`, you may
use any of the tagged `release` versions in the GitHub repository—Netlify will automatically fetch the tagged version
With this setup, your site should be automatically deployed on every commit on master. For `ZOLA_VERSION`, you may
use any of the tagged `release` versions in the GitHub repository Netlify will automatically fetch the tagged version
and use it to build your site. and use it to build your site.


However, if you want to use everything that Netlify gives you, you should also publish temporary sites for pull requests. However, if you want to use everything that Netlify gives you, you should also publish temporary sites for pull requests.
@@ -26,34 +26,33 @@ the admin interface.


```toml ```toml
[build] [build]
# assuming the gutenberg site is in a docs folder, if it isn't you don't need
# assuming the Zola site is in a docs folder, if it isn't you don't need
# to have a `base` variable but you do need the `publish` and `command` # to have a `base` variable but you do need the `publish` and `command`
base = "docs" base = "docs"
publish = "docs/public" publish = "docs/public"
command = "gutenberg build"
command = "zola build"


[build.environment] [build.environment]
# Set the version name that you want to use and Netlify will automatically use it # Set the version name that you want to use and Netlify will automatically use it
GUTENBERG_VERSION = "0.3.3"
ZOLA_VERSION = "0.5.0"


# The magic for deploying previews of branches # The magic for deploying previews of branches
# We need to override the base url with whatever url Netlify assigns to our
# preview site. We do this using the Netlify environment variable
# We need to override the base url with whatever url Netlify assigns to our
# preview site. We do this using the Netlify environment variable
# `$DEPLOY_PRIME_URL`. # `$DEPLOY_PRIME_URL`.


[context.deploy-preview] [context.deploy-preview]
command = "gutenberg build --base-url $DEPLOY_PRIME_URL"

command = "zola build --base-url $DEPLOY_PRIME_URL"
``` ```


## Manual Deploys ## Manual Deploys
If you would prefer to use a version of Gutenberg that isn't a tagged release (for example, after having built Gutenberg from
If you would prefer to use a version of Zola that isn't a tagged release (for example, after having built Zola from
source and made modifications), then you will need to manually deploy your `public` folder to Netlify. You can do this through source and made modifications), then you will need to manually deploy your `public` folder to Netlify. You can do this through
Netlify's web GUI or via the command line. Netlify's web GUI or via the command line.


For a command-line manual deploy, follow these steps: For a command-line manual deploy, follow these steps:
1. Generate a `Personal Access Token` from the settings section of your Netlify account (*not* an OAuth Application) 1. Generate a `Personal Access Token` from the settings section of your Netlify account (*not* an OAuth Application)
2. Build your site with `gutenberg build`
2. Build your site with `zola build`
3. Create a zip folder containing the `public` directory 3. Create a zip folder containing the `public` directory
4. Run the `curl` command below, filling in your values for PERSONAL_ACCESS_TOKEN_FROM_STEP_1, FILE_NAME.zip and SITE_NAME 4. Run the `curl` command below, filling in your values for PERSONAL_ACCESS_TOKEN_FROM_STEP_1, FILE_NAME.zip and SITE_NAME
5. (Optional) delete the zip folder 5. (Optional) delete the zip folder


+ 1
- 1
docs/content/documentation/deployment/overview.md View File

@@ -3,7 +3,7 @@ title = "Overview"
weight = 10 weight = 10
+++ +++


Gutenberg outputs plain files, no databases needed. This makes hosting and deployment
Zola outputs plain files, no databases needed. This makes hosting and deployment
trivial on many providers. trivial on many providers.





+ 20
- 20
docs/content/documentation/getting-started/cli-usage.md View File

@@ -3,34 +3,34 @@ title = "CLI usage"
weight = 2 weight = 2
+++ +++


Gutenberg only has 3 commands: init, build and serve.
Zola only has 3 commands: init, build and serve.


You can view the help of the whole program by running `gutenberg --help` and
the command help by running `gutenberg <cmd> --help`.
You can view the help of the whole program by running `zola --help` and
the command help by running `zola <cmd> --help`.


## init ## init


Creates the directory structure used by Gutenberg at the given directory.
Creates the directory structure used by Zola at the given directory.


```bash ```bash
$ gutenberg init my_site
$ zola init my_site
``` ```


will create a new folder named `my_site` and the files/folders needed by will create a new folder named `my_site` and the files/folders needed by
Gutenberg.
zola.


## build ## build


This will build the whole site in the `public` directory. This will build the whole site in the `public` directory.


```bash ```bash
$ gutenberg build
$ zola build
``` ```


You can override the config `base_url` by passing a new URL to the `base-url` flag. You can override the config `base_url` by passing a new URL to the `base-url` flag.


```bash ```bash
$ gutenberg build --base-url $DEPLOY_URL
$ zola build --base-url $DEPLOY_URL
``` ```


This is useful for example when you want to deploy previews of a site to a dynamic URL, such as Netlify This is useful for example when you want to deploy previews of a site to a dynamic URL, such as Netlify
@@ -39,13 +39,13 @@ deploy previews.
+You can override the default output directory 'public' by passing a other value to the `output-dir` flag. +You can override the default output directory 'public' by passing a other value to the `output-dir` flag.


```bash ```bash
$ gutenberg build --output-dir $DOCUMENT_ROOT
$ zola build --output-dir $DOCUMENT_ROOT
``` ```


You can also point to another config file than `config.toml` like so - the position of the `config` option is important: You can also point to another config file than `config.toml` like so - the position of the `config` option is important:


```bash ```bash
$ gutenberg --config config.staging.toml build
$ zola --config config.staging.toml build
``` ```


## serve ## serve
@@ -54,28 +54,28 @@ This will build and serve the site using a local server. You can also specify
the interface/port combination to use if you want something different than the default (`127.0.0.1:1111`). the interface/port combination to use if you want something different than the default (`127.0.0.1:1111`).


You can also specify different addresses for the interface and base_url using `-u`/`--base-url`, for example You can also specify different addresses for the interface and base_url using `-u`/`--base-url`, for example
if you are running Gutenberg in a Docker container.
if you are running zola in a Docker container.


```bash ```bash
$ gutenberg serve
$ gutenberg serve --port 2000
$ gutenberg serve --interface 0.0.0.0
$ gutenberg serve --interface 0.0.0.0 --port 2000
$ gutenberg serve --interface 0.0.0.0 --base-url 127.0.0.1
$ gutenberg serve --interface 0.0.0.0 --port 2000 --output-dir www/public
$ zola serve
$ zola serve --port 2000
$ zola serve --interface 0.0.0.0
$ zola serve --interface 0.0.0.0 --port 2000
$ zola serve --interface 0.0.0.0 --base-url 127.0.0.1
$ zola serve --interface 0.0.0.0 --port 2000 --output-dir www/public
``` ```


The serve command will watch all your content and will provide live reload, without The serve command will watch all your content and will provide live reload, without
hard refresh if possible. hard refresh if possible.


Gutenberg does a best-effort to live reload but some changes cannot be handled automatically. If you
fail to see your change or get a weird error, try to restart `gutenberg serve`.
Zola does a best-effort to live reload but some changes cannot be handled automatically. If you
fail to see your change or get a weird error, try to restart `zola serve`.




You can also point to another config file than `config.toml` like so - the position of the `config` option is important: You can also point to another config file than `config.toml` like so - the position of the `config` option is important:


```bash ```bash
$ gutenberg --config config.staging.toml serve
$ zola --config config.staging.toml serve
``` ```


## Colored output ## Colored output


+ 5
- 5
docs/content/documentation/getting-started/configuration.md View File

@@ -3,7 +3,7 @@ title = "Configuration"
weight = 4 weight = 4
+++ +++


The default configuration will be enough to get Gutenberg running locally but not more than that.
The default configuration will be enough to get Zola running locally but not more than that.
It follows the philosophy of only paying for what you need: almost everything is turned off by default. It follows the philosophy of only paying for what you need: almost everything is turned off by default.


To change the config, edit the `config.toml` file. To change the config, edit the `config.toml` file.
@@ -11,7 +11,7 @@ If you are not familiar with TOML, have a look at [the TOML Spec](https://github
to learn about it. to learn about it.


Only one variable - `base_url` - is mandatory, everything else is optional. You can find all variables Only one variable - `base_url` - is mandatory, everything else is optional. You can find all variables
used by Gutenberg config as well as their default values below:
used by Zola config as well as their default values below:




```toml ```toml
@@ -84,7 +84,7 @@ extra_syntaxes = []


## Syntax highlighting ## Syntax highlighting


Gutenberg currently has the following highlight themes available:
Zola currently has the following highlight themes available:


- [1337](https://tmtheme-editor.herokuapp.com/#!/editor/theme/1337) - [1337](https://tmtheme-editor.herokuapp.com/#!/editor/theme/1337)
- [agola-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Agola%20Dark) - [agola-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Agola%20Dark)
@@ -115,5 +115,5 @@ Gutenberg currently has the following highlight themes available:
- [subway-moscow](https://github.com/idleberg/Subway.tmTheme) - [subway-moscow](https://github.com/idleberg/Subway.tmTheme)
- [visual-studio-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Visual%20Studio%20Dark) - [visual-studio-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Visual%20Studio%20Dark)


Gutenberg uses the Sublime Text themes, making it very easy to add more.
If you want a theme not on that list, please open an issue or a pull request on the [Gutenberg repo](https://github.com/Keats/gutenberg).
Zola uses the Sublime Text themes, making it very easy to add more.
If you want a theme not on that list, please open an issue or a pull request on the [Zola repo](https://github.com/getzola/zola).

+ 2
- 2
docs/content/documentation/getting-started/directory-structure.md View File

@@ -3,7 +3,7 @@ title = "Directory structure"
weight = 3 weight = 3
+++ +++


After running `gutenberg init`, you should see the following structure in your folder:
After running `zola init`, you should see the following structure in your folder:




```bash ```bash
@@ -21,7 +21,7 @@ After running `gutenberg init`, you should see the following structure in your f
Here's a high level overview of each of these folders and `config.toml`. Here's a high level overview of each of these folders and `config.toml`.


## `config.toml` ## `config.toml`
A mandatory configuration file of Gutenberg in TOML format.
A mandatory configuration file of Zola in TOML format.
It is explained in details in the [Configuration page](./documentation/getting-started/configuration.md). It is explained in details in the [Configuration page](./documentation/getting-started/configuration.md).


## `content` ## `content`


+ 11
- 11
docs/content/documentation/getting-started/installation.md View File

@@ -3,31 +3,31 @@ title = "Installation"
weight = 1 weight = 1
+++ +++


Gutenberg provides pre-built binaries for MacOS, Linux and Windows on the
[GitHub release page](https://github.com/Keats/gutenberg/releases).
Zola provides pre-built binaries for MacOS, Linux and Windows on the
[GitHub release page](https://github.com/getzola/zola/releases).


## Mac OS ## Mac OS


Gutenberg is available on [Brew](https://brew.sh):
Zola is available on [Brew](https://brew.sh):


```bash ```bash
$ brew install gutenberg
$ brew install zola
``` ```


## Windows ## Windows


Gutenberg is available on [Scoop](http://scoop.sh):
Zola is available on [Scoop](http://scoop.sh):


```bash ```bash
$ scoop install gutenberg
$ scoop install zola
``` ```


## Arch Linux ## Arch Linux


Use your favourite AUR helper to install the `gutenberg-bin` package.
Use your favourite AUR helper to install the `zola-bin` package.


```bash ```bash
$ yaourt -S gutenberg-bin
$ yaourt -S zola-bin
``` ```


## Void Linux ## Void Linux
@@ -35,11 +35,11 @@ $ yaourt -S gutenberg-bin
From the terminal, run the following command: From the terminal, run the following command:


```bash ```bash
$ xbps-install -S gutenberg
$ xbps-install -S zola
``` ```


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


- OSX, Linux and other Unix: `make` (`gmake` on BSDs), `g++`, `libssl-dev` - OSX, Linux and other Unix: `make` (`gmake` on BSDs), `g++`, `libssl-dev`
@@ -52,5 +52,5 @@ $ cargo build --release
``` ```


The binary will be available in the `target/release` folder. You can move it in your `$PATH` to have the The binary will be available in the `target/release` folder. You can move it in your `$PATH` to have the
`gutenberg` command available globally or in a directory if you want for example to have the binary in 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. same repository as the site.

+ 1
- 1
docs/content/documentation/templates/404.md View File

@@ -3,6 +3,6 @@ title = "404 error page"
weight = 80 weight = 80
+++ +++


Gutenberg will look for a `404.html` file in the `templates` directory or
Zola will look for a `404.html` file in the `templates` directory or
use the built-in one. The default template is very basic and gets a simple use the built-in one. The default template is very basic and gets a simple
variable in the context: the site `config`. variable in the context: the site `config`.

+ 1
- 1
docs/content/documentation/templates/archive.md View File

@@ -3,7 +3,7 @@ title = "Archive"
weight = 90 weight = 90
+++ +++


Gutenberg doesn't have a built-in way to display an archive page, a page showing
Zola doesn't have a built-in way to display an archive page, a page showing
all post titles ordered by year. However, this can be accomplished directly in the templates: all post titles ordered by year. However, this can be accomplished directly in the templates:


```jinja2 ```jinja2


+ 11
- 11
docs/content/documentation/templates/overview.md View File

@@ -3,10 +3,10 @@ title = "Overview"
weight = 10 weight = 10
+++ +++


Gutenberg uses the [Tera](https://tera.netlify.com) template engine and is very similar
Zola uses the [Tera](https://tera.netlify.com) template engine and is very similar
to Jinja2, Liquid or Twig. to Jinja2, Liquid or Twig.


As this documentation will only talk about how templates work in Gutenberg, please read
As this documentation will only talk about how templates work in Zola, please read
the [Tera template documentation](https://tera.netlify.com/docs/templates/) if you want the [Tera template documentation](https://tera.netlify.com/docs/templates/) if you want
to learn more about it first. to learn more about it first.


@@ -20,7 +20,7 @@ A few variables are available on all templates minus RSS and sitemap:
- `current_url`: the full URL for that page - `current_url`: the full URL for that page


## Standard Templates ## Standard Templates
By default, Gutenberg will look for three templates: `index.html`, which is applied
By default, Zola will look for three templates: `index.html`, which is applied
to the site homepage; `section.html`, which is applied to all sections (any HTML to the site homepage; `section.html`, which is applied to all sections (any HTML
page generated by creating a directory within your `content` directory); and page generated by creating a directory within your `content` directory); and
`page.html`, which is applied to all pages (any HTML page generated by creating a `page.html`, which is applied to all pages (any HTML page generated by creating a
@@ -32,7 +32,7 @@ section variables. The `page.html` template has access to the page variables.
The page and section variables are described in more detail in the next section of this documentation. The page and section variables are described in more detail in the next section of this documentation.


## Built-in Templates ## Built-in Templates
Gutenberg comes with three built-in templates: `rss.xml`, `sitemap.xml`, and
Zola comes with three built-in templates: `rss.xml`, `sitemap.xml`, and
`robots.txt` (each described in their own section of this documentation). `robots.txt` (each described in their own section of this documentation).
Additionally, themes can add their own templates, which will be applied if not Additionally, themes can add their own templates, which will be applied if not
overridden. You can override built-in or theme templates by creating a template with overridden. You can override built-in or theme templates by creating a template with
@@ -55,11 +55,11 @@ Custom templates are not required to live at the root of your `templates` direct
For example, `product_pages/with_pictures.html` is a valid template. For example, `product_pages/with_pictures.html` is a valid template.


## Built-in filters ## Built-in filters
Gutenberg adds a few filters, in addition of the ones already present in Tera.
Zola adds a few filters, in addition of the ones already present in Tera.


### markdown ### markdown
Converts the given variable to HTML using Markdown. This doesn't apply any of the Converts the given variable to HTML using Markdown. This doesn't apply any of the
features that Gutenberg adds to Markdown: internal links, shortcodes etc won't work.
features that Zola adds to Markdown: internal links, shortcodes etc won't work.


By default, the filter will wrap all text into a paragraph. To disable that, you can By default, the filter will wrap all text into a paragraph. To disable that, you can
pass `true` to the inline argument: pass `true` to the inline argument:
@@ -76,7 +76,7 @@ Decode the variable from base64.




## Built-in global functions ## Built-in global functions
Gutenberg adds a few global functions to Tera in order to make it easier to develop complex sites.
Zola adds a few global functions to Tera in order to make it easier to develop complex sites.


### `get_page` ### `get_page`
Takes a path to a `.md` file and returns the associated page Takes a path to a `.md` file and returns the associated page
@@ -151,9 +151,9 @@ The `path` argument specifies the path to the data file relative to your content
{% set data = load_data(path="blog/story/data.toml") %} {% set data = load_data(path="blog/story/data.toml") %}
``` ```


The optional `kind` argument allows you to specify and override which data type is contained
The optional `kind` argument allows you to specify and override which data type is contained
within the file specified in the `path` argument. Valid entries are *"toml"*, *"json"* within the file specified in the `path` argument. Valid entries are *"toml"*, *"json"*
or *"csv"*.
or *"csv"*.


```jinja2 ```jinja2
{% set data = load_data(path="blog/story/data.txt", kind="json") %} {% set data = load_data(path="blog/story/data.txt", kind="json") %}
@@ -161,7 +161,7 @@ or *"csv"*.


For *toml* and *json* the data is loaded into a structure matching the original data file, For *toml* and *json* the data is loaded into a structure matching the original data file,
however for *csv* there is no native notion of such a structure. Instead the data is seperated however for *csv* there is no native notion of such a structure. Instead the data is seperated
into a data structure containing *headers* and *records*. See the example below to see
into a data structure containing *headers* and *records*. See the example below to see
how this works. how this works.


In the template: In the template:
@@ -182,7 +182,7 @@ template:
{ {
"headers": ["Number", "Title"], "headers": ["Number", "Title"],
"records": [ "records": [
["1", "Gutenberg"],
["1", "Gutenberg"],
["2", "Printing"] ["2", "Printing"]
], ],
} }


+ 2
- 2
docs/content/documentation/templates/pages-sections.md View File

@@ -6,7 +6,7 @@ weight = 20
Pages and sections are actually very similar. Pages and sections are actually very similar.


## Page variables ## Page variables
Gutenberg will try to load the `templates/page.html` template, the `page.html` template of the theme if one is used
Zola will try to load the `templates/page.html` template, the `page.html` template of the theme if one is used
or will render the built-in template: a blank page. or will render the built-in template: a blank page.


Whichever template you decide to render, you will get a `page` variable in your template Whichever template you decide to render, you will get a `page` variable in your template
@@ -54,7 +54,7 @@ relative_path: String;
``` ```


## Section variables ## Section variables
By default, Gutenberg will try to load `templates/index.html` for `content/_index.md`
By default, Zola will try to load `templates/index.html` for `content/_index.md`
and `templates/section.html` for others `_index.md` files. If there isn't and `templates/section.html` for others `_index.md` files. If there isn't
one, it will render the built-in template: a blank page. one, it will render the built-in template: a blank page.




+ 1
- 1
docs/content/documentation/templates/robots.md View File

@@ -3,7 +3,7 @@ title = "Robots.txt"
weight = 70 weight = 70
+++ +++


Gutenberg will look for a `robots.txt` file in the `templates` directory or
Zola will look for a `robots.txt` file in the `templates` directory or
use the built-in one. use the built-in one.


Robots.txt is the simplest of all templates: it only gets the config Robots.txt is the simplest of all templates: it only gets the config


+ 2
- 2
docs/content/documentation/templates/rss.md View File

@@ -3,9 +3,9 @@ title = "RSS"
weight = 50 weight = 50
+++ +++


If the site `config.toml` file sets `generate_rss = true`, then Gutenberg will
If the site `config.toml` file sets `generate_rss = true`, then Zola will
generate an `rss.xml` page for the site, which will live at `base_url/rss.xml`. To generate an `rss.xml` page for the site, which will live at `base_url/rss.xml`. To
generate the `rss.xml` page, Gutenberg will look for a `rss.xml` file in the `templates`
generate the `rss.xml` page, Zola will look for a `rss.xml` file in the `templates`
directory or, if one does not exist, will use the use the built-in rss template. directory or, if one does not exist, will use the use the built-in rss template.
Currently it is only possible to have one RSS feed for the whole site; you cannot Currently it is only possible to have one RSS feed for the whole site; you cannot
create a RSS feed per section or taxonomy. create a RSS feed per section or taxonomy.


+ 1
- 1
docs/content/documentation/templates/sitemap.md View File

@@ -3,7 +3,7 @@ title = "Sitemap"
weight = 60 weight = 60
+++ +++


Gutenberg will look for a `sitemap.xml` file in the `templates` directory or
Zola will look for a `sitemap.xml` file in the `templates` directory or
use the built-in one. use the built-in one.






+ 1
- 1
docs/content/documentation/templates/taxonomies.md View File

@@ -3,7 +3,7 @@ title = "Taxonomies"
weight = 40 weight = 40
+++ +++


Gutenberg will look up the following files in the `templates` directory:
Zola will look up the following files in the `templates` directory:


- `$TAXONOMY_NAME/single.html` - `$TAXONOMY_NAME/single.html`
- `$TAXONOMY_NAME/list.html` - `$TAXONOMY_NAME/list.html`


+ 7
- 7
docs/content/documentation/themes/creating-a-theme.md View File

@@ -3,12 +3,12 @@ title = "Creating a theme"
weight = 30 weight = 30
+++ +++


Creating is exactly like creating a normal site with Gutenberg, except you
Creating is exactly like creating a normal site with Zola, except you
will want to use many [Tera blocks](https://tera.netlify.com/docs/templates/#inheritance) to will want to use many [Tera blocks](https://tera.netlify.com/docs/templates/#inheritance) to
allow users to easily modify it. allow users to easily modify it.


## Getting started ## Getting started
As mentioned, a theme is just like any site: start with running `gutenberg init MY_THEME_NAME`.
As mentioned, a theme is just like any site: start with running `zola init MY_THEME_NAME`.


The only thing needed to turn that site into a theme is to add `theme.toml` configuration file with the The only thing needed to turn that site into a theme is to add `theme.toml` configuration file with the
following fields: following fields:
@@ -17,8 +17,8 @@ following fields:
name = "my theme name" name = "my theme name"
description = "A classic blog theme" description = "A classic blog theme"
license = "MIT" license = "MIT"
homepage = "https://github.com/Keats/gutenberg-hyde"
# The minimum version of Gutenberg required
homepage = "https://github.com/Keats/zola-hyde"
# The minimum version of Zola required
min_version = "0.4.0" min_version = "0.4.0"
# An optional live demo URL # An optional live demo URL
demo = "" demo = ""
@@ -26,7 +26,7 @@ demo = ""
# Any variable there can be overriden in the end user `config.toml` # Any variable there can be overriden in the end user `config.toml`
# You don't need to prefix variables by the theme name but as this will # You don't need to prefix variables by the theme name but as this will
# be merged with user data, some kind of prefix or nesting is preferable # be merged with user data, some kind of prefix or nesting is preferable
# Use snake_casing to be consistent with the rest of Gutenberg
# Use snake_casing to be consistent with the rest of Zola
[extra] [extra]


# The theme author info: you! # The theme author info: you!
@@ -45,7 +45,7 @@ repo = "https://www.github.com/mdo/hyde"
A simple theme you can use as example is [Hyde](https://github.com/Keats/hyde). A simple theme you can use as example is [Hyde](https://github.com/Keats/hyde).


## Working on a theme ## Working on a theme
As a theme is just a site, you can simply use `gutenberg serve` and make changes to your
As a theme is just a site, you can simply use `zola serve` and make changes to your
theme, with live reloading working as expected. theme, with live reloading working as expected.


Make sure to commit every directory (including `content`) in order for other people Make sure to commit every directory (including `content`) in order for other people
@@ -72,6 +72,6 @@ The first step is to make sure the theme is fulfilling those three requirements:
of importance of importance
- be of reasonably high quality - be of reasonably high quality


When your theme is ready, you can submit it to the [themes repository](https://github.com/Keats/gutenberg-themes)
When your theme is ready, you can submit it to the [themes repository](https://github.com/getzola/themes)
by following the process in the README. by following the process in the README.



+ 1
- 1
docs/content/documentation/themes/installing-and-using-themes.md View File

@@ -21,7 +21,7 @@ them in a folder.
## Using a theme ## Using a theme


Now that you have the theme in your `themes` directory, you only need to tell Now that you have the theme in your `themes` directory, you only need to tell
Gutenberg to use it to get started by setting the `theme` variable of the
Zola to use it to get started by setting the `theme` variable of the
[configuration file](./documentation/getting-started/configuration.md). The theme [configuration file](./documentation/getting-started/configuration.md). The theme
name has to be name of the directory you cloned the theme in. name has to be 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 For example, if you cloned a theme in `themes/simple-blog`, the theme name to use


+ 2
- 2
docs/content/documentation/themes/overview.md View File

@@ -3,8 +3,8 @@ title = "Overview"
weight = 10 weight = 10
+++ +++


Gutenberg has built-in support for themes in a way that are easy to customise
Zola has built-in support for themes in a way that are easy to customise
but still easy to update if needed. but still easy to update if needed.


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



+ 2
- 2
docs/sass/_docs.scss View File

@@ -45,7 +45,7 @@
margin-left: 2rem; margin-left: 2rem;


h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
.gutenberg-anchor {
.zola-anchor {
font-size: 1.25rem; font-size: 1.25rem;
visibility: hidden; visibility: hidden;
margin-left: -2rem; margin-left: -2rem;
@@ -55,7 +55,7 @@
} }


&:hover { &:hover {
.gutenberg-anchor {
.zola-anchor {
visibility: visible; visibility: visible;
} }
} }


BIN
docs/static/favicon.ico View File

Before After

+ 12
- 12
docs/templates/index.html View File

@@ -7,17 +7,17 @@
<meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}"> <meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}">
<meta name="author" content="{{ config.extra.author }}"> <meta name="author" content="{{ config.extra.author }}">
<title>{% block title %}{{ config.title }}{% endblock title %}</title> <title>{% block title %}{{ config.title }}{% endblock title %}</title>
<link rel="stylesheet" href="{{ get_url(path="site.css", trailing_slash=false) }}"/>
<link rel="icon" href="{{ get_url(path="favicon.ico", trailing_slash=false) }}">
<link rel="stylesheet" href="{{ get_url(path="site.css") }}"/>
<link rel="icon" href="{{ get_url(path="favicon.ico") }}">
</head> </head>
<body> <body>


<header> <header>
<nav class="{% block extra_nav_class %}container{% endblock extra_nav_class %}"> <nav class="{% block extra_nav_class %}container{% endblock extra_nav_class %}">
<a class="header__logo white" href="{{ config.base_url }}">Gutenberg</a>
<a class="header__logo white" href="{{ config.base_url }}">Zola</a>
<a class="white" href="{{ get_url(path="./documentation/_index.md") }}" class="nav-link">Docs</a> <a class="white" href="{{ get_url(path="./documentation/_index.md") }}" class="nav-link">Docs</a>
<a class="white" href="{{ get_url(path="./themes/_index.md") }}" class="nav-link">Themes</a> <a class="white" href="{{ get_url(path="./themes/_index.md") }}" class="nav-link">Themes</a>
<a class="white" href="https://github.com/Keats/gutenberg" class="nav-link">GitHub</a>
<a class="white" href="https://github.com/getzola/zola" class="nav-link">GitHub</a>


<div class="search-container"> <div class="search-container">
<input id="search" type="search" placeholder="🔎 Search the docs"> <input id="search" type="search" placeholder="🔎 Search the docs">
@@ -44,7 +44,7 @@
<div class="selling-point"> <div class="selling-point">
<h2>No dependencies</h2> <h2>No dependencies</h2>
<p> <p>
Gutenberg comes as a single executable with Sass compilation, syntax highlighting, table of contents
Zola comes as a single executable with Sass compilation, syntax highlighting, table of contents
and many other features that traditionally require setting up a dev environment and many other features that traditionally require setting up a dev environment
or adding some JavaScript libraries to your site. or adding some JavaScript libraries to your site.
</p> </p>
@@ -62,7 +62,7 @@
<div class="selling-point"> <div class="selling-point">
<h2>Scalable</h2> <h2>Scalable</h2>
<p> <p>
Gutenberg renders your whole site as static files, making it trivial to handle
Zola renders your whole site as static files, making it trivial to handle
any kind of traffic you will throw at it at no cost without having any kind of traffic you will throw at it at no cost without having
to worry about managing a server or a database. to worry about managing a server or a database.
</p> </p>
@@ -80,7 +80,7 @@
<div class="selling-point"> <div class="selling-point">
<h2>Flexible</h2> <h2>Flexible</h2>
<p> <p>
Gutenberg gets out of your way so you can focus on your content, be it a blog,
Zola gets out of your way so you can focus on your content, be it a blog,
a knowledge base, a landing page or a combination of them. a knowledge base, a landing page or a combination of them.
</p> </p>
</div> </div>
@@ -88,7 +88,7 @@
<div class="selling-point"> <div class="selling-point">
<h2>Augmented Markdown</h2> <h2>Augmented Markdown</h2>
<p> <p>
Gutenberg comes with <a href="{{ get_url(path="./documentation/content/shortcodes.md") }}">shortcodes</a> and
Zola comes with <a href="{{ get_url(path="./documentation/content/shortcodes.md") }}">shortcodes</a> and
<a href="{{ get_url(path="./documentation/content/linking.md") }}">internal links</a> <a href="{{ get_url(path="./documentation/content/linking.md") }}">internal links</a>
to make it easier to write your content. to make it easier to write your content.
</p> </p>
@@ -99,11 +99,11 @@
{% endblock content %} {% endblock content %}
</div> </div>
<footer> <footer>
©2017-2018 — <a class="white" href="https://vincent.is">Vincent Prouillet</a> and <a class="white" href="https://github.com/Keats/gutenberg/graphs/contributors">contributors</a>
©2017-2018 — <a class="white" href="http://vincentprouillet.com">Vincent Prouillet</a> and <a class="white" href="https://github.com/getzola/zola/graphs/contributors">contributors</a>
</footer> </footer>


<script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js", trailing_slash=false) }}"></script>
<script type="text/javascript" src="{{ get_url(path="search_index.en.js", trailing_slash=false) }}"></script>
<script type="text/javascript" src="{{ get_url(path="search.js", trailing_slash=false) }}"></script>
<script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js") }}"></script>
<script type="text/javascript" src="{{ get_url(path="search_index.en.js") }}"></script>
<script type="text/javascript" src="{{ get_url(path="search.js") }}"></script>
</body> </body>
</html> </html>

+ 1
- 1
docs/templates/theme.html View File

@@ -1,6 +1,6 @@
{% extends "themes.html" %} {% extends "themes.html" %}


{% block title %}{{ page.title }} | Gutenberg {% endblock title %}
{% block title %}{{ page.title }} | Zola {% endblock title %}
{% block theme_content %} {% block theme_content %}
<div class="theme-info"> <div class="theme-info">
<img src="{{page.permalink}}screenshot.png" class="thumb"> <img src="{{page.permalink}}screenshot.png" class="thumb">


+ 1
- 1
docs/templates/themes.html View File

@@ -8,7 +8,7 @@
{% block content %} {% block content %}
<div class="themes-container"> <div class="themes-container">
{% block theme_content %} {% block theme_content %}
<h1>Gutenberg themes</h1>
<h1>Zola themes</h1>
<div class="themes"> <div class="themes">
{% for theme in section.pages %} {% for theme in section.pages %}
<a class="theme" href="{{theme.permalink}}"> <a class="theme" href="{{theme.permalink}}">


+ 2
- 2
snapcraft.yaml View File

@@ -9,14 +9,14 @@ grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots confinement: strict # use 'strict' once you have the right plugs and slots


apps: apps:
gutenberg:
zola:
command: zola command: zola
plugs: plugs:
- network - network
- network-bind - network-bind


parts: parts:
gutenberg:
zola:
plugin: rust plugin: rust
rust-channel: stable rust-channel: stable
build-packages: build-packages:


Loading…
Cancel
Save