Merge pull request '1st request' (#1) from develop into master

Reviewed-on: http://git.panaetius.co.uk/hugo/blog/pulls/1
This commit was merged in pull request #1.
This commit is contained in:
2020-06-04 16:46:01 +00:00
193 changed files with 11869 additions and 9716 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.png filter=lfs diff=lfs merge=lfs -text

10
.gitignore vendored
View File

@@ -12,3 +12,13 @@ hugo.darwin
hugo.linux
# End of https://www.gitignore.io/api/hugo
# node_modules
blog/node_modules
# static
blog/static
test/
.DS_Store

6
.gitmodules vendored Normal file
View File

@@ -0,0 +1,6 @@
[submodule "blog/themes/panaetius-theme"]
path = blog/themes/panaetius-theme
url = https://git.panaetius.co.uk/hugo/panaetius-theme
[submodule "blog/themes/panaetius-chunky-theme"]
path = blog/themes/panaetius-chunky-theme
url = https://git.panaetius.co.uk/hugo/panaetius-chunky-theme

15
.vscode/settings.json vendored
View File

@@ -1 +1,14 @@
{}
{
"editor.defaultFormatter": "HookyQR.beautify",
"editor.formatOnPaste": false,
"[html]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"[handlebars]": {
},
"beautify.config": {
"indent_handlebars": false
},
"twig-language-2.endComma": "always",
}

54
blog/ES6vsCJS.md Normal file
View File

