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 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. +++
  2. title = "sam"
  3. description = "A Simple and Minimalist theme with a focus on typography and content."
  4. template = "theme.html"
  5. date = 2019-07-02T17:55:24+02:00
  6. [extra]
  7. created = 2019-07-02T17:55:24+02:00
  8. updated = 2019-07-02T17:55:24+02:00
  9. repository = "https://github.com/janbaudisch/zola-sam.git"
  10. homepage = "https://github.com/janbaudisch/zola-sam"
  11. minimum_version = "0.4.0"
  12. license = "AGPL-3.0"
  13. demo = "https://zola-sam.janbaudisch.dev"
  14. [extra.author]
  15. name = "Jan Baudisch"
  16. homepage = "https://janbaudisch.dev"
  17. +++
  18. [![Build Status][build-img]][build-url]
  19. [![Demo][demo-img]][demo-url]
  20. # Sam
  21. > A Simple and Minimalist theme with a focus on typography and content.
  22. >
  23. > [Zola][zola] port of [hugo-theme-sam][hugo-sam].
  24. ![Screenshot](screenshot.png)
  25. ## Original
  26. This is a port of the original [hugo-theme-sam][hugo-sam] theme for Hugo ([License][upstream-license]).
  27. See [`upstream`][upstream] for source code take from there.
  28. ## Installation
  29. The easiest way to install this theme is to either clone it ...
  30. ```
  31. git clone https://github.com/janbaudisch/zola-sam.git themes/sam
  32. ```
  33. ... or to use it as a submodule.
  34. ```
  35. git submodule add https://github.com/janbaudisch/zola-sam.git themes/sam
  36. ```
  37. Either way, you will have to enable the theme in your `config.toml`.
  38. ```toml
  39. theme = "sam"
  40. ```
  41. ## Options
  42. See [`config.toml`][config] for an example configuration.
  43. ### Menu
  44. The menu on the index page is created as follows: If the `sam_menu` variable is set, it gets used.
  45. ```toml
  46. [extra]
  47. sam_menu = [
  48. { text = "posts", link = "/posts" },
  49. { text = "about", link = "/about" },
  50. { text = "github", link = "https://github.com" }
  51. ]
  52. ```
  53. If it is not set, all sections under `content` will get linked.
  54. #### Bottom menu
  55. This variable decides wether the menu - as mentioned above - will also be displayed at the bottom of pages.
  56. Default: `false`
  57. ```toml
  58. [extra]
  59. sam_bottom_menu = true
  60. ```
  61. ### `home`
  62. Sets the name for all links referring to the home page in the menus and the 404 page.
  63. Default: `home`
  64. ```toml
  65. [extra]
  66. home = "home"
  67. ```
  68. ### Date format
  69. Specifies how to display dates. The format is described [here][date-format-docs].
  70. Default: `%a %b %e, %Y`
  71. ```toml
  72. [extra]
  73. date_format = "%a %b %e, %Y"
  74. ```
  75. ### Word count and reading time
  76. You can enable or disable word count and reading time for posts across the whole site:
  77. Default: `true` (both)
  78. ```toml
  79. [extra]
  80. show_word_count = true
  81. show_reading_time = true
  82. ```
  83. If enabled, you can opt-out per page via front-matter:
  84. Default: `false` (both)
  85. ```
  86. +++
  87. [extra]
  88. hide_word_count = true
  89. hide_reading_time = true
  90. +++
  91. ```
  92. ### Disable page header
  93. If you want to disable the complete header of a page (for example a page which is explicitly not a post), you can do so via front-matter:
  94. Default: `false`
  95. ```
  96. +++
  97. [extra]
  98. no_header = true
  99. +++
  100. ```
  101. ### Footer
  102. To place some text at the end of pages, set the following:
  103. ```toml
  104. [extra.sam_footer]
  105. text = "Some footer text."
  106. ```
  107. [build-img]: https://travis-ci.com/janbaudisch/zola-sam.svg?branch=master
  108. [build-url]: https://travis-ci.com/janbaudisch/zola-sam
  109. [demo-img]: https://img.shields.io/badge/demo-live-green.svg
  110. [demo-url]: https://zola-sam.janbaudisch.dev
  111. [zola]: https://getzola.org
  112. [hugo-sam]: https://github.com/victoriadotdev/hugo-theme-sam
  113. [upstream]: https://github.com/janbaudisch/zola-sam/blob/master/upstream
  114. [upstream-license]: https://github.com/janbaudisch/zola-sam/blob/master/upstream/LICENSE
  115. [config]: https://github.com/janbaudisch/zola-sam/blob/master/config.toml
  116. [date-format-docs]: https://docs.rs/chrono/latest/chrono/format/strftime/index.html