Setup Forestry

This commit is contained in:
Frank Taillandier
2020-01-24 14:08:06 +01:00
parent 31847c9086
commit 68e22540ae
6 changed files with 125 additions and 9 deletions
+25
View File
@@ -0,0 +1,25 @@
---
label: Post
hide_body: false
fields:
- type: text
name: title
label: title
- type: text
name: description
label: description
- type: datetime
name: date
label: date
default: now
- type: text
name: author
label: author
default: Hugo Authors
- name: tags
type: tag_list
default: []
label: tags
- type: file
name: feature_image
label: feature_image
+47
View File
@@ -0,0 +1,47 @@
---
new_page_extension: md
auto_deploy: false
admin_path: ''
webhook_url:
sections:
- type: heading
label: Content
- type: directory
path: content/post
label: Post
create: documents
match: "**/*"
templates:
- post
- type: directory
path: content
label: Pages
create: all
match: "*"
- type: directory
path: content/homepage
label: Homepage
create: all
match: "**/*"
- type: heading
label: Docs
- type: document
path: README.md
label: README
read_only: true
upload_dir: static/images
public_path: "/images"
front_matter_path: ''
use_front_matter_path: false
file_template: ":filename:"
build:
preview_env:
- HUGO_ENV=staging
- HUGO_VERSION=0.63.1
preview_output_directory: public
preview_docker_image: forestryio/hugo:latest
mount_path: "/srv"
working_dir: "/srv"
instant_preview_command: hugo server -D -E -F --port 8080 --bind 0.0.0.0 --renderToDisk
-d public
version: 0.59.1
+3
View File
@@ -1,3 +1,6 @@
# Generated files by hugo
/public/
/resources/_gen/assets/scss/
# macOS
.DS_Store
+44 -1
View File
@@ -1 +1,44 @@
# casper3-hugo-starter
# Casper 3 Hugo Starter for Forestry
[Hugo port of the Casper 3 theme](https://github.com/jonathanjanssens/hugo-casper3) originally by Ghost.
<a href="https://app.forestry.io/quick-start?repo=forestryio/casper3-hugo-starter&engine=hugo&version=0.63.1"><img alt="Import this project into Forestry" src="https://assets.forestry.io/import-to-forestryK.svg" />
</a>
## Prerequisites
- Hugo > 0.54.0
## Content Management
![Forestry user interface](static/images/hugo-casper3-forestry.jpg)
This project has been pre-configured to work with [Forestry](https://forestry.io), just import your repository ✨. \
Any changes you make will be commited back to the repo, and deployed if you're using Netlify.
## Deployment and hosting with Netlify
Import your site in [Netlify](https://netlify.com)
1. Create a new site in Netlify and import your repository.
2. Set the build command to: `hugo --gc --minify`
3. Set the publish directory to: `public`
4. Make sure to set `HUGO_VERSION` to 0.54.0 or above (tested with 0.63.1)
3. Set the publish directory to: `public`
That's it, now your site gets deployed automatically on `git push` or when saving documents from Forestry.
## Development
```bash
# clone the repository
git clone git@github.com:forestryio/casper3-hugo-starter.git
# cd in the project directory
cd casper3-hugo-starter
# Start local dev server
hugo server
```
For more information, see [official Hugo documentation](https://gohugo.io/getting-started/).
+6 -8
View File
@@ -1,17 +1,15 @@
+++
author = "Hugo Authors"
title = "Rich Content"
date = "2019-03-10"
date = 2019-03-10T00:00:00Z
description = "A brief description of Hugo Shortcodes"
tags = [
"shortcodes",
"privacy",
]
feature_image = "/images/kelly-sikkema-8RWZ93hLktI-unsplash.jpg"
+++
tags = ["shortcodes", "privacy"]
title = "Rich Content"
+++
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-->
---
## Instagram Simple Shortcode
@@ -40,4 +38,4 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme
## Vimeo Simple Shortcode
{{< vimeo_simple 48912912 >}}
{{< vimeo_simple 48912912 >}}
Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB