Permalink
Browse files

cleanup for v0.6

  • Loading branch information...
Mike Watkins
Mike Watkins committed Apr 4, 2018
1 parent 5c1f1cf commit 9396a45128127c8eefc1f1dbf6713dee4add7a9b
@@ -3,15 +3,36 @@
## TODO / Coming Soon
* Add Social Media microdata (Twitter, etc.)
* Google analytics and other quick hit items
* Develop a text-minimalist Bulma swatch
* Make it easy to include a full-screen landing page image without modifying
templates such as found: https://mikewatkins.ca/
* Per-page image and other resources
* Review [Hugo internal templates](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go) and incorporate as needed.
## HEAD
## v0.6
* layouts/_defaults/errorpage.html - allows for creation of NNN HTTP errorcode
This is a major change, brought on by a desire to make all components of a page
including head, javascript, style overrides, navigation, footer - more easily
overridable by theme users.
Users of v0.5 and earlier who have made theme customizations for their site
should find most everything works out of the box but may discover they need to
make minor updates to their site's customized, if any, `layouts/index.html`.
* Allow for custom header and footer partials; this makes it easy for
site-specific overrides (such as CSS rules or javascript) to be in
site/layout/partials without having to replace (and therefore maintain) the
entire header + footer partials. Thanks @ColtonProvias for the suggestion
which set me off on a road towards more customization possiblities. Fixes #3.
* Increase the use of block templates throughout; reduce code in many page
templates as a result. Don't Repeat Yourself (DRY).
* Tested against the latest Hugo release 0.38
(https://gohugo.io/news/0.38-relnotes/000000000) but the theme does not make
use of any leading edge features and can likely be used with much earlier
versions of Hugo.
* Add Google analytics support using Hugo internal template, add site variable
and your GA ID to config.yaml: GoogleAnalytics:
* `layouts/_defaults/errorpage.html` - allows for creation of NNN HTTP errorcode
pages i.e. 401.html (with 401.md). In frontmatter specify layout:errorpage
* Added /shortcodes/ig.html as a script-less instagram alternative. May
disappear.
@@ -22,7 +43,9 @@
* Removed Font Awesome; nothing wrong with it but for a handful of icons,
leaving that decision up to site users. Unicode icons used where needed. See
https://www.materialui.co/unicode-characters/symbols for ideas.
* Added favicon.html partial and Params.favicon boolean - make a matching icon set from the solid https://realfavicongenerator.net/
* Added favicon.html partial and Params.favicon boolean - make a matching icon
set from the solid https://realfavicongenerator.net/
* Moved page-meta partial to subtitle - see Posts for example.
* Fixed URL path bug on pages with categories and tags; sorted collections.
* Refactored breadcrumbs, simpler and hopefully solid now; uses .Slug or .Name; override in menus.
@@ -5,15 +5,19 @@
# themesDir is needed only to run exampleSite in-place
themesDir: "../.."
# Mandatory variables:
baseURL: "http://www.example.com/"
languageCode: "en-us"
title: "Hugo-smorg"
title: "Hugo-Smorg Theme"
theme: "hugo-smorg"
author:
name: "Your Name"
email: "thisemaildoesnotexist@www.example.com"
copyright: "© Your Name"
# GoogleAnalytics: # add your GA ID and uncomment
# Optional:
#
# GoogleAnalytics: # add your UA-nnn-nnnnnnnn ID and uncomment
enableGitInfo: false
summaryLength: 20
pygmentsUseClasses: true
@@ -8,10 +8,11 @@
<footer class="footer">
<div class="container content">
<div class="has-text-centered">
<p>{{ with .Site.Params.logotype }}{{ . | safeHTML }}
<p>{{ with .Site.Params.footer }}{{ . | safeHTML }}
{{ else }}{{ "Add config: Params.footer" }}{{end}}
{{ with .Site.Params.logotype }}{{ . | safeHTML }}
{{ else }}{{ "Add config: Params.logotype" }}{{end}}
{{ with .Site.Params.footer }}{{ . | safeHTML }}
{{ else }}{{ "Add config: Params.footer" }}{{end}}</p>
</p>
<hr>
<p class="has-text-grey is-size-7">
{{ with .Site.Params.subfooter }} {{ . | safeHTML }}<br>
@@ -1,25 +1,23 @@
<!--
References config file variables:
Included in baseof.html "head" block by default. Page templates can either
replace the entire head, or include additional elements using:
partials/head-custom.html (meta, link, styles, etc)
partials/js-head.html (any Javascript that must be in head)
Always consult _default/baseof.html to see what you may be replacing or overriding.
Note: Title is defined in _defaults/baseof.html and layouts/*.html
-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index,follow">
<base href="{{ .Site.BaseURL }}">
{{ if ne .Kind "404" }}<link rel="canonical" href="{{ .Permalink }}">
{{- if .IsHome }}
<title>{{ .Site.Title | default "Set Site Title in config.yaml" }}</title>
{{ else }}
<title>{{ .Title | default "Set Title in doc" }} - {{ .Site.Title }}</title>
{{ end }}
{{- with $.Site.Params.description }}<meta name="description" content="{{.}}">{{ end }}
{{- range .AlternativeOutputFormats }}
{{- range .AlternativeOutputFormats }} <!-- RSS, Atom feeds -->
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}"
href="{{ .Permalink | safeURL }}" title="{{ $.Site.Title }}">{{ end }}
{{- end }}
<link rel="preload" href="{{ $.Site.Params.cssPath | default "css/smorg.css" | absURL }}" as="style">
<link rel="stylesheet" href="{{ $.Site.Params.cssPath | default "css/smorg.css" | absURL }}">
{{ .Hugo.Generator -}}
{{- partial "favicon.html" . }}
</head>
{{- partial "favicon.html" . -}}
@@ -12,7 +12,8 @@
"@type": "Person",
{{ with .name }} "name": "{{ . }}",{{ end }}
{{ with .email }}"email": "{{ . }}"{{ end }}
}{{ end }}{{ with .Site.Params.publisher }},
}{{ end }}
{{- with .Site.Params.publisher }},
"publisher": {
{{ with .name }} "name": "{{ . }}",{{ end }}
{{ with .type }} "type": "{{ . }}"{{ end }}
@@ -1 +1 @@
{{ if .Draft }}<span class="has-text-warning">DRAFT</span>{{end}}
{{ if .Draft }}<span class="has-text-warning"><strong>DRAFT</strong></span>{{end}}
@@ -6,10 +6,12 @@
"scripts": {
"clean": "rm -rf static/css/*.css exampleSite/static/css/*.css exampleSite/public/*",
"scss": "node-sass --include-path node_modules scss/smorg.scss > static/css/smorg.css",
"mw:min": "node-sass --include-path node_modules --output-style compressed scss/mw.scss > static/css/mw.min.css",
"vector:min": "node-sass --include-path node_modules --output-style compressed scss/vector.scss > static/css/vector.min.css",
"scss:min": "node-sass --include-path node_modules --output-style compressed scss/smorg.scss > static/css/smorg.min.css",
"scss:watch": "nodemon -e scss,sass --watch scss -x 'run-s --print-label scss scss:min'",
"hugo": "cd exampleSite && hugo -v",
"serve": "cd exampleSite && hugo serve --forceSyncStatic --disableFastRender",
"serve": "cd exampleSite && hugo serve --forceSyncStatic --ignoreCache --cleanDestinationDir --disableFastRender",
"dev": "run-p --print-label --continue-on-error scss:watch serve",
"build": "run-s --print-label --continue-on-error clean scss scss:min hugo"
},
@@ -13,7 +13,8 @@
// 2
$body-size:16px;
$link: hsl(217, 71%, 53%);
$family-sans-serif: system-ui, sans-serif;
$family-sans-serif: "Open Sans", system-ui, sans-serif;
$family-primary: $family-sans-serif;
$family-monospace: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
// 3
@import "bulma/bulma";
@@ -29,6 +30,9 @@ $family-monospace: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier,
// Defines a future-proof "system-ui" font using local system font face declarations
@import 'system-font-css/system-font';
// Optional!
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,700i);
// make footer background on short pages seem infinite
html {
background-color: $white-ter !important;
@@ -40,4 +44,3 @@ body > section {
padding: 0px !important;
}
}
@@ -1,5 +1,6 @@
/*! hugo-smorg theme | github.com/solutionroute/hugo-smorg */
/*! bulma.io v0.6.2 | MIT License | github.com/jgthms/bulma */
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,700i);
@keyframes spinAround {
from {
transform: rotate(0deg); }
@@ -103,7 +104,7 @@ button,
input,
select,
textarea {
font-family: system-ui, sans-serif; }
font-family: "Open Sans", system-ui, sans-serif; }
code,
pre {

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 9396a45

Please sign in to comment.