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.

README.md 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Minimal
  2. Personal blog theme powered by [Hugo](https://gohugo.io).
  3. A live demo is available [here](https://themes.gohugo.io/theme/minimal/).
  4. ## Installation
  5. You can install the theme either as a clone or submodule.
  6. I recommend the latter. From the root of your Hugo site, type the following:
  7. ```
  8. $ git submodule add https://github.com/calintat/minimal.git themes/minimal
  9. $ git submodule init
  10. $ git submodule update
  11. ```
  12. Now you can get updates to Minimal in the future by updating the submodule:
  13. ```
  14. $ git submodule update --remote themes/minimal
  15. ```
  16. ## Configuration
  17. After installation, take a look at the `exampleSite` folder inside `themes/minimal`.
  18. To get started, copy the `config.toml` file inside `exampleSite` to the root of your Hugo site:
  19. ```
  20. $ cp themes/minimal/exampleSite/config.toml .
  21. ```
  22. Now edit this file and add your own information. Note that some fields can be omitted.
  23. I recommend you use the theme's archetypes so now delete your site's `archetypes/default.md`.
  24. ## Features
  25. You can tweak the look of the theme to suit your needs in a number of ways:
  26. - The accent colour can be changed by using the `accent` field in `config.toml`.
  27. - You can also change the background colour by using `backgroundColor`.
  28. - Add colored 5px borders at the top and bottom of pages by setting `showBorder` to `true`.
  29. For best results, I recommend you use a dark accent colour with a light background, for example:
  30. ```toml
  31. [params]
  32. accent = "red"
  33. showBorder = true
  34. backgroundColor = "white"
  35. ```
  36. ### Fonts
  37. The theme uses [Google Fonts](https://fonts.google.com) to load its font. To change the font:
  38. ```toml
  39. [params]
  40. font = "Raleway" # should match the name on Google Fonts!
  41. ```
  42. ### Syntax highlighting
  43. The theme supports syntax highlighting thanks to [highlight.js](https://highlightjs.org).
  44. It's disabled by default, so you have to enable it by setting `highlight` to `true` in your config.
  45. You can change the style used for the highlighting by using the `highlightStyle` field.
  46. Only the "common" languages will be loaded by default. To load more, use `highlightLanguages`.
  47. A list of all the available styles and languages can be found [here](https://highlightjs.org/static/demo/).
  48. Please note the style and languages should be written in hyphen-separated lowercase, for example:
  49. ```toml
  50. [params]
  51. highlight = true
  52. highlightStyle = "solarized-dark"
  53. highlightLanguages = ["go", "haskell", "kotlin", "scala", "swift"]
  54. ```