16 | {{ range $value.Pages }}
17 | {{ partial "summary.html" . }}
18 | {{ end }}
19 | {{ end }}
20 |
21 |
22 | {{ end }}
--------------------------------------------------------------------------------
/layouts/partials/svg/facebook.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/layouts/partials/svg/gitlab.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/layouts/post/list.html:
--------------------------------------------------------------------------------
1 | {{ define "main" }}
2 | {{/*
3 | This template is the same as the default and is here to demonstrate that if you have a content directory called "post"
4 | you can create a layouts directory, just for that section.
5 | */}}
6 |
7 |
8 | {{ .Content }}
9 |
10 |
21 | {{ template "_internal/pagination.html" . }}
22 |
23 | {{ end }}
--------------------------------------------------------------------------------
/theme.toml:
--------------------------------------------------------------------------------
1 | # theme.toml template for a Hugo theme
2 |
3 | name = "Starter Theme"
4 | license = "MIT"
5 | licenselink = "https://github.com/jimfrenette/hugo-starter/blob/master/LICENSE.md"
6 | description = "Blank starter theme with only normalized styles. Included is a webpack workflow for building javascript and css from sass with a live reload webpack development server."
7 | homepage = "https://jimfrenette.com/2019/02/hugo-static-site-generator-blank-starter-theme/"
8 | tags = ["starter", "minimal", "development", "website", "responsive", "blog"]
9 | features = ["posts", "shortcodes", "related content", "comments"]
10 | min_version = "0.38"
11 |
12 | [author]
13 | name = "Jim Frenette"
14 | homepage = "https://jimfrenette.com"
15 |
--------------------------------------------------------------------------------
/layouts/partials/menu-contextual.html:
--------------------------------------------------------------------------------
1 | {{/*
2 | Use Hugo's native Table of contents feature. You must set `toc: true` in your parameters for this to show.
3 | https://gohugo.io/content-management/toc/
4 | */}}
5 |
6 | {{- if .Params.toc -}}
7 |
8 |
What's in this {{ humanize .Type }}
9 | {{ .TableOfContents }}
10 |
11 | {{- end -}}
12 |
13 | {{/*
14 | Use Hugo's native related content feature to pull in content that may have similar parameters, like tags. etc.
15 | https://gohugo.io/content-management/related/
16 | */}}
17 |
18 | {{ $related := .Site.RegularPages.Related . | first 15 }}
19 |
20 | {{ with $related }}
21 |
12 | {{/*
13 | CurrentSection allows us to use the section title instead of inferring from the folder.
14 | https://gohugo.io/variables/page/#section-variables-and-methods
15 | */}}
16 | {{with .CurrentSection.Title }}{{. | upper }}{{end}}
17 |
18 |
19 | {{- .Title -}}
20 |
21 | {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
22 |
25 |
26 |
27 |
28 | {{- .Content -}}
29 | {{- partial "tags.html" . -}}
30 |
33 |
34 |
35 |
38 |
39 |
40 | {{ end }}
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Jim Frenette
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/layouts/partials/svg/medium.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/layouts/partials/svg/twitter.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Starter Theme for [Hugo](http://gohugo.io/)
2 |
3 | [Hugo Static Site Generator Blank Starter Theme](https://jimfrenette.com/2019/02/hugo-static-site-generator-blank-starter-theme/)
4 |
5 | ## Installation
6 |
7 | For example, if your Hugo website is in the `www` folder.
8 | ```
9 | cd www
10 |
11 | git init
12 |
13 | git submodule add https://github.com/jimfrenette/hugo-starter.git themes/starter
14 | ```
15 |
16 | ## Dev Hugo Templates
17 |
18 | ```
19 | cd www
20 |
21 | hugo server -D
22 | ```
23 | Preview the site, e.g., [`localhost:1313`](http://localhost:1313/)
24 |
25 | ## Webpack Dev UI
26 |
27 | Install node modules - Requires Node v12 (lts/erbium)
28 |
29 | ```
30 | cd www/themes/starter
31 |
32 | npm i
33 | ```
34 |
35 | Unminified development build with sourcemaps
36 |
37 | ```
38 | cd www/themes/starter
39 |
40 | npm run dev
41 | ```
42 |
43 | Build for production with npm run build. CSS and JavaScript files will be output into the starter themes dist folder. e.g.,
44 |
45 | ```
46 | cd www/themes/starter
47 |
48 | npm run build
49 | ```
50 |
51 | ## Comments
52 |
53 | To enable DISQUS comments, add `disqusShortname = YOURSHORTNAME` to your config file.
54 |
55 |
56 | ## Production
57 |
58 | To run in production (e.g. to have Google Analytics show up), run `HUGO_ENV=production` before your build command. For example:
59 |
60 | ```
61 | HUGO_ENV=production hugo
62 | ```
63 |
--------------------------------------------------------------------------------
/static/dist/app.css:
--------------------------------------------------------------------------------
1 | /*! modern-normalize | MIT License | https://github.com/sindresorhus/modern-normalize */html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{-webkit-text-size-adjust:100%;line-height:1.15}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;margin:0}hr{height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{padding:0}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}
--------------------------------------------------------------------------------
/layouts/partials/svg/instagram.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/layouts/index.html:
--------------------------------------------------------------------------------
1 | {{ define "main" }}
2 |
3 | {{ .Content }}
4 |
5 | {{/* Define a section to pull recent posts from. For Hugo 0.20 this will default to the section with the most number of
6 | pages. */}}
7 | {{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
8 | {{/* Create a variable with that section to use in multiple places. */}}
9 | {{ $section := where .Site.RegularPages "Section" "in" $mainSections }}
10 | {{/* Check to see if the section is defined for ranging through it */}}
11 | {{ $section_count := len $section }}
12 | {{ if ge $section_count 1 }}
13 | {{/* Derive the section name */}}
14 | {{ $section_name := index (.Site.Params.mainSections) 0 }}
15 |
16 |
17 | {{/* Use $section_name to get the section title. Use "with" to only show it if it exists */}}
18 | {{ with .Site.GetPage "section" $section_name }}
19 |
20 | Recent {{ .Title }}
21 |
22 | {{ end }}
23 |
24 | {{ $n_posts := $.Param "recent_posts_number" | default 3 }}
25 |
26 |
27 | {{/* Range through the first $n_posts items of the section */}}
28 | {{ range (first $n_posts $section) }}
29 |
30 | {{ partial "summary.html" . }}
31 |
32 | {{ end }}
33 |
34 |
35 | {{ if ge $section_count (add $n_posts 1) }}
36 |
37 |
More
38 | {{/* Now, range through the next four after the initial $n_posts items. Nest the requirements, "after" then "first"
39 | on the outside */}}
40 | {{ range (first 4 (after $n_posts $section)) }}
41 |
46 | {{ end }}
47 |
48 | {{/* As above, Use $section_name to get the section title, and URL. Use "with" to only show it if it exists */}}
49 | {{ with .Site.GetPage "section" $section_name }}
50 | All {{.Title }}
51 | {{ end }}
52 |
53 | {{ end }}
54 |
55 |
56 | {{ end }}
57 | {{ end }}
--------------------------------------------------------------------------------
/layouts/_default/baseof.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{/* NOTE: the Site's title, and if there is a page title, that is set too */}}
8 | {{ block "title" . }}{{ .Site.Title }} {{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}
9 |
10 | {{ .Hugo.Generator }}
11 | {{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
12 | {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
13 |
14 | {{ else }}
15 |
16 | {{ end }}
17 |
18 | {{ $stylesheet := .Site.Data.webpack_assets.app }}
19 | {{ with $stylesheet.css }}
20 |
21 | {{ end }}
22 |
23 | {{ range .Site.Params.custom_css }}
24 |
25 | {{ end }}
26 |
27 | {{ block "favicon" . }}
28 | {{ partial "site-favicon.html" . }}
29 | {{ end }}
30 |
31 | {{ if .RSSLink }}
32 |
33 |
34 | {{ end }}
35 |
36 | {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
37 | {{ template "_internal/google_analytics_async.html" . }}
38 | {{ end }}
39 |
40 |
41 |
42 | {{ block "header" . }}{{ partial "site-header.html" .}}{{ end }}
43 |
44 | {{ block "main" . }}{{ end }}
45 |
46 | {{ block "footer" . }}{{ partial "site-footer.html" . }}{{ end }}
47 | {{ block "scripts" . }}{{ partial "site-scripts.html" . }}{{ end }}
48 |
49 |
50 |
--------------------------------------------------------------------------------
/layouts/partials/social-follow.html:
--------------------------------------------------------------------------------
1 |
2 | {{ $icon_size := "32px" }}
3 | {{ with .Param "facebook" }}
4 |
5 | {{ partial "svg/facebook.svg" (dict "size" $icon_size) }}
6 | {{- partial "new-window-icon.html" . -}}
7 |
8 | {{ end }}
9 | {{ with .Param "twitter" }}
10 |
11 | {{ partial "svg/twitter.svg" (dict "size" $icon_size) }}
12 | {{- partial "new-window-icon.html" . -}}
13 |
14 | {{ end }}
15 | {{ with .Param "instagram" }}
16 |
17 | {{ partial "svg/instagram.svg" (dict "size" $icon_size) }}
18 | {{- partial "new-window-icon.html" . -}}
19 |
20 | {{ end }}
21 | {{ with .Param "youtube" }}
22 |
23 | {{ partial "svg/youtube.svg" (dict "size" $icon_size) }}
24 | {{- partial "new-window-icon.html" . -}}
25 |
26 | {{ end }}
27 | {{ with .Param "linkedin" }}
28 |
29 | {{ partial "svg/linkedin.svg" (dict "size" $icon_size) }}
30 | {{- partial "new-window-icon.html" . -}}
31 |
32 | {{ end }}
33 | {{ with .Param "github" }}
34 |
35 | {{ partial "svg/github.svg" (dict "size" $icon_size) }}
36 | {{- partial "new-window-icon.html" . -}}
37 |
38 | {{ end }}
39 | {{ with .Param "gitlab" }}
40 |
41 | {{ partial "svg/gitlab.svg" (dict "size" $icon_size) }}
42 | {{- partial "new-window-icon.html" . -}}
43 |
44 | {{ end }}
45 | {{ with .Param "medium" }}
46 |
47 | {{ partial "svg/medium.svg" (dict "size" $icon_size) }}
48 | {{- partial "new-window-icon.html" . -}}
49 |
50 | {{ end }}
--------------------------------------------------------------------------------
/layouts/partials/svg/youtube.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/sass/_normalize.scss:
--------------------------------------------------------------------------------
1 | /*! modern-normalize | MIT License | https://github.com/sindresorhus/modern-normalize */
2 |
3 | /* Document
4 | ========================================================================== */
5 |
6 | /**
7 | * Use a better box model (opinionated).
8 | */
9 |
10 | html {
11 | box-sizing: border-box;
12 | }
13 |
14 | * {
15 | box-sizing: inherit;
16 | &::before, &::after {
17 | box-sizing: inherit;
18 | }
19 | }
20 |
21 | /**
22 | * Use a more readable tab size (opinionated).
23 | */
24 |
25 | :root {
26 | -moz-tab-size: 4;
27 | tab-size: 4;
28 | }
29 |
30 | /**
31 | * 1. Correct the line height in all browsers.
32 | * 2. Prevent adjustments of font size after orientation changes in iOS.
33 | */
34 |
35 | html {
36 | line-height: 1.15;
37 | /* 1 */
38 | -webkit-text-size-adjust: 100%;
39 | /* 2 */
40 | }
41 |
42 | /* Sections
43 | ========================================================================== */
44 |
45 | /**
46 | * Remove the margin in all browsers.
47 | */
48 |
49 | body {
50 | margin: 0;
51 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
52 | }
53 |
54 | /**
55 | * Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
56 | */
57 |
58 | /* Grouping content
59 | ========================================================================== */
60 |
61 | /**
62 | * Add the correct height in Firefox.
63 | */
64 |
65 | hr {
66 | height: 0;
67 | }
68 |
69 | /* Text-level semantics
70 | ========================================================================== */
71 |
72 | /**
73 | * Add the correct text decoration in Chrome, Edge, and Safari.
74 | */
75 |
76 | abbr[title] {
77 | text-decoration: underline dotted;
78 | }
79 |
80 | /**
81 | * Add the correct font weight in Chrome, Edge, and Safari.
82 | */
83 |
84 | b, strong {
85 | font-weight: bolder;
86 | }
87 |
88 | /**
89 | * 1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
90 | * 2. Correct the odd `em` font sizing in all browsers.
91 | */
92 |
93 | code, kbd, samp, pre {
94 | font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace;
95 | /* 1 */
96 | font-size: 1em;
97 | /* 2 */
98 | }
99 |
100 | /**
101 | * Add the correct font size in all browsers.
102 | */
103 |
104 | small {
105 | font-size: 80%;
106 | }
107 |
108 | /**
109 | * Prevent `sub` and `sup` elements from affecting the line height in all browsers.
110 | */
111 |
112 | sub, sup {
113 | font-size: 75%;
114 | line-height: 0;
115 | position: relative;
116 | vertical-align: baseline;
117 | }
118 |
119 | sub {
120 | bottom: -0.25em;
121 | }
122 |
123 | sup {
124 | top: -0.5em;
125 | }
126 |
127 | /* Forms
128 | ========================================================================== */
129 |
130 | /**
131 | * 1. Change the font styles in all browsers.
132 | * 2. Remove the margin in Firefox and Safari.
133 | */
134 |
135 | button, input, optgroup, select, textarea {
136 | font-family: inherit;
137 | /* 1 */
138 | font-size: 100%;
139 | /* 1 */
140 | line-height: 1.15;
141 | /* 1 */
142 | margin: 0;
143 | /* 2 */
144 | }
145 |
146 | /**
147 | * Remove the inheritance of text transform in Edge and Firefox.
148 | * 1. Remove the inheritance of text transform in Firefox.
149 | */
150 |
151 | button, select {
152 | /* 1 */
153 | text-transform: none;
154 | }
155 |
156 | /**
157 | * Correct the inability to style clickable types in iOS and Safari.
158 | */
159 |
160 | button, [type='button'], [type='reset'], [type='submit'] {
161 | -webkit-appearance: button;
162 | }
163 |
164 | /**
165 | * Remove the inner border and padding in Firefox.
166 | */
167 |
168 | button::-moz-focus-inner, [type='button']::-moz-focus-inner, [type='reset']::-moz-focus-inner, [type='submit']::-moz-focus-inner {
169 | border-style: none;
170 | padding: 0;
171 | }
172 |
173 | /**
174 | * Restore the focus styles unset by the previous rule.
175 | */
176 |
177 | button:-moz-focusring, [type='button']:-moz-focusring, [type='reset']:-moz-focusring, [type='submit']:-moz-focusring {
178 | outline: 1px dotted ButtonText;
179 | }
180 |
181 | /**
182 | * Correct the padding in Firefox.
183 | */
184 |
185 | fieldset {
186 | padding: 0.35em 0.75em 0.625em;
187 | }
188 |
189 | /**
190 | * Remove the padding so developers are not caught out when they zero out `fieldset` elements in all browsers.
191 | */
192 |
193 | legend {
194 | padding: 0;
195 | }
196 |
197 | /**
198 | * Add the correct vertical alignment in Chrome and Firefox.
199 | */
200 |
201 | progress {
202 | vertical-align: baseline;
203 | }
204 |
205 | /**
206 | * Correct the cursor style of increment and decrement buttons in Safari.
207 | */
208 |
209 | [type='number'] {
210 | &::-webkit-inner-spin-button, &::-webkit-outer-spin-button {
211 | height: auto;
212 | }
213 | }
214 |
215 | /**
216 | * 1. Correct the odd appearance in Chrome and Safari.
217 | * 2. Correct the outline style in Safari.
218 | */
219 |
220 | [type='search'] {
221 | -webkit-appearance: textfield;
222 | /* 1 */
223 | outline-offset: -2px;
224 | /* 2 */
225 | &::-webkit-search-decoration {
226 | -webkit-appearance: none;
227 | }
228 | }
229 |
230 | /**
231 | * Remove the inner padding in Chrome and Safari on macOS.
232 | */
233 |
234 | /**
235 | * 1. Correct the inability to style clickable types in iOS and Safari.
236 | * 2. Change font properties to `inherit` in Safari.
237 | */
238 |
239 | ::-webkit-file-upload-button {
240 | -webkit-appearance: button;
241 | /* 1 */
242 | font: inherit;
243 | /* 2 */
244 | }
245 |
246 | /* Interactive
247 | ========================================================================== */
248 |
249 | /*
250 | * Add the correct display in Chrome and Safari.
251 | */
252 |
253 | summary {
254 | display: list-item;
255 | }
--------------------------------------------------------------------------------