2018-05-28 00:43:13 +00:00
![Hugo Coder Logotype ](https://github.com/luizdepra/hugo-coder/blob/master/images/logos/logotype-a.png )
2018-03-01 01:38:59 +00:00
A simple and clean blog theme for Hugo.
![](https://github.com/luizdepra/hugo-coder/blob/master/images/screenshot.png)
## How to use this theme
To use `hugo-coder` go through the following steps.
### Download
Clone this repository into your Hugo project.
```
git clone https://github.com/luizdepra/hugo-coder.git themes/coder
```
### Configuration
Add the following lines to your `config.toml` .
```toml
2018-06-05 22:28:00 +00:00
baseurl = "http://www.example.com" # Hostname (and path) to the root.
title = "johndoe" # Site title.
theme = "coder" # Set the theme.
languagecode = "en" # The site’ s language code.
paginate = 20 # Default number of pages per page in pagination.
canonifyurls = true # Enable to turn relative URLs into absolute.
pygmentsstyle = "b2" # Color-theme or style for syntax highlighting.
2018-06-11 20:01:48 +00:00
pygmentscodefences = true # Enable code fence background highlighting.
2018-06-05 22:28:00 +00:00
pygmentscodefencesguesssyntax = true # Enable syntax guessing for code fences without specified language.
2018-03-01 01:38:59 +00:00
[params] # theme parameters
2018-06-05 22:28:00 +00:00
author = "John Doe" # Author's name.
info = "Full Stack DevOps and Magician" # Author's job title or info.
description = "John Doe's personal website" # Site description.
keywords = "blog,developer,personal" # Site keywords.
disqusShortname = "yourdiscussshortname" # Enable or disable Disqus
2018-05-10 00:06:16 +00:00
2018-06-11 20:01:48 +00:00
# Whether you want to hide copyright and credits in the footer.
2018-05-10 00:06:16 +00:00
hideCredits = false
hideCopyright = false
2018-06-05 22:28:00 +00:00
# Custom CSS
custom_css = []
2018-03-01 01:38:59 +00:00
# Social links
[[params.social]]
name = "Github"
weight = 1
url = "https://github.com/johndoe/"
[[params.social]]
name = "Twitter"
weight = 2
url = "https://twitter.com/johndoe/"
[[params.social]]
name = "LinkedIn"
weight = 3
url = "https://www.linkedin.com/in/johndoe/"
# Menu links
[[menu.main]]
name = "Blog"
weight = 1
url = "/posts/"
[[menu.main]]
name = "About"
weight = 2
url = "/about/"
```
2018-05-01 18:59:02 +00:00
2018-03-01 01:38:59 +00:00
You can look at full working [`config.toml` ](https://github.com/luizdepra/hugo-coder/blob/master/exampleSite/config.toml ) inside the [exampleSite ](https://github.com/luizdepra/hugo-coder/tree/master/exampleSite ) folder.
### Build & Test
2018-03-23 19:49:06 +00:00
To update or generate the minified CSS file:
```
make build
```
2018-03-01 01:38:59 +00:00
To build your site and test, run:
```
hugo server
```
2018-05-01 18:59:02 +00:00
To preview the exampleSite, run
```
make demo
```
The above command copies current state of the theme to exampleSite/themes and starts hugo with hugo serve -D (Go does not support Symlink directories)
2018-03-01 01:38:59 +00:00
2018-05-01 18:59:02 +00:00
### Disqus
2018-05-03 20:19:20 +00:00
Add the following line to your config,
2018-05-01 18:59:02 +00:00
```disqusShortname = "yourdiscussshortname"``` When this is set, all posts are disqus enabled
You can disable comments for a post by adding the following to your page meta data.
```disable_comments: true```
2018-03-01 01:38:59 +00:00
2018-05-01 18:59:02 +00:00
## To Do
2018-03-01 01:38:59 +00:00
- Tags, Categories and Series
## License
Coder is licensed under the [MIT license ](https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.md ).
## Author
2018-05-28 12:28:38 +00:00
[Luiz de Prá ](https://github.com/luizdepra )
## Contributors
- [Gabor Nagy ](https://github.com/Aigeruth )
- [Ihor Dvoretskyi ](https://github.com/idvoretskyi )
- [Jan Baudisch ](https://github.com/flyingP0tat0 )
- [Jiri Hubacek ](https://github.com/qeef )
- [Khosrow Moossavi ](https://github.com/khos2ow )
- [Maikel ](https://github.com/mbollemeijer )
- [peterrus ](https://github.com/peterrus )
- [Ralf Junghanns ](https://github.com/rabbl )
- [tobaloidee ](https://github.com/Tobaloidee )
- [Vlad Ionescu ](https://github.com/Vlaaaaaaad )
2018-06-05 22:28:00 +00:00
- [Niels Reijn ](https://github.com/reijnn )
2018-06-11 20:01:48 +00:00
- [Harry Khanna ](https://github.com/hkhanna )
2018-03-01 01:38:59 +00:00
## Special Thanks
2018-03-23 17:28:38 +00:00
- Gleen McComb, for his great [article ](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/ ) about custom pagination.
2018-03-23 19:49:06 +00:00
- All contributors, for every PR and Issue reported.