fix: adjusted list_page option, typos
This commit is contained in:
parent
06e0d3f649
commit
2d7be35ef5
5 changed files with 27 additions and 11 deletions
13
README.md
13
README.md
|
@ -24,13 +24,22 @@ theme = "no-style-please"
|
|||
|
||||
### Pages list in homepage
|
||||
|
||||
To enable listing of pages in homepage add the following in `content\_index.md` frontmatter
|
||||
To enable listing of pages in homepage add the following in `config.toml`
|
||||
|
||||
```toml
|
||||
[exta]
|
||||
[extra]
|
||||
list_pages = false
|
||||
```
|
||||
|
||||
### Add TOC to pages
|
||||
|
||||
In a page frontmatter, set `extra.add_toc` to `true`
|
||||
|
||||
```toml
|
||||
[extra]
|
||||
add_toc = true
|
||||
```
|
||||
|
||||
### Extra data
|
||||
|
||||
- `author` can be set in both main config and in pages metadata
|
||||
|
|
|
@ -3,7 +3,6 @@ title = "no style, please!"
|
|||
description = "A (nearly) no-CSS, fast, minimalist Zola theme."
|
||||
|
||||
compile_sass = true
|
||||
build_search_index = false
|
||||
generate_feed = true
|
||||
|
||||
taxonomies = [
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
---
|
||||
extra:
|
||||
list_pages: false
|
||||
---
|
||||
|
||||
- info
|
||||
|
|
|
@ -8,31 +8,41 @@
|
|||
|
||||
{% if page.title %}
|
||||
{% set title = page.title %}
|
||||
{% else %}
|
||||
{% elif section.title %}
|
||||
{% set title = section.title %}
|
||||
{% elif config.title %}
|
||||
{% set title = config.title %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.extra.author %}
|
||||
{% set author = page.extra.author %}
|
||||
{% else %}
|
||||
{% elif section.extra.author %}
|
||||
{% set author = section.extra.author %}
|
||||
{% elif config.extra.author %}
|
||||
{% set author = config.extra.author %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.description %}
|
||||
{% set description = page.description | truncate(length=150) %}
|
||||
{% else %}
|
||||
{% elif section.description %}
|
||||
{% set description = section.description | truncate(length=150) %}
|
||||
{% elif config.description %}
|
||||
{% set description = config.description | truncate(length=150) %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.extra.image %}
|
||||
{% set image = get_url(path=page.extra.image, trailing_slash=false) %}
|
||||
{% else %}
|
||||
{% elif section.extra.image %}
|
||||
{% set image = get_url(path=section.extra.image, trailing_slash=false) %}
|
||||
{% elif config.extra.logo %}
|
||||
{% set image = get_url(path=config.extra.logo, trailing_slash=false) %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.permalink %}
|
||||
{% set url = page.permalink %}
|
||||
{% else %}
|
||||
{% elif section.permalink %}
|
||||
{% set url = section.permalink %}
|
||||
{% elif config.base_url %}
|
||||
{% set url = config.base_url %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% block content %}
|
||||
{{ section.content | safe }}
|
||||
|
||||
{% if section.extra.list_pages %}
|
||||
{% if config.extra.list_pages %}
|
||||
{% if paginator %}
|
||||
{% set pages = paginator.pages %}
|
||||
{% else %}
|
||||
|
|
Loading…
Reference in a new issue