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.

219 lines
4.9 KiB

  1. # Hyde
  2. Hyde is a brazen two-column [hugo](https://gohugo.io) theme based on the [Jekyll](http://jekyllrb.com) theme of the same name.
  3. It pairs a prominent sidebar with uncomplicated content.
  4. ![Hyde screenshot](https://f.cloud.github.com/assets/98681/1831228/42af6c6a-7384-11e3-98fb-e0b923ee0468.png)
  5. ## Contents
  6. - [Installation](#installation)
  7. - [Options](#options)
  8. - [Sidebar menu](#sidebar-menu)
  9. - [Sidebar description](#sidebar-description)
  10. - [Sticky sidebar content](#sticky-sidebar-content)
  11. - [Themes](#themes)
  12. - [Reverse layout](#reverse-layout)
  13. - [Disqus](#disqus)
  14. - [Google Analytics](#google-analytics)
  15. - [Author](#author)
  16. - [Ported by](#ported-by)
  17. - [License](#license)
  18. ## Installation
  19. ### Quick Start
  20. To give you a running start this installation puts a fully configured [starter repo](https://github.com/forestryio/hyde-hugo-starter) into your Git account and sets it up in a content manager / CMS.
  21. _[Forestry](https://forestry.io) Starter-Kit:_
  22. [![Import this project into Forestry](https://assets.forestry.io/import-to-forestry.svg)](https://app.forestry.io/quick-start?repo=forestryio/hyde-hugo-starter&provider=github&engine=hugo&version=0.49)
  23. ### Standard Installation
  24. To install Hyde as your default theme, first install this repository in the `themes/` directory:
  25. $ cd themes/
  26. $ git clone https://github.com/spf13/hyde.git
  27. Second, specify `hyde` as your default theme in the `config.toml` file. Just add the line
  28. theme = "hyde"
  29. at the top of the file.
  30. ## Options
  31. Hyde includes some customizable options, typically applied via classes on the `<body>` element.
  32. ### Sidebar menu
  33. Create a list of nav links in the sidebar by assigning "menu=main" in the front matter, like so:
  34. **TOML**
  35. ```toml
  36. theme = "hyde"
  37. [Menus]
  38. main = [
  39. {Name = "Github", URL = "https://github.com/username/"},
  40. {Name = "LinkedIn", URL = "https://www.linkedin.com/in/username/"}
  41. ]
  42. ```
  43. **YAML**
  44. ```yaml
  45. theme: "hyde"
  46. Menus:
  47. main:
  48. - Name: "Github"
  49. URL: "https://github.com/username/"
  50. - Name: "LinkedIn"
  51. URL: "https://www.linkedin.com/in/username/"
  52. ```
  53. ### Sidebar description
  54. Customise the describe of your page using `description`, like so:
  55. **TOML**
  56. ```toml
  57. theme = "hyde"
  58. [params]
  59. description = "Your custom description"
  60. ```
  61. **YAML**
  62. ```yaml
  63. theme: "hyde"
  64. params:
  65. description = "Your custom description"
  66. ```
  67. ### Sticky sidebar content
  68. By default Hyde ships with a sidebar that affixes it's content to the bottom of the sidebar. You can optionally disabled this by removing the `.sidebar-sticky` class from the sidebar's `.container`. Sidebar content will then normally flow from top to bottom.
  69. ```html
  70. <!-- Default sidebar -->
  71. <div class="sidebar">
  72. <div class="container sidebar-sticky">
  73. ...
  74. </div>
  75. </div>
  76. <!-- Modified sidebar -->
  77. <div class="sidebar">
  78. <div class="container">
  79. ...
  80. </div>
  81. </div>
  82. ```
  83. ### Themes
  84. Hyde ships with eight optional themes based on the [base16 color scheme](https://github.com/chriskempson/base16). Apply a theme to change the color scheme (mostly applies to sidebar and links).
  85. ![Hyde in red](https://f.cloud.github.com/assets/98681/1831229/42b0b354-7384-11e3-8462-31b8df193fe5.png)
  86. There are eight themes available at this time.
  87. ![Hyde theme classes](https://f.cloud.github.com/assets/98681/1817044/e5b0ec06-6f68-11e3-83d7-acd1942797a1.png)
  88. To use a theme, add the `themeColor` variable under `params`, like so:
  89. **TOML**
  90. ```toml
  91. theme = "hyde"
  92. [params]
  93. themeColor = "theme-base-09"
  94. ```
  95. **YAML**
  96. ```yaml
  97. theme: "hyde"
  98. params:
  99. themeColor: "theme-base-09"
  100. ```
  101. To create your own theme, look to the Themes section of [included CSS file](https://github.com/poole/hyde/blob/master/public/css/hyde.css). Copy any existing theme (they're only a few lines of CSS), rename it, and change the provided colors.
  102. ### Reverse layout
  103. ![Hyde with reverse layout](https://f.cloud.github.com/assets/98681/1831230/42b0d3ac-7384-11e3-8d54-2065afd03f9e.png)
  104. To reverse page orientation, add the `layoutReverse` variable under `params`, like so:
  105. **TOML**
  106. ```toml
  107. theme = "hyde"
  108. [params]
  109. layoutReverse = true
  110. ```
  111. **YAML**
  112. ```yaml
  113. theme: "hyde"
  114. params:
  115. layoutReverse: true
  116. ```
  117. ### Disqus
  118. You can optionally enable a comment system powered by Disqus for the posts. Simply add the variable `disqusShortname` to your config file.
  119. **TOML**
  120. ```toml
  121. disqusShortname = "spf13"
  122. ```
  123. **YAML**
  124. ```yaml
  125. disqusShortname : spf13
  126. ```
  127. > **Note:** Previous version 1.0 the Disqus shortname had to be defined inside the `[params]` block.
  128. ## Google Analytics
  129. Google Analytics can be enabled by assigning your tracking code to the `googleAnalytics` variable in the config file:
  130. **TOML**
  131. ```toml
  132. googleAnalytics = "Your tracking code"
  133. ```
  134. **YAML**
  135. ```yaml
  136. googleAnalytics: Your tracking code
  137. ```
  138. ## Author
  139. **Mark Otto**
  140. - <https://github.com/mdo>
  141. - <https://twitter.com/mdo>
  142. ## Ported By
  143. **Steve Francia**
  144. - <https://github.com/spf13>
  145. - <https://twitter.com/spf13>
  146. ## License
  147. Open sourced under the [MIT license](LICENSE.md).
  148. <3