@@ -0,0 +1,54 @@
# ES6 vs CommonJS
The differences in using import/export between the two:
![Differences](https://i.stack.imgur.com/5WgFJ.png)
- Node is compatible with ES6. You can find a compatability table here: <https://node.green>.
## CommonJS
To export functions use `exports.name`:
```javascript
exports.run = run;
```
You can also use:
````javascript
module.exports = {
run: run
}
```
for multiple exports.
To import functions use `require`. You can use object destructuring as well:
```javascript
const { run } = require("./build-lunrjs-index");
const gulp = require("gulp");
````
If using destructuring you can then run the function as if it were local:
```javascript
function buildSearch(cb) {
run();
cb();
}
```
If you don't use destructuring (`const run = require("./build-lunrjs-index");`) then you have to pass the constant name and the export you want in:
```javascript
function buildSearch(cb) {
run.run();
cb();
}
```
## Node and Gulp
If you are using node and or gulp you should use CJS for your module import and exports. You can use any javascript that node is compatible with in your code.

View File

@@ -1,11 +1,22 @@
baseURL = "http://example.org/"
title = "Tech blog"
theme = "hugo-theme-chunky-poster"
baseURL = "http://127.0.0.1:6060"
title = "panaetius.io"
# theme = "panaetius-chunky-theme"
theme = "panaetius-theme"
paginate = 2
languageCode = "en"
DefaultContentLanguage = "en"
enableInlineShortcodes = true
footnoteReturnLinkContents = "^"
description = "Tech blog showcasing Python, Machine-Learning, Vue, Homelab and other technologies to try at home."
[languages]
[lanugages.en]
weight = 1
[languages.en.params]
LanguageName = "English"
[menu]
@@ -13,7 +24,25 @@ footnoteReturnLinkContents = "^"
identifier = "home"
name = "Home"
url = "/"
weight = 10
weight = 1
[[menu.main]]
identifier = "about"
name = "About"
url = "/about/"
weight = 2
[[menu.main]]
identifier = "tags"
name = "Tags"
url = "/tags/"
weight = 3
[[menu.main]]
identifier = "search"
name = "Search"
url = "/search/"
weight = 4
[taxonomies]
category = "categories"
@@ -22,16 +51,28 @@ series = "series"
author = "authors"
[params]
header = "panaetius.io"
author = "Daniel Tomlinson"
description = "Lorem ipsum dolor sit amets."
# homepageImage = "/images/homepage-image.jpg"
description = "Tech blog showcasing Python, Machine-Learning, Vue, Homelab and other technologies to try at home."
homepageImage = "/images/homepage.svg"
logo = "/images/homepage.svg"
share = true
showLanguageSwitcher = false
[params.prismJS]
enable = true
theme = "okaidia"
twitter = "dmot7291"
github = "dtomlinson91"
[params.commento]
enable = true
url = "http://localhost/js/commento.js"
url = "https://commento.panaetius.co.uk/js/commento.js"
[imaging]
resampleFilter = "Lanczos"
[outputs]
home = ["HTML", "RSS", "JSON"]
page = ["HTML", "RSS"]
[markup]
[markup.highlight]
style = "monokailight"
lineNos = true

View File

@@ -3,5 +3,6 @@ title: 'Our Difference'
button: 'About us'
weight: 2
---
<img src="/images/front-wallpaper.svg" class="front-background"/ style="opacity: 5% !important;">
Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. ipsum dolor sit amet, et essent mediocritatem quo,
Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. ipsum dolor sit amet, et essent mediocritatem quo,

View File

@@ -1,8 +1,9 @@
---
name: "Daniel Tomlinson"
name:
- "Daniel Tomlinson"
images:
- "daniel-tomlinson.png"
twitter: ""
twitter: "dmot7291"
---
Some text here.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 131 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 130 B

View File

@@ -0,0 +1,9 @@
---
name:
- "New Authors"
images:
- "new-author.png"
twitter: "dmot7292"
---
Some text here.

Binary file not shown.

BIN
blog/content/images/.DS_Store vendored Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 119 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,7 @@
---
title: "List of posts"
description: "A list of all posts in chronological order."
date: "2020-05-04T02:14:50+01:00"
images: ["images/first_post.svg"]
draft: true
---

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,16 +1,26 @@
---
title: "First Post"
date: 2020-05-04T02:14:50+01:00
description: "The first post testing Hugo out for its markdown features and commento integration."
date: "2020-05-04T02:14:50+01:00"
images: ["images/banner.svg"]
draft: true
authors:
- "Daniel Tomlinson"
tags:
- Introduction
authors: ["Daniel Tomlinson"]
tags: ["Introduction", "another"]
---
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
<!--more-->
---
## <!--more-->
## Test code
```python
import flask
def flask():
something = flask.something()
return something
```
## Instagram Simple Shortcode

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 119 KiB

View File

@@ -0,0 +1,69 @@
---
title: "Second Post"
date: "2020-05-05T02:14:50+01:00"
images: ["images/banner.svg"]
draft: true
authors:
- "Daniel Tomlinson"
- "New Authors"
tags: ["Introduction", "test", "another", "tagging", "hugo", "newz"]
---
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
## <!--more-->
## Test code
```python
import flask
def flask():
something = flask.something()
return something
```
## Instagram Simple Shortcode
{{< instagram_simple BGvuInzyFAe hidecaption >}}
<br>
---
## YouTube Privacy Enhanced Shortcode
{{< youtube ZJthWmvUzzc >}}
<br>
---
## Twitter Simple Shortcode
{{< twitter_simple 1085870671291310081 >}}
<br>
---
## Vimeo Simple Shortcode
{{< vimeo_simple 48912912 >}}
---
## Test img shortcode
{{< img "images/banner.svg*" >}}
## Test table
Does Hugo put the class of the table as `content table`? If so do we need to add the bootstrap `table` class?.
Hugo adds no css to the table. In order to style it you should select the `<table>` element in the `.content` class, and add the `.table` class to it.
| Name | Job |
| ------ | -------- |
| Daniel | Capacity |
| Dale | Capacity |

View File

@@ -0,0 +1,6 @@
---
headless: false
type: "search"
---
Search pages

214
blog/gulp.md Normal file
View File

@@ -0,0 +1,214 @@
# Gulp
Gulp can complement webpack by adding additional workflows to your project. Webpack can be used to package your bundles, gulp can be used to run additional things before or after the build.
<https://forestry.io/blog/gulp-and-webpack-best-of-both-worlds/>
Using node we could run our webpack command and build commands seperately in the workflow. We could use gulp to use one command to do both. We can also use gulp to build the search index of an app as part of this workflow.
## ES6 in Gulp
Gulp is a command-line task runner for node. This means that any javascript that is valid in node is valid in gulp (including anything you import). Node doesn't support ES6 modules (without using babel) so you have to use `require` and `exports`. You can freely use arrow functions and any other node compatible javascript.
<https://gulpjs.com/docs/en/getting-started/javascript-and-gulpfiles/>
If you want full ES6 syntax in gulp you should create a `gulpfile.babel.js` and install the `@babel/register` module.
If you just want the `import/export` syntax create a `gulpfile.esm.js` and install the `esm` module.
## Creating a gulpfile
`yarn add gulp`
Create a `gulpfile.js` in the root of your project next to the `package.json` file.
Alternatively if you want to split your gulp tasks out into seperate modules you should create a `./gulpfile.js` directory and an `index.js` file inside. This will be treat as a normal `gulpfile.js`.
### functions
Create functions as normal in the gulpfile. These functions should take `cb` as a parameter and you should end the function with `cb()` to let gulp know the function has finished.
### export
Your gulpfile should export either a `gulp.series` or `gulp.parallel` (or just the function itself). `series` will run one after the other and parallel will run in any order.
An example gulpfile that is importing a module and running it:
```javascript
const { run } = require("./build-lunrjs-index");
const gulp = require("gulp");
function buildSearch(cb) {
run();
cb();
}
module.exports = {
buildSearch: gulp.parallel(buildSearch),
};
```
## package.json
Your `package.json` file can create an entry under the `scripts` key:
```json
"scripts": {
"buildSearch": "gulp buildSearch"
}
```
The `gulp` command should be followed by the name of the export you want to run.
You can then run the command using `npm` or `yarn`: `yarn buildSearch`.
## promises in gulp functions
Gulp functions must take `cb` as a parameter and end with `cb()` to let gulp know the task has finished.
Alternatively you can use an `async` function and have your function `await` a promise at the end.
**If your function ends with a promise you do not need to use `cb()`**.
## webpack
### webpack api
You can integrate gulp with webpack, allowing gulp to run your webpack build. There are a few ways to do this, one way using `webpack-stream` is here: <https://cecilphillip.com/adding-webpack-to-your-gulp-tasks/>.
Alternatively, if you don't want to control webpack through gulp (pipe in a different destination or alter the workflow) and just want to run it as if you were running webpack directly you can simply import `webpack` and your `webpack.prod.js` file into gulp.
The following gulpfile will run a webpack build (remember to add to package.json as a script):
```javascript
const webpack = require("webpack");
const webpackConfig = require("./webpack.prod");
function buildTheme(cb) {
return new Promise((resolve, reject) => {
webpack(webpackConfig, (err, stats) => {
if (err) {
return reject(err);
}
if (stats.hasErrors()) {
return reject(new Error(stats.compilation.errors.join("\n")));
}
resolve();
});
});
}
module.exports = {
buildTheme: buildTheme,
};
```
### using exec
TODO: Link this to javascript running commands/executing files.
If you wanted to run a webpack build in another node project (say a theme which is a submodule), you can use `exec` to literally run the webpack command from the folder as if you were doing it on the shell.
```javascript
const util = require("util");
const exec = util.promisify(require("child_process").exec);
const themeDir = getCurrentDir(__dirname) + "/themes/panaetius-theme";
function getCurrentDir(dir) {
var themeDir = dir.split("/");
themeDir.pop();
return themeDir.join("/");
}
// Function to build the theme
async function buildTheme(cb) {
console.log(themeDir);
await exec(
`cd ${themeDir} && node ${themeDir}/node_modules/webpack/bin/webpack.js --config ${themeDir}/webpack.prod.js`
);
}
```
Here we are getting the current full path to the file being ran (the gulpfile) and stripping the filename to get the path.
We then use `exec`, which has been wrapped in a promise, to `cd` into the project directory and run the node command to build webpack.
## minimizing images
<https://gulpjs.com/docs/en/getting-started/working-with-files>
Use the plugin `gulp-imagemin`: `yarn add gulp-imagemin`
You should use `src()` and `dest()` using `pipe()` to load in your images.
`src` should be an array of images (you can use globs). You then pipe into an instance of `imagemin()`.
To overwrite the file, you should use `file.base` in a function:
```javascript
function minifyImages(cb) {
gulp
.src([
`${currentDir}/content/**/*.png`,
`${currentDir}/content/**/*.svg`,
`${currentDir}/static/**/*.png`,
`${currentDir}/static/**/*.svg`,
`${themeDir}/static/**/*.png`,
`${themeDir}/static/**/*.svg`,
])
.pipe(imagemin())
.pipe(
gulp.dest(function (file) {
return file.base;
})
);
cb();
}
```
## minimizing javascript
Some javascript won't be suitable for inclusion in a bundle (`lunr`). You can include these in your final build by copying the file from `node_modules` into `./static/dist` and minimize the file using gulp.
Use `yarn add gulp-minify`.
```javascript
const minify = require("gulp-minify")
function lunr(cb) {
gulp
.src(`${currentDir}/node_modules/lunr/lunr.js`)
.pipe(minify())
.pipe(gulp.dest(`${currentDir}/static/dist`));
cb();
}
```
## inserting webpack dynamic bundle content into a file
<https://stackoverflow.com/questions/23247642/modify-file-in-place-same-dest-using-gulp-js-and-a-globbing-pattern>
Use <https://www.npmjs.com/package/gulp-replace> to replace a string in a file.
Approach:
If you are not using Hugo, you could use the above to dynamically reference images in your html.
Use gulp to replace these references with the images bundled with webpack. If yuo name the images the same as they're referenced, then replace any `<img src="">` with the bundled image in the html.
You can get the mapping from the output from webpack, using the unique image name as the key. You can then use gulp to minimise or resize the images.
## Hugo
TODO: Link this to javascript running commands/executing files.
You can build a Hugo project in Gulp by using `execFile`.
```javascript
const util = require("util");
const exec = util.promisify(require("child_process").execFile);
async function buildHugo(cb) {
await execFile("hugo", ["-D", "--minify"]);
}
```

View File

@@ -0,0 +1,73 @@
const fs = require("fs").promises;
const { promisify } = require("util");
const frontMatterParser = require("parser-front-matter");
const lunrjs = require("lunr");
const readdirp = require("readdirp");
const parse = promisify(frontMatterParser.parse.bind(frontMatterParser));
async function loadPostsWithFrontMatter(postsDirectoryPath) {
// We read the content directory, but avoid indexing of these directories:
// .DS_Store, old.
const postEntryInfos = await readdirp.promise(postsDirectoryPath, {
fileFilter: ["!.DS_Store", "!_index.md", "!*.jpg", "!*.svg", "!*.png"],
directoryFilter: "!old",
});
// We take each post and map their paths.
const postNames = postEntryInfos.map((file) => file.path);
// To debug index building, un-comment the following line to get a list of
// postNames. Do NOT keep it un-commented or the search will fail.
// console.error(postNames);
const posts = await Promise.all(
postNames.map(async (fileName) => {
const fileContent = await fs.readFile(
`${postsDirectoryPath}/${fileName}`,
"utf8"
);
const { content, data } = await parse(fileContent);
return {
// we only take a 10,000 character slice of the post to index. this ensures
// our index doesn't grow too large
content: content.slice(0, 10000),
...data,
};
})
);
return posts;
}
function makeIndex(posts) {
return lunrjs(function () {
// list of fields we are gathering from each post. we use the Title as our
// reference marker (identifying feature)
this.ref("title");
this.field("title");
// this.field('authors');
// this.field('date');
this.field("content");
this.field("tags");
// this.field('resources.src');
// this.field('imageDescription')
posts.forEach((p) => {
this.add(p);
});
});
}
async function run() {
// The following line specifies which directory to use for indexing. See above
// for excluded directories and filetypes.
const posts = await loadPostsWithFrontMatter(`${__dirname}/../content/`);
const index = makeIndex(posts);
// console.log(JSON.stringify(index));
return JSON.stringify(index);
}
// run()
// .then(() => process.exit(0))
// .catch((error) => {
// console.error(error.stack);
// process.exit(1);
// });
exports.run = run;

112
blog/gulpfile.js/index.js Normal file
View File

@@ -0,0 +1,112 @@
// Imports
const { run } = require("./build-lunrjs-index");
const gulp = require("gulp");
const util = require("util");
const execFile = util.promisify(require("child_process").execFile);
const exec = util.promisify(require("child_process").exec);
const { getCurrentDir } = require("./utils");
const fs = require("fs");
const imagemin = require("gulp-imagemin");
const uglify = require("gulp-uglify");
const hash = require("gulp-hash-filename");
const rename = require("gulp-rename");
const clean = require("gulp-clean");
const replace = require("gulp-replace");
// Directories
const currentDir = getCurrentDir(__dirname);
const themeDir = getCurrentDir(__dirname) + "/themes/panaetius-theme";
// Function to build and write the search index
async function buildSearch(cb) {
let searchIndex = await run();
fs.writeFileSync(currentDir + "/static/search-index.json", searchIndex);
cb();
}
// Function to build the Hugo project
async function buildHugo(cb) {
await execFile("hugo", ["-D", "--minify"]);
}
// Function to minify images
function minifyImages(cb) {
gulp
.src([
`${currentDir}/content/**/*.png`,
`${currentDir}/content/**/*.svg`,
`${currentDir}/static/**/*.png`,
`${currentDir}/static/**/*.svg`,
`${themeDir}/static/**/*.png`,
`${themeDir}/static/**/*.svg`,
])
.pipe(imagemin())
.pipe(
gulp.dest(function (file) {
return file.base;
})
);
cb();
}
// Function to build the theme
async function buildTheme(cb) {
console.log(themeDir);
await exec(
`cd ${themeDir} && node ${themeDir}/node_modules/webpack/bin/webpack.js --config ${themeDir}/webpack.prod.js`
);
}
// Clear ./static/dist
function cleanJS(cb) {
gulp.src(`${currentDir}/static/dist/*.js`, { read: false }).pipe(clean());
cb();
}
// Copy lunrjs into static
const jsFiles = {
lunrjs_gulp: "s",
};
function lunr(cb) {
gulp
.src(`${currentDir}/node_modules/lunr/lunr.js`)
.pipe(hash({ format: "{name}.{hash}.{ext}" }))
.pipe(uglify())
.pipe(
rename(function (path) {
file = path.basename += "min";
for (const key in jsFiles) {
if (jsFiles.hasOwnProperty(key)) {
jsFiles.key = file += ".js";
console.log(jsFiles.key);
}
}
})
)
.pipe(gulp.dest(`${currentDir}/static/dist`));
cb();
}
// Insert js into HTML
function insertJS(cb) {
cb();
}
module.exports = {
buildSearch: buildSearch,
buildHugo: buildHugo,
buildTheme: buildTheme,
minifyImages: minifyImages,
cleanJS: cleanJS,
insertJS: insertJS,
lunr: lunr,
buildBlog: gulp.parallel([
buildSearch,
buildHugo,
buildTheme,
minifyImages,
lunr,
]),
};

View File

@@ -0,0 +1,7 @@
function getCurrentDir(dir) {
var themeDir = dir.split("/");
themeDir.pop();
return themeDir.join("/");
}
exports.getCurrentDir = getCurrentDir

901
blog/hugolayout.md Normal file
View File

@@ -0,0 +1,901 @@
## Layout
There are a lot of template types: <https://gohugo.io/templates/>.
### Templates
The layout order is important in Hugo. You can use this to see all the different template pages you can create, and where they should go. It will show the order of preference when looked up.
<https://gohugo.io/templates/lookup-order/>
#### Base template
<https://gohugo.io/templates/base/#define-the-base-template>
You should create a base template in `layouts/_default/baseof.html`.
This base template should define blocks and partials as a base template for the whole site.
#### Homepage
<https://gohugo.io/templates/homepage/>
You should create an `index.html` file in `./layouts`. This html file will be your homepage. Typically you would define a main block and have the main content of the page generated here.
You can use front matter and content to fill this homepage. You should create a `./content/_index.md` file to populate page variables, e.g `{{.Content}}`.
Alternatively, you can just have the `index.html` reference `Site` wide variables from your config file and not have the `_index.md`. This is done in the chunky theme.
```hugo
{{- range first 1 (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections) -}}
{{ $page := . }}
```
#### Single pages
<https://gohugo.io/templates/single-page-templates/>
These are useful for blog posts. You should create a folder with the name of the single page type and a `single.html` in `./layouts`: `./layouts/post/single.html`.
You can have a `single.html` in `./layouts/_default` to be used as a default as well. Any content which has a `single.html` will take precedence over this file.
This `single.html` can then define a main block.
Content from markdown files should go in `./content/post`. No `index.md` file is needed in this case. You can of course create a bundle of associated images or extra content to be able to reference them from the front matter.
#### List pages
<https://gohugo.io/templates/lists>
You can define a list page for taxonomies for example.
A list template is a page that houses a list of things. These could be articles, or taxonomies, or even articles under a taxonomy.
To do this for authors, create a `list.html` in `./layouts/authors`.
This `list.html` should define a `main` block, and what you want the page to look like when this is visited. If you create a `daniel-tomlinson` author, this is the page that will be used to display this author.
This `list.html` will be used for the endpoint `/authors`, as well any actual authors `/authors/daniel-tomlinson`. If you want to display a different template for the `/authors`, say a list of all authors, then look at term pages.
To display content, create an `_index.md` file in `./content/authors/daniel-tomlinson`.
For a _branch_ bundle you need an `_index.md` at the lowest branch for the tree to be navigable. You can optionally put one at other points along the chain if you want metadata in there as well. E.g `./layouts/authors` can have an `_index.md`, but it doesn't need one. You would need one in `./layouts/authors/daniel-tomlinson` in order for the tree to work.
This `_index.md` is used for metadata, and any content you want to be displayed. This content can be displayed in the `list.html` with
```hugo
<div class="content">
{{ $term.Content }}
</div>
```
#### Term pages
In addition to list pages, you might want to display a different page if someone visits `panaetius.io/authors` to the page if you visited an actual author. With just a `list.html` in `./layouts/authors`, this `list.html` will be used for the `/authors` endpoint.
To display different content, you should create a `terms.html`.
You can list all pages under this taxonomy in this `list.html` with the variable `{{ range .Data.Pages }}`.
You can also list all site variables, for example you can have a `/tags` endpoint and reference and display all the tags, even though they're not physically rendered in any other page:
```hugo
<ul>
{{ range .Site.Taxonomies.tags }}
<li>
<a href="{{ .Page.Permalink }}">{{ .Page.Title }}
</a> {{ .Count }}</li>
{{ end }}
</ul>
```
If you create a `terms.html` in `./layouts/authors` you can then access all pages under this bundle. To Display and link to the author names pages themselves:
```hugo
<div class="row justify-content-center">
<ul>
{{ range .Data.Pages }}
{{ $page := . }}
{{ range .Params.name }}
<li><a href="{{ $page.Permalink }}">{{ . }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
```
For more things you can do with taxonomy or term pages, see <https://gohugo.io/templates/taxonomy-templates/>.
### Difference between \_index.md and index.md (Bundles)
A really good resource explaining these concepts, and going into more detail on resources in Hugo is: <https://regisphilibert.com/blog/2018/01/hugo-page-resources-and-how-to-use-them/>
<https://gohugo.io/content-management/page-bundles/#readout>
<https://discourse.gohugo.io/t/what-is-the-difference-between-index-md-and-index-md/10330/11>
There are two types of bundles:
- Leaf bundle: has no children
- Branch bundle: homepage, section, taxonomy terms, taxonomy list.
| | Leaf Bundle | Branch Bundle | | |
| ---------------------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | --- | --- |
| Usage | Collection of content and attachments for single pages | Collection of attachments for section pages (home page, section, taxonomy terms, taxonomy list) | | |
| Index file name | index.md | \_index.md | | |
| Allowed Resources | Page and non-page (like images, pdf, etc.) types | Only non-page (like images, pdf, etc.) types | | |
| Where can the Resources live? | At any directory level within the leaf bundle directory. | Only in the directory level of the branch bundle directory i.e. the directory containing the \_index.md (ref). | | |
| Layout type | single | list | | |
| Nesting | Does not allow nesting of more bundles under it | Allows nesting of leaf or branch bundles under it | | |
| Example | content/posts/my-post/index.md | content/posts/\_index.md | | |
| Content from non-index page files… | Accessed only as page resources | Accessed only as regular pages | | |
#### Leaf bundles
You can use these to "bundle up" content that needs to be useable.
An example of using headless bundles to reference pages in a bundle and display them somewhere: <https://gohugo.io/content-management/page-bundles/#headless-bundle>.
##### Use 1: Images
For example, you can create `./content/images` with an `index.md` that has `headless: true`. The contents of `./content/images` won't be published, but they will be accessible to other resources. You could reference these images locally in another content type. E.g `./content/posts/page.md` could reference one of these images.
```text
./content/images
├── data_report.svg
├── first_post.svg
├── homepage.svg
└── index.md
```
These can be referenced in front matter with `images: ["/images/first_post.svg"]` in the files:
```text
./content/post
├── first_post.md
└── second_post.md
```
##### index.md
Essentially: `index.md` is used to create _bundles_ of content. If you're writing a collection of single posts, you can create a folder for each one in `./content/posts/`:
```text
./content/post
├── first_post
│ ├── images
│ │ └── banner.svg
│ └── index.md
└── second_post
├── images
│ └── banner.svg
└── index.md
```
The `index.md` should contain all the markdown for the page. Because it is called `index.md`, it won't create a new endpoint it will be referenced and displayed at `/post/first_post`.
You can then create `single.html` and custom views like `card.html` in `./layouts/post` for this content.
In the `single.html` in `./layouts/post/` we can use the following to refer to the banner image for each post:
```html
{{- with .Resources.Match "images/banner.svg" -}} {{ range . }}
<div class="row justify-content-center mb-3">
<div class="col-lg-10">
<img
data-src="{{ .RelPermalink }}"
class="img-fluid rounded mx-auto d-block"
alt="{{ $page.Title }}"
data-aos="zoom-in"
/>
</div>
</div>
{{- end -}} {{- end -}}
```
#### Branch bundles
These are used in list pages.
If you have a taxonomy, you need a
If you have an `_index.md` then all markdown files alongside it will render as a list template, and not as a single page template: <https://gohugo.io/templates/lists#add-content-and-front-matter-to-list-pages>.
##### Use 1: Taxonomy metadata
<https://gohugo.io/content-management/taxonomies/#add-custom-metadata-to-a-taxonomy-term>
One typical use is to add metadata to taxonomies. For example, if you have an author in `./content/authors/daniel-tomlinson`, you can place an `_index.md` file in here with a `twitter: link`. Then in the `./layouts/authors/list.html` you can reference it with `$term.Params.twitter`.
You can place markdown content inside this `_index.md` file to be displayed on the page. In the `list.html` you should reference it with:
```hugo
{{ define "main" }}
{{- $term := . -}}
<div class="content">
{{ $term.Content }}
</div>
```
### Using bundles to reference files relative to its own post
We've seen how we can use bundles to access images relative to its own page. (I.e a banner image that is shown automatically in the `single.html`)
We can extend this and use Resources and the page's front matter to include anything in these bundles, and have them available locally.
This link explains it in detail: <https://regisphilibert.com/blog/2018/01/hugo-page-resources-and-how-to-use-them/#practice-page-manifest-using-resources-and-metadata>.
### Shortcodes
<https://regisphilibert.com/blog/2018/01/hugo-page-resources-and-how-to-use-them/#in-my-markdown>
We can use shortcodes to define snippets of html that we can reference in the markdown. This will let us dynamically insert content, such as an image or even a link to a file.
#### Displaying an image
The following is a shortcode template that can be used to display an image:
```html
{{ $img := $.Page.Resources.GetMatch (.Get 0)}}
<figure>
<img src="{{ $img.RelPermalink }}" alt="(.Get 1)" />
<figcaption>{{.Get 1}}</figcaption>
</figure>
```
This shortcode expects two arguments (by using `.Get`). The first is the name of the image which `Resources` will use to find the file, and the second is a caption to go alongside it.
This shortcode should go in `./layouts/shortcodes/` and we will call it `img.html`.
Then, in your markdown you can reference it using:
```markdown
{{< img "*overcooked-dough*" "Those cupcakes are way overcooked!" >}}
```
It will look for the image called `overcooked-dough` and use the caption we provided.
#### Rendering a list of files
<https://regisphilibert.com/blog/2018/01/hugo-page-resources-and-how-to-use-them/#practice-page-manifest-using-resources-and-metadata>
You can use metadata in your front matter to reference and define resources: <https://regisphilibert.com/blog/2018/01/hugo-page-resources-and-how-to-use-them/#page-resources-metadata>.
We can create a `manifest.html` in `./layouts/shortcodes`:
```html
<ul>
{{ range .Resources.Match "documents/*" }}
<li>
<a target="_blank" href="{{ .Permalink }}">
<i class="far fa-file-{{ .Params.icon }}"></i> {{ .Title }}
<small>{{ with .Params.ref }}(Ref.{{ . }}) {{ end }}</small>
</a>
</li>
{{ end }}
</ul>
```
Then in the markdown we reference it like:
```markdown
title: "Bogus Application"
date: 2018-01-10T10:36:47-05:00
resources:
- src: 'documents/guide.pdf'
name: Instruction Guide
params:
ref: '90564568'
- src: 'documents/checklist.pdf'
name: Document Checklist
params:
ref: '90564572'
- src: photo_specs.pdf
name: Photo Specifications
params:
ref: '90564687'
- src: 'documents/payment.docx'
name: Proof of Payment
# Now our shared values
- src: '\*.pdf'
params:
icon: pdf
- src: '\*.docx'
params:
icon: word
{{< manifest >}}
```
This will look for all files in (for example) `./content/post/first_post/documents` and display them in a list.
Note the metadata. When using this resources in the front matter although the items in the list are all lower case in the template they will be referenced by their capital letter. Eg `.Name` and `.Title`.
name is _overwriting_ the filename. If you specify name you're setting a new name for Hugo. It will match with `.Match` and `.GetMatch` against this new name. This is useful if your filenames are ugly, or automatically generated by something and you want to display them differently.
Title is using the same name as name (confusing!).
params allows you to specify additional custom information about the file. Here we're using a wildcarded `src` to find `.pdf` files and setting an `icon` parameter for Font Awesome.
An example of this live is here: <https://regisphilibert.com/bogus/application/>.
### Blocks
You can define blocks in a base template and put content in it. Then you can overwrite these blocks in other templates.
E.g in a `baseof.html`: `{{ block "main" . }}{{ end }}`.
In any content, you can define a `main` block to fill and override this content in:
```hugo
{{ define "main" }}
<main class="content-page container pt-7 pb-5">
{{ end }}
```
You can of course use the local variables to access the content's metadata in these define blocks.
Base templates should go in `./layouts/_default`. E.g a `single.html`
### Partials
<https://gohugo.io/templates/partials>
Partials are partial page content that can be used in addition to blocks.
They only have access to the parent scope and you must pass down the scope with a `.` when you write the partial tag:
```html
{{ partial "footer.html" . }}
```
You have access to the `Site` variables globally, and any other variables that are defined in its parent.
You can also use partials to return a value of any type. For example, you could create a partial which returns pages that has a `featured` parameter in its front matter.
You can access `site.RegularPages` in the partial to access a parameter in each page, and display them: <https://gohugo.io/templates/partials#example-getfeatured>.
### Render functions
In a template file, can grab content (with the `Range` function):
```html
<div class="articles row row-cols-1 row-cols-lg-3">
{{ range after 1 (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections) }}
<div class="col mb-3" data-aos="zoom-in">
{{ .Render "card" }}
</div>
{{ end }}
</div>
```
And pass it off to a Render function which references a view. In this case `card` is a template in `./layouts/_default/card.html`.
If you want a different view depending on the content being rendered, you should create the `card.html` for each content you want it to be applied to.
So if we wanted to use `card.html` for post and it be different to the default view, we should create `./layouts/post/card.html`.
Hugo knows the content type and location when using a render, and will use it if it exists, and default to the view in `./layout/_default` if not.
This only works in a list context - i.e in your `html` template you should use `range` or some other command that gets you a list context.
#### Not using render functions
If you don't need to use render functions, say you want to grab the content and not pass it to a view html template you can always do it inline:
```html
{{- range first 1 (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections) -}} {{ $page := . }}
<div class="latest row py-lg-5">
<div class="col-lg-6 mb-3">
{{- with .Resources.Match "images/banner.svg" -}} {{ range . }} {{- $image
:= . -}}
<a href="{{ $page.RelPermalink }}" class="d-block">
<img
data-src="{{ $image.RelPermalink }}"
class="img-fluid rounded"
alt="{{ $page.Title }}"
data-aos="zoom-in"
/>
</a>
{{- end -}} {{- end -}}
</div>
<div class="col-lg-6 mb-3">
<h5 class="created text-muted text-uppercase font-weight-bold">
{{ $page.Date.Format "January 2, 2006" }}
</h5>
<h2><a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a></h2>
<div class="content">
{{ $page.Summary }}
</div>
</div>
</div>
{{- end -}}
```
### Chaining multiple Range or With commands in html templates
If you need to use multiple `range` and `with` statements in the `html` templates, you can use variables in Hugo to store the reference to be used later on in the chain:
```hugo
{{- range first 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) -}}
{{ $page := . }}
<div class="latest row py-lg-5">
<div class="col-lg-6 mb-3">
{{- with $page.Params.images -}}
{{- $images := . -}}
```
### html snippets for templates
#### Get authors from front matter
`{{ .Params.authors }}`
#### Iterate through a list
```hugo
{{ range $term.Params.name }}
{{ end }}
```
#### Get n'th item
`{{ index $term.Params.name 0 }}`
#### Get the corresponding page in a bundle from an author
You can access paramters in other pages from a different page by using `$.Site.GetPage` to find the page. You can find the page using front matter from the current page you are in as a variable.
```hugo
{{- with $.Site.GetPage (printf "/authors/%s" (. | urlize)) -}}
{{- $term := . -}}
```
You can get the permalink of this page to use in the html
`{{ $term.RelPermalink }}`
We use this to get the image of an author in a branch bundle.
#### Get a resource (image etc) from a parameter
`{{- with .Resources.GetMatch (index $term.Params.images 0) -}}`
`{{ end }}`
You can resize the image
`{{- $image := .Resize "64x" -}}`
And then use the permalink to display in html
`{{ $image.RelPermalink }}`
#### Set parameter
`{{ $term := . }}`
#### Access all pages in a branch bundle
If you're writing a `terms.html` you can find all page in the bundle with
```hugo
{{ range .Data.Pages }}
{{ end }}
```
### Search
Using `lunr.js` with Hugo: <https://codewithhugo.com/hugo-lunrjs-search-index/>.
Generating a search index that recursively finds all files: <https://git.sr.ht/~exprez135/mediumish-taliaferro/tree/master/layouts/search-page/search.html>.
#### Creating a search index using Scratch (optional)
<https://gohugo.io/functions/scratch/>
<https://regisphilibert.com/blog/2017/04/hugo-scratch-explained-variable/>
You can dynamically create a whole index of all blog posts or any content in a json file with Hugo.
This won't be used to search against, but it can be useful if you want to see all content across all pages.
You should first add `JSON` to the `[outputs]` stanza in your `config.toml` file:
```toml
[outputs]
home = ["HTML", "RSS", "JSON"]
page = ["HTML", "RSS"]
```
Then in `./layouts/_default` create an `index.json` file.
We can utilise the Hugo command scratch, which creates a temporary scratch pad to store variables, to create a json object for the whole site:
```json
{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
{{- $.Scratch.Add "index" (dict "title" .Title "subtitle" .Params.subtitle "description" .Params.description "tags" .Params.tags "images" .Params.images "content" .Plain "permalink" .Permalink) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}
```
#### Creating a search page
You can create a new `single.html` in `./layouts/search/`.
Then you can create a new markdown file `index.md` in `./content/search`.
This markdown file should set the `type` in the front matter - this should be set to `search` so it uses the search `single.html`.
```markdown
---
headless: false
type: "search"
---
```
#### Using lunr.js
In the root of the Hugo project, next to the `config.toml`, do:
`yarn add lunr`
`yarn add parser-front-matter`
TODO: document installing this using webpack bundles! Not copying `lunr` across to the `./static/js` folder.
We write the javascript that runs `lunr.js` to build the index. An example can be found here:
TODO: link to the `build-lunrjs-index.js` file.
Edit this file appropiately (content to be displayed, filenames to be ignored) for your project.
To build the index you run the following with node:
`node ./build-lunrjs-index.js > static/search-index.json`.
#### Search page content
TODO: Link to the search's `index.html` in the new theme.
You can see an example of the search page's content in the repo above.
The idea is to have Hugo generate the data you want to show after a search for all posts that you want to search against. Since Hugo is a static site generator, once it's built it's final and we can't dynamically alter content easily.
```hugo
<div class="row">
{{ $p := slice }}
{{ range (where .Site.RegularPages "Section" "==" "post") }}
{{ $.Scratch.Set "image" .RelPermalink }}
{{ $.Scratch.Add "image" (index .Params.images 0) }}
{{ $post := dict "link" .RelPermalink "author" (index .Params.authors 0) "tags" .Params.tags "title" .Title "date" (.Params.date.Format "January 2, 2006") "image" ($.Scratch.Get "image") "content" (substr .Plain 0 200) -}}
{{ $p = $p | append $post -}}
{{ end }}
{{ $p | jsonify }}
</div>
```
Here we are getting the title, image, tags, author and first 200 words of the content. This is the content we want to show after a search has been ran, it has nothing to do with the query itself. The final line is printing the content on the page so you can debug/test it.
In our `single.html` we load the content of this variable into javascript using Hugo's templating:
```javascript
const posts = JSON.parse(
{{ $p | jsonify }}
);
```
We can then write the `lunr.js` code that takes the input from the user, runs it against the `lunr.js` index it has created and return a list of titles that match the search query.
We then map these titles from `lunr.js` with the titles from the frontmatter. We can then return some `html` that dynamically renders search results using the Hugo loaded variable as the content.
### SEO
To optimise Hugo for SEO we can follow this guide: <https://regisphilibert.com/blog/2017/04/hugo-scratch-explained-variable/>.
#### Structured data
Structured data is provided in your html base template that allows Google to know more about the content it is showing. Structured data shows the ratings in a review, or the calories in a recipe on the card itself in the search results.
There is a standard from Schema that shows all possible rules you can use: <https://schema.org/docs/full.html>.
Google also has documentation for certain types. A blog post or article can be found here: <https://developers.google.com/search/docs/data-types/article>.
We use this guide to set the structured data: <https://dev.to/pdwarkanath/adding-structured-data-to-your-hugo-site-58db> for a Hugo article.
Create a `schema.html` file in `./layouts/partials/`.
An example file for an article is: <https://git.panaetius.co.uk/hugo/chunky-theme/src/branch/master/layouts/partials/schema.html>.
You **need to make sure** that there is an `_index.md` in `./content/post/` which defines front matter for the `list.html`. The `schema.html` references `"image": {{ index .Params.images 0 | absURL }},` which will be checked on the `list` page because its section is equal to `post`. If you ommit this then Hugo will fail to build and give a `<index .Params.images 0>: error calling index: index of untyped nil` error.
Set the relevant parameters in the `config.toml`:
```toml
baseURL = "https://weekinmemes.com"
[params]
author = "DK"
logo = "img/logo.jpg"
header = "Week In Memes"
facebook = "weekinmemes"
twitter = "weekinmemes"
instagram = "weekinmemes"
github = "weekinmemes"
```
You should test your structured data against: <https://search.google.com/structured-data/testing-tool/u/0/>. Make sure that it is recognising all contexts you've defined. Your object should be valid json so make sure there is a parent array with commas seperating the objects.
#### Generic meta tags
The following should go in your `<head>` block:
```html
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
```
#### Title
You should set a title for your pages.
You should have a unique title for each page. This will be used to create a dynamic title for SEO like `My first blog post | panaetius.io`.
```hugo
<!-- Set dynamic title for metadata -->
{{ $scratch := newScratch }}
{{ with .Params.Title }}
{{ $scratch.Set "title" . }}
{{ $scratch.Add "title" " | " }}
{{ end }}
{{ $scratch.Add "title" .Site.Title }}
<meta property="og:title" content={{ $scratch.Get "title" }} />
<meta name="twitter:title" content={{ $scratch.Get "title" }} />
<meta itemprop="name" content={{ $scratch.Get "title" }} />
<meta name="application-name" content={{ $scratch.Get "title" }} />
<meta property="og:site_name" content={{ .Site.Title }} />
```
If the `Title` has been set on a page, it will use this then append the site title, else it will just the site title.
#### Description
<https://yoast.com/meta-descriptions/>
You should set a description on your posts and other pages.
This description should be no more than 155 characters and a few sentences. It should succintly and accurately describe your page and its content. E.g if you're writing a tutorial you would say so explicitly and give a brief idea of what it is.
```hugo
<!-- Set description -->
{{ if .Description }}
{{ $scratch.Set "description" .Description}}
{{ else if .Site.Params.description }}
{{ $scratch.Set "description" .Site.Params.description }}
{{ end }}
<meta name="description" content={{ $scratch.Get "description" }} />
<meta itemprop="description" content={{ $scratch.Get "description" }} />
<meta property="og:description" content={{ $scratch.Get "description" }} />
<meta name="twitter:description" content={{ $scratch.Get "description" }} />
```
#### Languages
<https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/>
<https://gohugo.io/content-management/multilingual/>
You should set in your `config.toml`:
```toml
[languages]
[lanugages.en]
weight = 1
[languages.en.params]
LanguageName = "English"
```
And the following at the top level (root no header):
```toml
languageCode = "en"
DefaultContentLanguage = "en"
```
Then in the `head.html`:
```html
<meta property="og:locale" content="{{ .Language.Lang }}" />
<meta name="language" content="{{ .Site.Params.LanguageName }}" />
{{ range .AllTranslations }}
<link
rel="alternate"
hreflang="{{ .Language.Lang }}"
href="{{ .Permalink }}"
title="{{ .Language.LanguageName }}"
/>
{{ end }}
```
#### Images
Add the following to `head.html`
```hugo
<!-- Set image -->
{{ with .Params.images }}
{{ $image := index . 0 }}
<meta itemprop="image" content="{{ $image | absURL }}" />
<meta property="og:image" content="{{ $image | absURL }}" />
<meta name="twitter:image" content="{{ $image | absURL }}" />
<meta name="twitter:image:src" content="{{ $image | absURL }}" />
{{ else }}
<meta itemprop="image" content="{{ .Site.Params.homepageimage | absURL }}" />
<meta property="og:image" content="{{ .Site.Params.homepageimage | absURL }}" />
<meta name="twitter:image" content="{{ .Site.Params.homepageimage | absURL }}" />
<meta name="twitter:image:src" content="{{ .Site.Params.homepageimage | absURL }}" />
{{ end }}
```
We are using the `homepageimage` and the first image of the `images` array for any list content.
#### Date
We set the property of updated time and get the sitemap for the whole site, and for the page we are on.
```hugo
<!-- Set date -->
<meta property="og:updated_time" content={{ .Lastmod.Format "2006-01-02T15:04:05Z0700" | safeHTML }} />
<!-- Sitemap & RSS Feed Tags -->
<link rel="sitemap" type="application/xml" title="Sitemap" href="{{ .Site.BaseURL }}sitemap.xml" />
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .Permalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
```
#### Article pages
These tags set the pagination, the publish time and author information. These should only be for blog posts or articles, not single pages like `home` or `about`.
This should be set for each `.Section` that is an article type, in this case it is just `post`.
```hugo
<!-- Set tags for article pages -->
{{ if eq .Section "post" }}
<!-- Pagination meta tags for list pages only -->
{{ $paginator := .Paginate (where .Pages "Section" "post") }}
{{ if $paginator }}
<link rel="first" href="{{ $paginator.First.URL }}">
<link rel="last" href="{{ $paginator.Last.URL }}">
{{ if $paginator.HasPrev }}
<link rel="prev" href="{{ $paginator.Prev.URL }}">
{{end }}
{{ if $paginator.HasNext }}
<link rel="next" href="{{ $paginator.Next.URL }}">
{{end }}
{{end }}
<meta property="og:type" content="article" />
<meta property="article:publisher" content="{{ .Site.Params.facebook }}" />
<meta property="og:article:published_time" content={{ .Date.Format "2006-01-02T15:04:05Z0700" | safeHTML }} />
<meta property="article:published_time" content={{ .Date.Format "2006-01-02T15:04:05Z0700" | safeHTML }} />
{{ if .Params.authors }}
{{ $authors := delimit .Params.authors ", " }}
<meta property="og:article:author" content="{{ $authors }}" />
<meta property="article:author" content="{{ $authors }}" />
<meta name="author" content="{{ $authors }}" />
{{ else }}
{{ $authors := .Site.Params.author }}
<meta property="og:article:author" content="{{ $authors }}" />
<meta property="article:author" content="{{ $authors }}" />
<meta name="author" content="{{ $authors }}" />
{{ end }}
{{ end }}
```
#### Single pages
These should only be set on pages that are not articles. To do this we can use Hugo's scratch.
You should set `{{ .Scratch.Set "IsSingle" true }}` on the following templates:
- `./layouts/index.html` which is for the homepage.
- `./layouts/_default/single.html` which is for single pages like `About`.
For each article you need to make sure the `single.html` is set it is own folder where this isn't set. For example `./layouts/post/single.html` exists and does not set it.
You need to make sure the right context is passed into the partial if you do this.
Alternatively, you can do:
```hugo
<!-- Set tags for single pages -->
{{ if ne .Section "post" }}
<meta property="og:type" content="website" />
<meta name="author" content="{{ .Site.Params.author }}" />
{{ end }}
```
#### Favicon
TODO: Create seperate note with link to generating a favicon for a project.
You can generate a favicon here: <https://favicon.io/favicon-generator/>.
If you already have an icon you want to use, you can create a set of favicons out of it here: <https://realfavicongenerator.net>.
You should add the following to the `head.html` to set the favicon and additional ios/android settings. Remember to set the `manifest.json`.
```hugo
<!-- Set favicon tags -->
<link rel="shortcut icon" href="{{ "favicon.ico" | absURL }}" />
<link rel="icon" type="image/x-icon" sizes="16x16 32x32" href="{{ "favicon.ico" | absURL }}" />
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}" sizes="180x180">
<link rel="icon" href="{{ "favicon-32x32.png" | absURL }} " sizes="32x32" type="image/png">
<link rel="icon" href="{{ "favicon-16x16.png" | absURL }}" sizes="16x16" type="image/png">
<link rel="manifest" href="{{ "manifest.json" | absURL }}">
<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | absURL }}" color="#0c344b">
```
#### Search engine tags
These tell google and other search engines that they can index and scrape the site.
```hugo
<meta name="robots" content="index,follow" />
<meta name="googlebot" content="index,follow" />
```
#### Twitter/Facebook tags
More information on these is here: <https://stackoverflow.com/questions/10836135/when-do-i-need-a-fbapp-id-or-fbadmins>. These are optional if you're not maintaining a facebook app to go alongside the website.
```hugo
<meta name="twitter:site" content="{{ .Site.Params.twitter }}">
<meta name="twitter:creator" content="{{ .Site.Params.twitter }}" />
<meta property="fb:app_id" content="538089519640705" />
<meta property="fb:admins" content="100000686899395" />
```
#### Other tags
```hugo
<!-- Theme Color -->
<meta name="theme-color" content="#141414" />
<meta name="msapplication-TileColor" content="#141414" />
<meta name="keywords" content="" />
<meta name="imagemode" content="force" />
<meta name="coverage" content="Worldwide" />
<meta name="distribution" content="Global" />
<meta name="HandheldFriendly" content="True" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="apple-mobile-web-app-title" content="{{ .Site.Params.header }}" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-touch-fullscreen" content="yes" />
```
#### Internal templates
Hugo ships with internal templates for common metadata for sites: <https://gohugo.io/templates/internal/>.
```hugo
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
```

53
blog/javascript.md Normal file
View File

@@ -0,0 +1,53 @@
# Javascript
## Promises
### wrapping a method/function in a promise
If a method you are importing does not return a promise, you can wrap it in one so you can use `async` `await`.
```javascript
const util = require("util");
const execFile = util.promisify(require("child_process").execFile);
```
Use `util.promisify` on the `import`/`require` to wrap it in a promise.
## await multiple tasks at the same time
You do not have to sequentially `await` functions in turn. It is possible to fire off multiple at the same time and then wait for them all to finish:
```javascript
let [foo, bar] = await Promise.all([getFoo(), getBar()]);
```
You wrap each function you want in `Promise.all()` - this takes an array of promises, and composes them all into a single promise. This will only resolve when every promise in the array has resolved itself.
**Important** - `Promise.all()` does not _dispatch_ or _do_ the promises, it only waits on them. This is why in the example above we are calling them in the array. If we don't call them we would have to call them later (from another function) since it would pause here and wait for them to complete.
## dispatch a promise and await it later
It is possible to dispatch a promise to run asynchronously, and continue on with your function. Later on in the function you can `await` it and get the results.
This is really useful if your function does a job remotely and you want to do something else while it gets the results:
```javascript
async function buildSearch(cb) {
// run() returns a promise
let searchIndex = run();
// do something...
let searchIndexResult = await searchIndex;
}
```
## Writing to files
You can write a string/json object to a file:
```javascript
async function buildSearch() {
// index is a js object
let searchIndex = JSON.stringify(index);
fs.writeFileSync(currentDir + "/static/search-index.json", searchIndex);
}
```

25
blog/package.json Normal file
View File

@@ -0,0 +1,25 @@
{
"dependencies": {
"gulp": "^4.0.2",
"gulp-clean": "^0.4.0",
"gulp-hash-filename": "^3.0.0",
"gulp-imagemin": "^7.1.0",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0",
"gulp-uglify": "^3.0.2",
"lunr": "^2.3.8",
"parser-front-matter": "^1.6.4",
"readdirp": "^3.4.0",
"webpack": "^4.43.0"
},
"scripts": {
"buildSearch": "gulp buildSearch",
"buildHugo": "gulp buildHugo",
"buildBlog": "gulp buildBlog",
"buildTheme": "gulp buildTheme",
"cleanJS": "gulp cleanJS",
"insertJS": "gulp insertJS",
"lunr": "gulp lunr",
"minifyImages": "gulp minifyImages"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,128 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
My New Hugo Site
</title><meta name="author" content="">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/favicon-32x32.png " sizes="32x32" type="image/png">
<link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0c344b">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/dist/main.37ab3f61b95417873748.min.css">
<link rel="canonical" href="http://example.org/authors/daniel_tomlinson/">
<link href="http://example.org/authors/daniel_tomlinson/index.xml" rel="alternate" type="application/rss+xml" title="My New Hugo Site">
<link href="http://example.org/authors/daniel_tomlinson/index.xml" rel="feed" type="application/rss+xml" title="My New Hugo Site"><meta property="og:title" content="" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://example.org/authors/daniel_tomlinson/" />
<meta property="og:image" content="http://example.org/image.png" />
<meta itemprop="name" content="">
<meta itemprop="description" content=""><meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="http://example.org/image.png"/>
<meta name="twitter:title" content=""/>
<meta name="twitter:description" content=""/>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top shadow-sm" id="navbar-main-menu">
<div class="container">
<a class="navbar-brand font-weight-bold" href="http://example.org/">My New Hugo Site</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-menu" aria-controls="main-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="navbar-nav ml-auto">
</ul>
</div>
</div>
</nav>
<main class="content-page container pt-7 pb-5">
<div class="row">
<div class="col">
<article>
<div class="row justify-content-center">
<div class="col-lg-8"><p class="text-center my-5">
<img data-src="/authors/daniel_tomlinson/image_hu071fd86aa3a581992bcd753d0ac20451_25454_300x0_resize_box_2.png" class="img-thumbnail rounded-circle" alt="Daniel Tomlinson">
</p><h2 class="mb-3">Daniel Tomlinson</h2><div class="content">
<h1 id="introduction">Introduction</h1>
<p>Some text here.</p>
</div>
<div class="articles">
<h3>Articles</h3>
</div>
</div>
</div>
</article>
</div>
</div>
</main>
<footer class="footer text-center bg-dark py-6">
<div class="container">
<div class="row">
<div class="col">
<ul class="list-inline">
</ul>
<p class="text-muted">
Copyright &copy; My New Hugo Site 2020
</p>
<p class="text-muted">
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with <a href="https://github.com/puresyntax71/hugo-theme-chunky-poster" target="_blank">Chunky Poster</a>.
</p>
</div>
</div>
</div>
</footer>
<script src="/dist/main.d608eadfe5ac0688902e.min.js"></script>
</body>
</html>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>My New Hugo Site</title>
<link>http://example.org/authors/daniel_tomlinson/</link>
<description>Recent content on My New Hugo Site</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="http://example.org/authors/daniel_tomlinson/index.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>

View File

@@ -1,122 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
My New Hugo Site
</title><meta name="author" content="">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/favicon-32x32.png " sizes="32x32" type="image/png">
<link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0c344b">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/dist/main.37ab3f61b95417873748.min.css">
<link rel="canonical" href="http://example.org/authors/">
<link href="http://example.org/authors/index.xml" rel="alternate" type="application/rss+xml" title="My New Hugo Site">
<link href="http://example.org/authors/index.xml" rel="feed" type="application/rss+xml" title="My New Hugo Site"><meta property="og:title" content="Authors" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://example.org/authors/" />
<meta itemprop="name" content="Authors">
<meta itemprop="description" content=""><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Authors"/>
<meta name="twitter:description" content=""/>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top shadow-sm" id="navbar-main-menu">
<div class="container">
<a class="navbar-brand font-weight-bold" href="http://example.org/">My New Hugo Site</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-menu" aria-controls="main-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="navbar-nav ml-auto">
</ul>
</div>
</div>
</nav>
<main class="content-page container pt-7 pb-5">
<div class="row">
<div class="col">
<article>
<div class="row justify-content-center">
<div class="col-lg-8"><h2 class="mb-3">Authors</h2><div class="content">
</div>
<div class="articles">
<h3>Articles</h3><ul><li><a href="/authors/daniel_tomlinson/"></a></li></ul>
</div>
</div>
</div>
</article>
</div>
</div>
</main>
<footer class="footer text-center bg-dark py-6">
<div class="container">
<div class="row">
<div class="col">
<ul class="list-inline">
</ul>
<p class="text-muted">
Copyright &copy; My New Hugo Site 2020
</p>
<p class="text-muted">
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with <a href="https://github.com/puresyntax71/hugo-theme-chunky-poster" target="_blank">Chunky Poster</a>.
</p>
</div>
</div>
</div>
</footer>
<script src="/dist/main.d608eadfe5ac0688902e.min.js"></script>
</body>
</html>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Authors on My New Hugo Site</title>
<link>http://example.org/authors/</link>
<description>Recent content in Authors on My New Hugo Site</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="http://example.org/authors/index.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>

View File

@@ -1,110 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
My New Hugo Site
</title><meta name="author" content="">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/favicon-32x32.png " sizes="32x32" type="image/png">
<link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0c344b">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/dist/main.37ab3f61b95417873748.min.css">
<link rel="canonical" href="http://example.org/categories/">
<link href="http://example.org/categories/index.xml" rel="alternate" type="application/rss+xml" title="My New Hugo Site">
<link href="http://example.org/categories/index.xml" rel="feed" type="application/rss+xml" title="My New Hugo Site"><meta property="og:title" content="Categories" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://example.org/categories/" />
<meta itemprop="name" content="Categories">
<meta itemprop="description" content=""><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Categories"/>
<meta name="twitter:description" content=""/>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top shadow-sm" id="navbar-main-menu">
<div class="container">
<a class="navbar-brand font-weight-bold" href="http://example.org/">My New Hugo Site</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-menu" aria-controls="main-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="navbar-nav ml-auto">
</ul>
</div>
</div>
</nav>
<main class="list container py-6"><div class="row py-3">
<div class="col">
<h3 class="display-4">Categories</h3></div>
</div><div class="row row-cols-1 row-cols-lg-3">
</div>
</main>
<footer class="footer text-center bg-dark py-6">
<div class="container">
<div class="row">
<div class="col">
<ul class="list-inline">
</ul>
<p class="text-muted">
Copyright &copy; My New Hugo Site 2020
</p>
<p class="text-muted">
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with <a href="https://github.com/puresyntax71/hugo-theme-chunky-poster" target="_blank">Chunky Poster</a>.
</p>
</div>
</div>
</div>
</footer>
<script src="/dist/main.d608eadfe5ac0688902e.min.js"></script>
</body>
</html>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Categories on My New Hugo Site</title>
<link>http://example.org/categories/</link>
<description>Recent content in Categories on My New Hugo Site</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="http://example.org/categories/index.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,126 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta name="generator" content="Hugo 0.69.2" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
My New Hugo Site
</title><meta name="author" content="">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/favicon-32x32.png " sizes="32x32" type="image/png">
<link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0c344b">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/dist/main.37ab3f61b95417873748.min.css">
<link rel="canonical" href="http://example.org/">
<link href="http://example.org/index.xml" rel="alternate" type="application/rss+xml" title="My New Hugo Site">
<link href="http://example.org/index.xml" rel="feed" type="application/rss+xml" title="My New Hugo Site"><meta property="og:title" content="My New Hugo Site" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://example.org/" />
<meta property="og:updated_time" content="2020-05-04T02:14:50+01:00" />
<meta itemprop="name" content="My New Hugo Site">
<meta itemprop="description" content=""><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="My New Hugo Site"/>
<meta name="twitter:description" content=""/>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top shadow-sm" id="navbar-main-menu">
<div class="container">
<a class="navbar-brand font-weight-bold" href="http://example.org/">My New Hugo Site</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-menu" aria-controls="main-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="navbar-nav ml-auto">
</ul>
</div>
</div>
</nav>
<main class="homepage container py-6">
<div class="hero row">
<div class="col position-relative py-lg-7 py-7"><h1 class="display-4">My New Hugo Site</h1></div>
</div>
<div class="latest row py-lg-5">
<div class="col-lg-6 mb-3"></div>
<div class="col-lg-6 mb-3">
<h5 class="created text-muted text-uppercase font-weight-bold">May 4, 2020</h5>
<h2><a href="/posts/first_post/">First_post</a></h2>
<div class="content">
My first post First post text
</div>
</div>
</div>
<div class="articles row row-cols-1 row-cols-lg-3">
</div>
</main>
<footer class="footer text-center bg-dark py-6">
<div class="container">
<div class="row">
<div class="col">
<ul class="list-inline">
</ul>
<p class="text-muted">
Copyright &copy; My New Hugo Site 2020
</p>
<p class="text-muted">
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with <a href="https://github.com/puresyntax71/hugo-theme-chunky-poster" target="_blank">Chunky Poster</a>.
</p>
</div>
</div>
</div>
</footer>
<script src="/dist/main.d608eadfe5ac0688902e.min.js"></script>
</body>
</html>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>My New Hugo Site</title>
<link>http://example.org/</link>
<description>Recent content on My New Hugo Site</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 04 May 2020 02:14:50 +0100</lastBuildDate>
<atom:link href="http://example.org/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>First_post</title>
<link>http://example.org/posts/first_post/</link>
<pubDate>Mon, 04 May 2020 02:14:50 +0100</pubDate>
<guid>http://example.org/posts/first_post/</guid>
<description>My first post First post text</description>
</item>
</channel>
</rss>

View File

@@ -1,19 +0,0 @@
{
"name":"Chunky Poster",
"short_name":"Chunky Poster",
"icons":[
{
"src":"/android-chrome-192x192.png",
"sizes":"192x192",
"type":"image/png"
},
{
"src":"/android-chrome-512x512.png",
"sizes":"512x512",
"type":"image/png"
}
],
"theme_color":"#0c344b",
"background_color":"#ffffff",
"display":"standalone"
}

View File

@@ -1,128 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
First_post |
My New Hugo Site
</title><meta name="author" content="">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/favicon-32x32.png " sizes="32x32" type="image/png">
<link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0c344b">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/dist/main.37ab3f61b95417873748.min.css">
<link rel="canonical" href="http://example.org/posts/first_post/"><meta property="og:title" content="First_post" />
<meta property="og:description" content="My first post First post text" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://example.org/posts/first_post/" />
<meta property="article:published_time" content="2020-05-04T02:14:50+01:00" />
<meta property="article:modified_time" content="2020-05-04T02:14:50+01:00" />
<meta itemprop="name" content="First_post">
<meta itemprop="description" content="My first post First post text">
<meta itemprop="datePublished" content="2020-05-04T02:14:50&#43;01:00" />
<meta itemprop="dateModified" content="2020-05-04T02:14:50&#43;01:00" />
<meta itemprop="wordCount" content="6">
<meta itemprop="keywords" content="" /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="First_post"/>
<meta name="twitter:description" content="My first post First post text"/>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top shadow-sm" id="navbar-main-menu">
<div class="container">
<a class="navbar-brand font-weight-bold" href="http://example.org/">My New Hugo Site</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-menu" aria-controls="main-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="navbar-nav ml-auto">
</ul>
</div>
</div>
</nav>
<main class="content-page container pt-7 pb-5">
<div class="row">
<div class="col">
<article>
<div class="row justify-content-center">
<div class="col-lg-8">
<h2 class="mb-3">First_post</h2>
<div class="content">
<h2 id="my-first-post">My first post</h2>
<p>First post text</p>
</div>
</div>
</div>
</article>
</div>
</div>
</main>
<footer class="footer text-center bg-dark py-6">
<div class="container">
<div class="row">
<div class="col">
<ul class="list-inline">
</ul>
<p class="text-muted">
Copyright &copy; My New Hugo Site 2020
</p>
<p class="text-muted">
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with <a href="https://github.com/puresyntax71/hugo-theme-chunky-poster" target="_blank">Chunky Poster</a>.
</p>
</div>
</div>
</div>
</footer>
<script src="/dist/main.d608eadfe5ac0688902e.min.js"></script>
</body>
</html>

View File

@@ -1,125 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
My New Hugo Site
</title><meta name="author" content="">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/favicon-32x32.png " sizes="32x32" type="image/png">
<link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0c344b">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/dist/main.37ab3f61b95417873748.min.css">
<link rel="canonical" href="http://example.org/posts/">
<link href="http://example.org/posts/index.xml" rel="alternate" type="application/rss+xml" title="My New Hugo Site">
<link href="http://example.org/posts/index.xml" rel="feed" type="application/rss+xml" title="My New Hugo Site"><meta property="og:title" content="Posts" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://example.org/posts/" />
<meta property="og:updated_time" content="2020-05-04T02:14:50+01:00" />
<meta itemprop="name" content="Posts">
<meta itemprop="description" content=""><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Posts"/>
<meta name="twitter:description" content=""/>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top shadow-sm" id="navbar-main-menu">
<div class="container">
<a class="navbar-brand font-weight-bold" href="http://example.org/">My New Hugo Site</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-menu" aria-controls="main-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="navbar-nav ml-auto">
</ul>
</div>
</div>
</nav>
<main class="list container py-6"><div class="row py-3">
<div class="col">
<h3 class="display-4">Posts</h3></div>
</div><div class="row row-cols-1 row-cols-lg-3">
<div class="col mb-3">
<div class="card h-100">
<a href="/posts/first_post/" class="d-block"><div class="card-body">
<h4 class="card-title">First_post</h4>
<p class="card-text text-muted text-uppercase">May 4, 2020</p>
<div class="card-text">
My first post First post text
</div>
</div>
</a>
</div>
</div>
</div>
</main>
<footer class="footer text-center bg-dark py-6">
<div class="container">
<div class="row">
<div class="col">
<ul class="list-inline">
</ul>
<p class="text-muted">
Copyright &copy; My New Hugo Site 2020
</p>
<p class="text-muted">
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with <a href="https://github.com/puresyntax71/hugo-theme-chunky-poster" target="_blank">Chunky Poster</a>.
</p>
</div>
</div>
</div>
</footer>
<script src="/dist/main.d608eadfe5ac0688902e.min.js"></script>
</body>
</html>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Posts on My New Hugo Site</title>
<link>http://example.org/posts/</link>
<description>Recent content in Posts on My New Hugo Site</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 04 May 2020 02:14:50 +0100</lastBuildDate>
<atom:link href="http://example.org/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>First_post</title>
<link>http://example.org/posts/first_post/</link>
<pubDate>Mon, 04 May 2020 02:14:50 +0100</pubDate>
<guid>http://example.org/posts/first_post/</guid>
<description>My first post First post text</description>
</item>
</channel>
</rss>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://example.org/posts/first_post/</loc>
<lastmod>2020-05-04T02:14:50+01:00</lastmod>
</url>
<url>
<loc>http://example.org/</loc>
<lastmod>2020-05-04T02:14:50+01:00</lastmod>
</url>
<url>
<loc>http://example.org/posts/</loc>
<lastmod>2020-05-04T02:14:50+01:00</lastmod>
</url>
<url>
<loc>http://example.org/authors/daniel_tomlinson/</loc>
</url>
<url>
<loc>http://example.org/authors/</loc>
</url>
<url>
<loc>http://example.org/categories/</loc>
</url>
<url>
<loc>http://example.org/tags/</loc>
</url>
</urlset>

View File

@@ -1,110 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
My New Hugo Site
</title><meta name="author" content="">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/favicon-32x32.png " sizes="32x32" type="image/png">
<link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0c344b">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/dist/main.37ab3f61b95417873748.min.css">
<link rel="canonical" href="http://example.org/tags/">
<link href="http://example.org/tags/index.xml" rel="alternate" type="application/rss+xml" title="My New Hugo Site">
<link href="http://example.org/tags/index.xml" rel="feed" type="application/rss+xml" title="My New Hugo Site"><meta property="og:title" content="Tags" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://example.org/tags/" />
<meta itemprop="name" content="Tags">
<meta itemprop="description" content=""><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Tags"/>
<meta name="twitter:description" content=""/>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top shadow-sm" id="navbar-main-menu">
<div class="container">
<a class="navbar-brand font-weight-bold" href="http://example.org/">My New Hugo Site</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-menu" aria-controls="main-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="navbar-nav ml-auto">
</ul>
</div>
</div>
</nav>
<main class="list container py-6"><div class="row py-3">
<div class="col">
<h3 class="display-4">Tags</h3></div>
</div><div class="row row-cols-1 row-cols-lg-3">
</div>
</main>
<footer class="footer text-center bg-dark py-6">
<div class="container">
<div class="row">
<div class="col">
<ul class="list-inline">
</ul>
<p class="text-muted">
Copyright &copy; My New Hugo Site 2020
</p>
<p class="text-muted">
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with <a href="https://github.com/puresyntax71/hugo-theme-chunky-poster" target="_blank">Chunky Poster</a>.
</p>
</div>
</div>
</div>
</footer>
<script src="/dist/main.d608eadfe5ac0688902e.min.js"></script>
</body>
</html>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tags on My New Hugo Site</title>
<link>http://example.org/tags/</link>
<description>Recent content in Tags on My New Hugo Site</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="http://example.org/tags/index.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

Binary file not shown.

BIN
blog/static/apple-touch-icon.png LFS Normal file

Binary file not shown.

BIN
blog/static/favicon-16x16.png LFS Normal file

Binary file not shown.

BIN
blog/static/favicon-32x32.png LFS Normal file

Binary file not shown.

BIN
blog/static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
blog/static/images/.DS_Store vendored Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
blog/static/images/DUCK_256.png LFS Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 178 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 982 KiB

19
blog/static/manifest.json Normal file
View File

@@ -0,0 +1,19 @@
{
"name": "panaetius.io",
"short_name": "panaetius",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

BIN
blog/themes/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -1,8 +0,0 @@
{
"presets": [
"@babel/preset-env",
],
"plugins": [
"@babel/plugin-transform-runtime",
],
}

View File

@@ -1,2 +0,0 @@
> 1%
last 2 versions

View File

@@ -1,52 +0,0 @@
orbs:
hugo: circleci/hugo@0
node: circleci/node@1.1
version: 2.1
jobs:
test:
executor:
name: node/default
tag: '13.6.0'
steps:
- checkout
- node/with-cache:
steps:
- run: yarn
- run: yarn build
build:
docker:
- image: cibuilds/hugo:latest
working_directory: ~/hugo-theme-chunky-poster
steps:
- checkout
- hugo/hugo-build:
source: exampleSite
extra-flags: '--themesDir ../.. -t "hugo-theme-chunky-poster" --baseURL "https://hugo-theme-chunky-poster.netlify.com"'
- persist_to_workspace:
root: .
paths:
- exampleSite/public
- netlify.toml
deploy:
executor:
name: node/default
tag: '13.1.0'
working_directory: ~/site
steps:
- attach_workspace:
at: ~/site
- run: npm i netlify-cli
- run: ./node_modules/.bin/netlify deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN --prod --message "Deploy via Circle CI."
workflows:
main:
jobs:
- test
- build
- deploy:
filters:
branches:
only: master
requires:
- build

View File

@@ -1,15 +0,0 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
node_modules/
.npm
.yarn-integrity
.sass-cache/
*.css.map
*.sass.map
*.scss.map
# Local Netlify folder
.netlify

View File

@@ -1 +0,0 @@
v13.6.0

View File

@@ -1,20 +0,0 @@
The MIT License (MIT)
Copyright (c) 2019 YOUR_NAME_HERE
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,133 +0,0 @@
# Chunky poster
[![CircleCI](https://img.shields.io/circleci/build/github/puresyntax71/hugo-theme-chunky-poster)](https://circleci.com/gh/puresyntax71/hugo-theme-chunky-poster/tree/master)
A simple, bootstrap 4 based blog theme. The structure and design is based on the [Prisma blog](https://www.prisma.io/blog/).
[Demo](https://hugo-theme-chunky-poster.netlify.com) | [Demo 2](https://themes.gohugo.io/theme/hugo-theme-chunky-poster)
# Screenshot
![Chunky poster](https://github.com/puresyntax71/hugo-theme-chunky-poster/raw/master/images/screenshot-responsive.png)
# Features
* Multi-author
* Image processing
* Basic i18n
* Prism
* LazyLoad
* Commento
* Image gallery
# Usage
```shell
git clone https://github.com/puresyntax71/hugo-theme-chunky-poster.git
```
Check out the configuration at [`exampleSite/config.toml`](exampleSite/config.toml) for configuring your Hugo site.
## Authors
The authors structure is based on this [blog post](https://www.netlify.com/blog/2018/07/24/hugo-tips-how-to-create-author-pages/).
1. Add the taxonomy ["author"](exampleSite/config.toml#L28).
2. `hugo new authors/john-doe/_index.md`
3. Configure the author metadata `twitter`.
4. Configure the author metadata `images`. First image on the list will be used as the avatar and on the profile page. Images are page resources under the author e.g. `content/authors/john-doe/image.png`.
5. Assign the author to a content:
```yaml
---
authors: ["John Doe"]
---
```
## Content images
The images structure is based on this [blog post](https://forestry.io/blog/how-to-use-hugo-s-image-processing-with-forestry/).
Upload the images that will be used on content pages under `content/images` and create the file `content/images/index.md` with the front matter:
```yaml
---
headless: true
---
```
Set the path to the image in a `post` content under the `images` property:
```yaml
---
images: ["/images/image.png"]
---
```
The first image on the list will be used as the "cover" image on a post.
## Prism
Configure [Prism](https://prismjs.com/) under `[params.prismJS]` and set `enable` to `true`. Change the theme under `theme`.
```toml
[params]
[params.prismJS]
enable = true
theme = "okaidia"
```
## Commento
Configure [Commento](https://commento.io/) under `[params.commento]`. Set `enable` to `true` and add the URL at `url`:
```toml
[params]
[params.commento]
enable = true
url = "https://somename.commento.io"
```
## Share
Enable sharing under `params` with `share` set to `true` and disable per-post sharing by setting `share` to `false` in the front matter.
```toml
[params]
share = true
```
```yaml
---
share: false
---
```
## Image gallery
The image gallery feature uses the [`ekko-lightbox`](https://github.com/ashleydw/lightbox/) and `figure` shortcode. This is just a simple implementation of the lightbox gallery feature from the library.
# Customization
Fork the project and run `yarn watch` during development.
> The project has an `.nvmrc` if you wish to use [`nvm`](https://github.com/nvm-sh/nvm).
The application javascript file is located at `src/js/app.js`.
For customizing SCSS, the main entrypoint is at `src/scss/style.scss`. Bootstrap variables can be overridden in the `_variables.scss` file. The theme's styles are located at `src/scss/chunky-poster.scss`.
For production, you can run `yarn build` for the assets to be updated.
# Credits
* [Victor Hugo](https://github.com/netlify-templates/victor-hugo)
* [hugo-theme-even](https://github.com/olOwOlo/hugo-theme-even)
* [Blank](https://github.com/vimux/blank/)
* [CleanWhite](https://github.com/zhaohuabing/hugo-theme-cleanwhite)
Images from [Unsplash](https://unsplash.com/) and [Freepik](https://www.freepik.com/).
# License
This theme is released under the [MIT license](LICENSE).

View File

@@ -1,5 +0,0 @@
---
name: "{{ replace .Name "-" " " | title }}"
images: []
twitter: ""
---

View File

@@ -1,4 +0,0 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
---

View File

@@ -1,8 +0,0 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
images: []
categories: []
tags: []
authors: []
---

View File

@@ -1,6 +0,0 @@
{
"main": {
"css": "main.37ab3f61b95417873748.min.css",
"js": "main.d608eadfe5ac0688902e.min.js"
}
}

View File

@@ -1,27 +0,0 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
/public
/themes
.DS_Store

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2014 Steve Francia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,22 +0,0 @@
# hugoBasicExample
This repository offers an example site for [Hugo](https://gohugo.io/) and also it provides the default content for demos hosted on the [Hugo Themes Showcase](https://themes.gohugo.io/).
# Using
1. [Install Hugo](https://gohugo.io/overview/installing/)
2. Clone this repository
```bash
git clone https://github.com/gohugoio/hugoBasicExample.git
cd hugoBasicExample
```
3. Clone the repository you want to test. If you want to test all Hugo Themes then follow the instructions provided [here](https://github.com/gohugoio/hugoThemes#installing-all-themes)
4. Run Hugo and select the theme of your choosing
```bash
hugo server -t YOURTHEME
```
5. Under `/content/` this repository contains the following:
- A section called `/post/` with sample markdown content
- A headless bundle called `homepage` that you may want to use for single page applications. You can find instructions about headless bundles over [here](https://gohugo.io/content-management/page-bundles/#headless-bundle)
- An `about.md` that is intended to provide the `/about/` page for a theme demo
6. If you intend to build a theme that does not fit in the content structure provided in this repository, then you are still more than welcome to submit it for review at the [Hugo Themes](https://github.com/gohugoio/hugoThemes/issues) respository

View File

@@ -1,76 +0,0 @@
baseURL = "https://example.com"
title = "Hugo Themes"
copyright = "Copyright © 20082019, Steve Francia and the Hugo Authors; all rights reserved."
paginate = 2
languageCode = "en"
DefaultContentLanguage = "en"
enableInlineShortcodes = true
footnoteReturnLinkContents = "^"
googleAnalytics = "UA-XXXX"
DisqusShortname = ""
theme = "hugo-theme-chunky-poster"
[menu]
[[menu.main]]
identifier = "home"
name = "Home"
url = "/"
weight = 10
[[menu.main]]
identifier = "about"
name = "About"
url = "/about/"
weight = 0
[taxonomies]
category = "categories"
tag = "tags"
series = "series"
author = "authors"
[params]
author = "Hugo Authors"
description = "Lorem ipsum dolor sit amet."
homepageImage = "/images/homepage-image.jpg"
share = true
showLanguageSwitcher = false
# Custom CSS and JS. Relative to /static/css and /static/js respectively.
customCSS = []
customJS = []
[params.social]
rss = true
email = "example@example.com"
facebook = "https://facebook.com"
twitter = "https://twitter.com"
linkedin = "https://linkedin.com"
stack-overflow = "https://stackoverflow.com"
instagram = "https://stackoverflow.com"
github = "https://github.com"
weibo = "https://www.weibo.com"
medium = "https://medium.com"
pinterest = "https://pinterest.com"
reddit = "https://reddit.com"
gitlab = "https://gitlab.com"
mastodon = "https://mastodon.social"
keybase = "https://keybase.io/"
[params.prismJS]
enable = true
theme = ""
[params.commento]
enable = true
url = "https://commento.io"
[markup]
[markup.highlight]
codeFences = false
[services]
[services.instagram]
disableInlineCSS = true
[services.twitter]
disableInlineCSS = true

View File

@@ -1,28 +0,0 @@
timeout = 30000
enableInlineShortcodes = true
footnoteReturnLinkContents = "^"
[taxonomies]
category = "categories"
tag = "tags"
series = "series"
[privacy]
[privacy.vimeo]
disabled = false
simple = true
[privacy.twitter]
disabled = false
enableDNT = true
simple = true
disableInlineCSS = true
[privacy.instagram]
disabled = false
simple = true
[privacy.youtube]
disabled = false
privacyEnhanced = true

View File

@@ -1,4 +0,0 @@
+++
author = "Hugo Authors"
+++

View File

@@ -1,28 +0,0 @@
+++
title = "About"
description = "Hugo, the worlds fastest framework for building websites"
date = "2019-02-28"
aliases = ["about-us","about-hugo","contact"]
author = "Hugo Authors"
+++
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
Hugo makes use of a variety of open source projects including:
* https://github.com/russross/blackfriday
* https://github.com/alecthomas/chroma
* https://github.com/muesli/smartcrop
* https://github.com/spf13/cobra
* https://github.com/spf13/viper
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
Learn more and contribute on [GitHub](https://github.com/gohugoio).

View File

@@ -1,11 +0,0 @@
---
name: Hugo Authors
images: ["hugo-authors.png"]
twitter: 'hugo_authors'
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam odio justo, interdum eu ex sit amet, rhoncus interdum magna. Nullam at magna tempor, suscipit ipsum ac, egestas tellus. Maecenas non orci ut velit consectetur feugiat. Proin dignissim ullamcorper eros, at commodo orci eleifend at. Donec luctus diam et interdum finibus. Nullam vel elit hendrerit, aliquet massa eget, vestibulum arcu. Etiam fermentum, sem in interdum scelerisque, massa risus rhoncus turpis, quis efficitur nibh dolor vel dolor. Integer aliquet semper urna, nec malesuada libero mollis dictum. Donec sit amet dui vulputate, porta orci eget, ullamcorper mi. Aliquam erat volutpat. Vivamus sodales lobortis molestie. Donec in elementum tortor. Nullam quis ante risus. Pellentesque ac nisl et tellus suscipit auctor.
Pellentesque accumsan nisi et feugiat sodales. Fusce maximus vehicula est, ut rutrum sem. Suspendisse placerat odio sit amet malesuada finibus. Integer feugiat leo nec volutpat placerat. Fusce cursus libero eu urna congue, nec condimentum libero tincidunt. Etiam et mi ac diam dignissim pretium. Donec eget fermentum leo. Nunc maximus facilisis risus at venenatis. Aenean tincidunt semper nibh, ut semper ipsum finibus in.
Mauris posuere sem arcu, vel sollicitudin dui finibus eu. Cras ut ante in orci dignissim luctus auctor ac purus. Quisque quis aliquam justo, id maximus lorem. Suspendisse ac commodo quam. Aliquam ultricies eleifend feugiat. Aenean rhoncus suscipit lectus dapibus rutrum. Etiam at ultricies tellus. Aliquam erat volutpat. Morbi a arcu ullamcorper turpis sodales commodo at sit amet orci. Morbi eros odio, posuere quis tortor sit amet, finibus dapibus urna. Curabitur ac ullamcorper leo. Suspendisse vel faucibus nunc. Ut congue vitae nisl at congue.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,11 +0,0 @@
---
name: Jane Smith
images: ["jane-smith.jpg"]
twitter: 'jane_smith'
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam odio justo, interdum eu ex sit amet, rhoncus interdum magna. Nullam at magna tempor, suscipit ipsum ac, egestas tellus. Maecenas non orci ut velit consectetur feugiat. Proin dignissim ullamcorper eros, at commodo orci eleifend at. Donec luctus diam et interdum finibus. Nullam vel elit hendrerit, aliquet massa eget, vestibulum arcu. Etiam fermentum, sem in interdum scelerisque, massa risus rhoncus turpis, quis efficitur nibh dolor vel dolor. Integer aliquet semper urna, nec malesuada libero mollis dictum. Donec sit amet dui vulputate, porta orci eget, ullamcorper mi. Aliquam erat volutpat. Vivamus sodales lobortis molestie. Donec in elementum tortor. Nullam quis ante risus. Pellentesque ac nisl et tellus suscipit auctor.
Pellentesque accumsan nisi et feugiat sodales. Fusce maximus vehicula est, ut rutrum sem. Suspendisse placerat odio sit amet malesuada finibus. Integer feugiat leo nec volutpat placerat. Fusce cursus libero eu urna congue, nec condimentum libero tincidunt. Etiam et mi ac diam dignissim pretium. Donec eget fermentum leo. Nunc maximus facilisis risus at venenatis. Aenean tincidunt semper nibh, ut semper ipsum finibus in.
Mauris posuere sem arcu, vel sollicitudin dui finibus eu. Cras ut ante in orci dignissim luctus auctor ac purus. Quisque quis aliquam justo, id maximus lorem. Suspendisse ac commodo quam. Aliquam ultricies eleifend feugiat. Aenean rhoncus suscipit lectus dapibus rutrum. Etiam at ultricies tellus. Aliquam erat volutpat. Morbi a arcu ullamcorper turpis sodales commodo at sit amet orci. Morbi eros odio, posuere quis tortor sit amet, finibus dapibus urna. Curabitur ac ullamcorper leo. Suspendisse vel faucibus nunc. Ut congue vitae nisl at congue.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,11 +0,0 @@
---
name: John Doe
images: ["john-doe.jpg"]
twitter: 'john_doe'
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam odio justo, interdum eu ex sit amet, rhoncus interdum magna. Nullam at magna tempor, suscipit ipsum ac, egestas tellus. Maecenas non orci ut velit consectetur feugiat. Proin dignissim ullamcorper eros, at commodo orci eleifend at. Donec luctus diam et interdum finibus. Nullam vel elit hendrerit, aliquet massa eget, vestibulum arcu. Etiam fermentum, sem in interdum scelerisque, massa risus rhoncus turpis, quis efficitur nibh dolor vel dolor. Integer aliquet semper urna, nec malesuada libero mollis dictum. Donec sit amet dui vulputate, porta orci eget, ullamcorper mi. Aliquam erat volutpat. Vivamus sodales lobortis molestie. Donec in elementum tortor. Nullam quis ante risus. Pellentesque ac nisl et tellus suscipit auctor.
Pellentesque accumsan nisi et feugiat sodales. Fusce maximus vehicula est, ut rutrum sem. Suspendisse placerat odio sit amet malesuada finibus. Integer feugiat leo nec volutpat placerat. Fusce cursus libero eu urna congue, nec condimentum libero tincidunt. Etiam et mi ac diam dignissim pretium. Donec eget fermentum leo. Nunc maximus facilisis risus at venenatis. Aenean tincidunt semper nibh, ut semper ipsum finibus in.
Mauris posuere sem arcu, vel sollicitudin dui finibus eu. Cras ut ante in orci dignissim luctus auctor ac purus. Quisque quis aliquam justo, id maximus lorem. Suspendisse ac commodo quam. Aliquam ultricies eleifend feugiat. Aenean rhoncus suscipit lectus dapibus rutrum. Etiam at ultricies tellus. Aliquam erat volutpat. Morbi a arcu ullamcorper turpis sodales commodo at sit amet orci. Morbi eros odio, posuere quis tortor sit amet, finibus dapibus urna. Curabitur ac ullamcorper leo. Suspendisse vel faucibus nunc. Ut congue vitae nisl at congue.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -1,3 +0,0 @@
---
headless : true
---

View File

@@ -1,7 +0,0 @@
---
title: 'We Help Business Grow'
button: 'Our Work'
weight: 1
---
Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Numquam dolores mel eu, mea docendi omittantur et, mea ea duis erat. Elit melius cu ius. Per ex novum tantas putant, ei his nullam aliquam apeirian. Aeterno quaestio constituto sea an, no eum intellegat assueverit.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Some files were not shown because too many files have changed in this diff Show More