You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.md 2.9KB

6 years ago
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. +++
  2. title = "even"
  3. description = "A robust, elegant dark theme"
  4. template = "theme.html"
  5. date = 2018-01-25T18:44:44+01:00
  6. [extra]
  7. created = 2019-04-06T11:27:43+02:00
  8. updated = 2018-01-25T18:44:44+01:00
  9. repository = "https://github.com/getzola/even"
  10. homepage = "https://github.com/getzola/even"
  11. minimum_version = "0.6.0"
  12. license = "MIT"
  13. demo = "https://zola-even.netlify.com"
  14. [extra.author]
  15. name = "Vincent Prouillet"
  16. homepage = "https://www.vincentprouillet.com"
  17. +++
  18. # Even
  19. Even is a clean, responsive theme based on the Hugo theme with the same name featuring categories, tags and pagination.
  20. ![even screenshot](https://github.com/getzola/even/blob/master/screenshot.png?raw=true)
  21. ## Contents
  22. - [Installation](#installation)
  23. - [Options](#options)
  24. - [Top menu](#top-menu)
  25. - [Title](#title)
  26. ## Installation
  27. First download this theme to your `themes` directory:
  28. ```bash
  29. $ cd themes
  30. $ git clone https://github.com/getzola/even.git
  31. ```
  32. and then enable it in your `config.toml`:
  33. ```toml
  34. theme = "even"
  35. ```
  36. The theme requires tags and categories taxonomies to be enabled in your `config.toml`:
  37. ```toml
  38. taxonomies = [
  39. # You can enable/disable RSS
  40. {name = "categories", rss = true},
  41. {name = "tags", rss = true},
  42. ]
  43. ```
  44. If you want to paginate taxonomies pages, you will need to overwrite the templates
  45. as it only works for non-paginated taxonomies by default.
  46. It also requires to put the posts in the root of the `content` folder and to enable pagination, for example in `content/_index.md`:
  47. ```
  48. +++
  49. paginate_by = 5
  50. sort_by = "date"
  51. +++
  52. ```
  53. ## Options
  54. ### Top-menu
  55. Set a field in `extra` with a key of `even_menu`:
  56. ```toml
  57. # This is the default menu
  58. even_menu = [
  59. {url = "$BASE_URL", name = "Home"},
  60. {url = "$BASE_URL/categories", name = "Categories"},
  61. {url = "$BASE_URL/tags", name = "Tags"},
  62. {url = "$BASE_URL/about", name = "About"},
  63. ]
  64. ```
  65. If you put `$BASE_URL` in a url, it will automatically be replaced by the actual
  66. site URL.
  67. ### Title
  68. The site title is shown on the header. As it might be different from the `<title>`
  69. element that the `title` field in the config represents, you can set the `even_title`
  70. instead.
  71. ### KaTeX math formula support
  72. This theme contains math formula support using [KaTeX](https://katex.org/),
  73. which can be enabled by setting `katex_enable = true` in the `extra` section
  74. of `config.toml`:
  75. ```toml
  76. [extra]
  77. katex_enable = true
  78. ```
  79. After enabling this extension, the `katex` short code can be used in documents:
  80. * `{{/* katex(body="\KaTeX") */}}` to typeset a math formula inlined into a text,
  81. similar to `$...$` in LaTeX
  82. * `{%/* katex(block=true) */%}\KaTeX{%/* end */%}` to typeset a block of math formulas,
  83. similar to `$$...$$` in LaTeX
  84. #### Automatic rendering without short codes
  85. Optionally, `\\( \KaTeX \\)` inline and `\\[ \KaTeX \\]` / `$$ \KaTeX $$`
  86. block-style automatic rendering is also supported, if enabled in the config:
  87. ```toml
  88. [extra]
  89. katex_enable = true
  90. katex_auto_render = true
  91. ```