Skip to content

Commit

Permalink
Merge pull request #67 from not-matthias/zola-install
Browse files Browse the repository at this point in the history
fix: install issues
  • Loading branch information
not-matthias authored Jul 9, 2024
2 parents 0a243a8 + 34a0e86 commit be85af5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 20 deletions.
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,28 @@ Modern and minimalistic blog theme powered by [Zola](https://getzola.org). See a
git submodule add https://github.com/not-matthias/apollo themes/apollo
```

2. Add `theme = "apollo"` to your `config.toml`
2. Add the following to the top of your `config.toml`

```toml
theme = "apollo"
taxonomies = [{ name = "tags" }]

[extra]
theme = "auto"
socials = [
# Configure socials here
]
menu = [
# Configure menu bar here
]

# See this for more options: https://github.com/not-matthias/apollo/blob/main/config.toml#L14
```

3. Copy the example content

```
cp -r themes/apollo/content content
cp -r themes/apollo/content/* content/
```

## Options
Expand Down Expand Up @@ -73,7 +90,7 @@ These filenames are relative to the root of the site. In this example, the two C
### MathJax

To enable MathJax equation rendering, set the variable `mathjax` to `true` in
the `extra` section of your config.toml. Set `mathjax_dollar_inline_enable` to
the `extra` section of your config.toml. Set `mathjax_dollar_inline_enable` to
`true` to render inline math by surrounding them inside $..$.

```toml
Expand All @@ -84,11 +101,11 @@ mathjax_dollar_inline_enable = true

## Config

### Customize `<meta/>` tags
### Customize `<meta/>` tags

The following TOML and YAML code will yiled two `<meta/>` tags, `<meta property="og:title" content="the og title"/>`, `<meta property="og:description" content="the og description"/>`.
The following TOML and YAML code will yiled two `<meta/>` tags, `<meta property="og:title" content="the og title"/>`, `<meta property="og:description" content="the og description"/>`.

TOML:
TOML:

```toml
title = "post title"
Expand All @@ -102,21 +119,21 @@ mathjax_dollar_inline_enable = true
]
```

YAML:
YAML:

```yaml
title: "post title"
description: "post desc"
date: "2023-01-01"
extra:
meta:
extra:
meta:
- property: "og:title"
content: "the og title"
- property: "og:description"
content: "the og description"
```

If the `og:title`, the `og:description`, or the "description" are not set, the page's title and description will be used. That is, the following TOML code generates `<meta property="og:title" content="post title"/>`, `<meta property="og:description" content="post desc"/>`, and `<meta property="og:description" content="post desc"/>` as default values.
If the `og:title`, the `og:description`, or the "description" are not set, the page's title and description will be used. That is, the following TOML code generates `<meta property="og:title" content="post title"/>`, `<meta property="og:description" content="post desc"/>`, and `<meta property="og:description" content="post desc"/>` as default values.

```toml
title = "post title"
Expand Down
4 changes: 2 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ base_url = "https://not-matthias.github.io/apollo/"
title = "not-matthias"
description = "This is an example description"
build_search_index = false
generate_feed = true
generate_feeds = true
compile_sass = true
minify_html = true
taxonomies = [{ name = "tags" }]
Expand All @@ -18,7 +18,7 @@ favicon = "/icon/favicon.png"
theme = "toggle" # light, dark, auto, toggle
comment = false
fancy_code = true
dynamic_note = true # a note that can be toggled
dynamic_note = true # a note that can be toggled
h_anchor_link = true
# mathjax = true
# mathjax_dollar_inline_enable = true
Expand Down
1 change: 0 additions & 1 deletion content/posts/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
+++
paginate_by = 7
path = "posts"
title = "Posts"
sort_by = "date"
+++
8 changes: 1 addition & 7 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@
Nothing here?!
{% endblock main_content %}

{% if page.extra.comment is defined %}
{% set show_comment = page.extra.comment %}
{% else %}
{% set show_comment = config.extra.comment %}
{% endif %}

{% if show_comment %}
{% if config.extra.comment | default(value=false) %}
<div class="giscus"></div>
{% include "_giscus_script.html" %}
{% endif %}
Expand Down

0 comments on commit be85af5

Please sign in to comment.