|
| 1 | +# Hugo Winston Theme |
| 2 | + |
| 3 | +Hugo Winston is a bold minimal blogging theme. |
| 4 | + |
| 5 | +[Live Demo](https://hugo-winston.netlify.app/) | |
| 6 | +[Zerostatic Themes](https://www.zerostatic.io/) |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +## Theme features |
| 11 | + |
| 12 | +- Posts (Markdown) |
| 13 | +- Basic Page (Markdown) |
| 14 | +- SCSS (Hugo Pipelines) |
| 15 | +- Responsive design |
| 16 | +- 100/100 Google Lighthouse speed score |
| 17 | +- 100/100 Google Lighthouse SEO score |
| 18 | +- 100/100 Google Lighthouse accessibility score |
| 19 | +- Google analytics configured in `config.toml` |
| 20 | +- Configure GID using env variable HUGO_GOOGLE_ANALYTICS_ID, compatible with Netlify. |
| 21 | +- Title, meta description and meta tags automatically generated for every page |
| 22 | +- OG Meta data for Facebook and Twitter |
| 23 | +- Semantic HTML document structure |
| 24 | + |
| 25 | +## Installation |
| 26 | + |
| 27 | +**1. Install Hugo** |
| 28 | + |
| 29 | +To use this theme you will first need to have Hugo installed. Please follow the official [installation guide](https://gohugo.io/getting-started/installing/) |
| 30 | + |
| 31 | +> ⚠️ **Note:** Check your Hugo version - **Hugo Extended** is required! |
| 32 | +
|
| 33 | +This theme uses [Hugo Pipes](https://gohugo.io/hugo-pipes/scss-sass/) to compile SCSS and minify assets which means if you are not using the Hugo extended version this theme will not work. To check your version of Hugo, run `hugo version`. Make sure you see **/extended** after the version number, for example _Hugo Static Site Generator v0.51/extended darwin/amd64 BuildDate: unknown_ You do not need to use version v0.51 specifically, it just needs to have the _/extended_ part. |
| 34 | + |
| 35 | +**2. Create a new Hugo site** |
| 36 | + |
| 37 | +This will create a fresh Hugo site in the folder `mynewsite`. |
| 38 | + |
| 39 | +``` |
| 40 | +hugo new site mynewsite |
| 41 | +``` |
| 42 | + |
| 43 | +**3. Install the theme** |
| 44 | + |
| 45 | +Download or git clone this theme into the sites themes folder `mynewsite/themes`. You should end up with the following folder structure `mynewsite/themes/hugo-winston-theme` |
| 46 | + |
| 47 | +``` |
| 48 | +cd mynewsite |
| 49 | +git clone https://github.com/zerostaticthemes/hugo-winston-theme.git themes/hugo-winston-theme |
| 50 | +``` |
| 51 | + |
| 52 | +**4. Copy the example content** |
| 53 | + |
| 54 | +Copy the entire contents of the `mynewsite/themes/hugo-winston-theme/exampleSite/` folder to root folder of your Hugo site, ie `mynewsite/`. To copy the files using terminal, make sure you are still in the projects root, ie the `mynewsite` folder. |
| 55 | + |
| 56 | +``` |
| 57 | +cp -a themes/hugo-winston-theme/exampleSite/. . |
| 58 | +``` |
| 59 | + |
| 60 | +**6. Run Hugo** |
| 61 | + |
| 62 | +After installing the theme for the first time, generate the Hugo site. |
| 63 | + |
| 64 | +You run this command from the root folder of your Hugo site ie `mynewsite` |
| 65 | + |
| 66 | +``` |
| 67 | +hugo |
| 68 | +``` |
| 69 | + |
| 70 | +For local development run Hugo's built-in local server. |
| 71 | + |
| 72 | +``` |
| 73 | +hugo server |
| 74 | +``` |
| 75 | + |
| 76 | +Now enter [`localhost:1313`](http://localhost:1313) in the address bar of your browser. |
| 77 | + |
| 78 | +# Localhost inside exampleSite |
| 79 | + |
| 80 | +You can run this site without installing it as a hugo theme using the following command. I use this for theme development. |
| 81 | + |
| 82 | +``` |
| 83 | +hugo server --source=exampleSite --theme=../.. |
| 84 | +``` |
| 85 | + |
| 86 | +# Configuration |
| 87 | + |
| 88 | +### Config options |
| 89 | + |
| 90 | +```toml |
| 91 | +# config.toml |
| 92 | +[params] |
| 93 | + google_analytics_id = "" |
| 94 | + twitter_handle = "@zerostaticio" |
| 95 | + showAuthorOnHomepage = true |
| 96 | + showAuthorOnPosts = false |
| 97 | + showIntroContentOnHomepage = true |
| 98 | + showPostsOnHomepage = true |
| 99 | + usePaginationOnHomepage = false |
| 100 | + limitPostsOnHomepage = 3 # only used if usePaginationOnHomepage is false |
| 101 | + sortPostsByDateOldestFirst = false |
| 102 | + addDot = true |
| 103 | + addFrame = true |
| 104 | + highlightColor = '#7b16ff' |
| 105 | + baseColor = "#ffffff" |
| 106 | + baseOffsetColor = "#eaeaea" |
| 107 | + headingColor = "#1c1b1d" |
| 108 | + textColor = "#4e5157" |
| 109 | + dotColor = "#7b16ff" |
| 110 | + enableGoogleFonts = true |
| 111 | + googleFontsUrl = "https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap" |
| 112 | + fontFamilyHeading = "Poppins" |
| 113 | + fontFamilyParagraph = "Helvetica" |
| 114 | + fontFamilyMonospace = "monospace" |
| 115 | +``` |
| 116 | + |
| 117 | +### Google Analytics |
| 118 | + |
| 119 | +Add your google analytics ID to the `config.toml` |
| 120 | + |
| 121 | +```toml |
| 122 | +# config.toml |
| 123 | +[params] |
| 124 | + google_analytics_id="UA-132398315-1" |
| 125 | +``` |
| 126 | + |
| 127 | +### Plausible Analytics |
| 128 | + |
| 129 | +Add your plausible analytics domain to the `config.toml`. |
| 130 | +This is `data-domain` in your [tracking script code](https://plausible.io/docs/plausible-script). |
| 131 | + |
| 132 | +```toml |
| 133 | +# config.toml |
| 134 | +[params] |
| 135 | + plausible_analytics_domain = "example.com" |
| 136 | +``` |
| 137 | + |
| 138 | +# Deploying to Netlify |
| 139 | + |
| 140 | +[](https://app.netlify.com/start/deploy?repository=https://github.com/zerostaticthemes/hugo-winston-theme) |
| 141 | + |
| 142 | +This theme includes a `netlify.toml` which is [configured to deploy to Netlify](https://discourse.gohugo.io/t/deploy-your-theme-to-netlify/15508) from the `exampleSite` folder. If you have installed this theme into a new Hugo site and the exampleSite folder was copied or removed, you should delete the `netlify.toml` file. |
| 143 | + |
| 144 | + |
| 145 | +### More Hugo Themes by Zerostatic |
| 146 | + |
| 147 | +- [Hugo Hero](https://github.com/zerostaticthemes/hugo-hero-theme) - Open-source business theme |
| 148 | +- [Hugo Whisper](https://github.com/zerostaticthemes/hugo-whisper-theme) - Open-source documentation theme |
| 149 | +- [Hugo Serif](https://github.com/zerostaticthemes/hugo-serif-theme) - Open-source business theme |
| 150 | +- [Hugo Winston](https://github.com/zerostaticthemes/hugo-winston-theme) - Open-source blog theme |
| 151 | +- [Hugo Advance](https://www.zerostatic.io/theme/hugo-advance/) - Premium advanced multi page business & marketing theme |
| 152 | +- [Hugo Paradigm](https://www.zerostatic.io/theme/hugo-paradigm/) - Premium landing page + site builder theme |
| 153 | +- [Hugo Lever](https://www.zerostatic.io/theme/hugo-lever/) - Premium personal / bio theme |
| 154 | +- [Hugo Shard](https://www.zerostatic.io/theme/hugo-lever/) - Premium SAAS / landing page theme |
| 155 | + |
| 156 | +### Find hundreds more Hugo themes on Built At Lightspeed |
| 157 | + |
| 158 | +[<img alt="Built At Lightspeed Hugo themes directory screenshot" width="400px" src="https://www.zerostatic.io/images/builtatlightspeed-hugo-themes.jpg" />](https://builtatlightspeed.com/category/hugo) |
0 commit comments