Skip to content

Commit

Permalink
Fixes #12, #13: Move language-specific configs into language sections
Browse files Browse the repository at this point in the history
  • Loading branch information
justint committed Mar 11, 2023
1 parent d6c47e7 commit 3c55ee8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
17 changes: 8 additions & 9 deletions README.md
Expand Up @@ -15,7 +15,7 @@ A clean [Zola](https://getzola.org) theme for blogging and projects, forked from
- Blog posts
- Project pages
- Categories and tags
- Multilingual support
- Optional multilingual support
- Customizable sections and navigation menu links
- Featured images for posts/pages
- Smart image embedding shortcode (`{{ img() }}`)
Expand All @@ -38,14 +38,13 @@ A clean [Zola](https://getzola.org) theme for blogging and projects, forked from
theme = "papaya"
```

3. This theme requires both the `tags` and `categories` taxonomies.
3. Copy the following sections and keys (and their contents/values) from papaya's [`config.toml`](https://github.com/justint/papaya/blob/main/config.toml) and paste them into your site's `config.toml`:

```toml
taxonomies = [
{ name = "categories" },
{ name = "tags" },
]
```
- `[languages]`
- `[languages.en]`
- `[languages.en.translations]`
- `[extra.cdn]`
- `font_awesome`

4. In your `content` directory, add new `blog` and `projects` directories. Copy the `_index.md` file from Papaya's `content/blog` into your `content/blog`, and the `_index.md` and `categories.json` files from Papaya's `content/projects` into your `content/projects`.

Expand Down Expand Up @@ -123,7 +122,7 @@ The example project page above would be grouped into & displayed within the "Sof

### Multilingual support

Currently Zola has a basic internationalization (i18n) support, you can see this at [zola doc](https://www.getzola.org/documentation/content/multilingual/).
Currently Zola has basic internationalization (`i18n`) support, you can read more in [zola's Multilingual Sites doc](https://www.getzola.org/documentation/content/multilingual/).

To write a multilingual site, follow the steps below (English and Chinese in this example):

Expand Down
12 changes: 2 additions & 10 deletions config.toml
@@ -1,8 +1,6 @@
# The URL the site will be built for
base_url = "https://justintennant.me/papaya"

title = "Papaya"
description = "A clean Zola theme for blogging and projects"
default_language = "en"

# Whether to automatically compile all Sass files in the sass directory
Expand All @@ -15,14 +13,6 @@ build_search_index = false
# When set to "true", a feed is automatically generated.
generate_feed = true

# The taxonomies to be rendered for the site and their configuration of the default languages
taxonomies = [
{ name = "tags", feed = true, lang = "en" },
{ name = "tags", feed = true, lang = "zh" },
{ name = "categories", feed = true, lang = "en" },
{ name = "categories", feed = true, lang = "zh" },
]

[markdown]
# When set to "true", all code blocks are highlighted.
highlight_code = true
Expand All @@ -38,6 +28,7 @@ title = "Papaya"
description = "A clean Zola theme for blogging and projects"
generate_feed = true
feed_filename = "atom.xml"
# The taxonomies to be rendered for the site and their configuration of the default languages
taxonomies = [
{ name = "tags", feed = true, lang = "en" },
{ name = "categories", feed = true, lang = "en" },
Expand Down Expand Up @@ -70,6 +61,7 @@ title = "帕帕雅"
description = "一个清新的 Zola 博客与项目模板"
base_url = "https://justintennant.me/papaya/zh"
generate_feed = true
# The taxonomies to be rendered for the site and their configuration of the default languages
taxonomies = [
{ name = "tags", feed = true, lang = "zh" },
{ name = "categories", feed = true, lang = "zh" },
Expand Down

0 comments on commit 3c55ee8

Please sign in to comment.