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.

configuration.md 6.2KB

7 years ago
7 years ago
6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. +++
  2. title = "Configuration"
  3. weight = 4
  4. +++
  5. The default configuration will be enough to get Zola running locally but not more than that.
  6. It follows the philosophy of only paying for what you need: almost everything is turned off by default.
  7. To change the config, edit the `config.toml` file.
  8. If you are not familiar with TOML, have a look at [the TOML Spec](https://github.com/toml-lang/toml)
  9. to learn about it.
  10. Only one variable - `base_url` - is mandatory, everything else is optional. You can find all variables
  11. used by Zola config as well as their default values below:
  12. ```toml
  13. # Base URL of the site, the only required config argument
  14. base_url = "mywebsite.com"
  15. # Used in RSS by default
  16. title = ""
  17. description = ""
  18. # The default language, used in RSS
  19. default_language = "en"
  20. # Theme name to use
  21. theme = ""
  22. # Highlight all code blocks found
  23. highlight_code = false
  24. # Which theme to use for the code highlighting.
  25. # See below for list of accepted values
  26. highlight_theme = "base16-ocean-dark"
  27. # Whether to generate a RSS feed automatically
  28. generate_rss = false
  29. # The number of articles to include in the RSS feed. Will include all items if
  30. # not set (the default).
  31. # rss_limit = 20
  32. # Whether to copy or hardlink files in static/ directory. Useful for sites
  33. # whose static files are large. Note that for this to work, both static/ and
  34. # output directory need to be on the same filesystem. Also, theme's static/
  35. # files are always copies, regardles of this setting. False by default.
  36. # hard_link_static = false
  37. # The taxonomies to be rendered for that site and their configuration
  38. # Example:
  39. # taxonomies = [
  40. # {name = "tags", rss = true}, # each tag will have its own RSS feed
  41. # {name = "tags", lang = "fr"}, # you can have taxonomies with the same name in multiple languages
  42. # {name = "categories", paginate_by = 5}, # 5 items per page for a term
  43. # {name = "authors"}, # Basic definition: no RSS or pagination
  44. # ]
  45. #
  46. taxonomies = []
  47. # The additional languages for that site
  48. # Example:
  49. # languages = [
  50. # {code = "fr", rss = true}, # there will be a RSS feed for French content
  51. # {code = "fr", search = true}, # there will be a Search Index for French content
  52. # {code = "it"}, # there won't be a RSS feed for Italian content
  53. # ]
  54. #
  55. languages = []
  56. # Whether to compile the Sass files found in the `sass` directory
  57. compile_sass = false
  58. # Whether to build a search index out of the pages and section
  59. # content for the `default_language`
  60. build_search_index = false
  61. # A list of glob patterns specifying asset files to ignore when
  62. # processing the content directory.
  63. # Defaults to none, which means all asset files are copied over to the public folder.
  64. # Example:
  65. # ignored_content = ["*.{graphml,xlsx}", "temp.*"]
  66. ignored_content = []
  67. # A list of directories to search for additional `.sublime-syntax` files in.
  68. extra_syntaxes = []
  69. # Optional translation object. The key if present should be a language code.
  70. # Example:
  71. # default_language = "fr"
  72. #
  73. # [translations]
  74. # [translations.fr]
  75. # title = "Un titre"
  76. #
  77. # [translations.en]
  78. # title = "A title"
  79. # Configure the link checker
  80. [link_checker]
  81. # Skip link checking for external URLs that start with these prefixes
  82. skip_prefixes = [
  83. "http://[2001:db8::]/",
  84. ]
  85. # Skip anchor checking for external URLs that start with these prefixes
  86. skip_anchor_prefixes = [
  87. "https://caniuse.com/",
  88. ]
  89. # You can put any kind of data in there and it
  90. # will be accessible in all templates
  91. [extra]
  92. ```
  93. ## Syntax highlighting
  94. Zola currently has the following highlight themes available:
  95. - [1337](https://tmtheme-editor.herokuapp.com/#!/editor/theme/1337)
  96. - [agola-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Agola%20Dark)
  97. - [ascetic-white](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Ascetic%20White)
  98. - [axar](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Axar)
  99. - [base16-ocean-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Base16%20Ocean%20Dark)
  100. - [base16-ocean-light](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Base16%20Ocean%20Light)
  101. - [bbedit](https://tmtheme-editor.herokuapp.com/#!/editor/theme/BBEdit)
  102. - [boron](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Boron)
  103. - [charcoal](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Charcoal)
  104. - [cheerfully-light](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Cheerfully%20Light)
  105. - [classic-modified](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Classic%20Modified)
  106. - [demain](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Demain)
  107. - [dimmed-fluid](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Dimmed%20Fluid)
  108. - [dracula](https://draculatheme.com/)
  109. - [gray-matter-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Gray%20Matter%20Dark)
  110. - [gruvbox-dark](https://github.com/morhetz/gruvbox)
  111. - [gruvbox-light](https://github.com/morhetz/gruvbox)
  112. - [idle](https://tmtheme-editor.herokuapp.com/#!/editor/theme/IDLE)
  113. - [inspired-github](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Inspiredgithub)
  114. - [ir-white](https://tmtheme-editor.herokuapp.com/#!/editor/theme/IR_White)
  115. - [kronuz](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Kronuz)
  116. - [material-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Material%20Dark)
  117. - [material-light](https://github.com/morhetz/gruvbox)
  118. - [monokai](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Monokai)
  119. - [solarized-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Solarized%20(dark))
  120. - [solarized-light](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Solarized%20(light))
  121. - [subway-madrid](https://github.com/idleberg/Subway.tmTheme)
  122. - [subway-moscow](https://github.com/idleberg/Subway.tmTheme)
  123. - [visual-studio-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Visual%20Studio%20Dark)
  124. - [ayu-light](https://github.com/dempfi/ayu)
  125. - [ayu-dark](https://github.com/dempfi/ayu)
  126. - [ayu-mirage](https://github.com/dempfi/ayu)
  127. - [Tomorrow](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Tomorrow)
  128. - [one-dark](https://github.com/andresmichel/one-dark-theme)
  129. - [zenburn](https://github.com/colinta/zenburn)
  130. Zola uses the Sublime Text themes, making it very easy to add more.
  131. If you want a theme not on that list, please open an issue or a pull request on the [Zola repo](https://github.com/getzola/zola).