diff --git a/.forestry/front_matter/templates/post.yml b/.forestry/front_matter/templates/post.yml new file mode 100644 index 0000000..738be4e --- /dev/null +++ b/.forestry/front_matter/templates/post.yml @@ -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 diff --git a/.forestry/settings.yml b/.forestry/settings.yml new file mode 100644 index 0000000..de6de99 --- /dev/null +++ b/.forestry/settings.yml @@ -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 diff --git a/.gitignore b/.gitignore index a64f71f..d752ce5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ # Generated files by hugo /public/ /resources/_gen/assets/scss/ + +# macOS +.DS_Store diff --git a/README.md b/README.md index fe40086..3600510 100644 --- a/README.md +++ b/README.md @@ -1 +1,44 @@ -# casper3-hugo-starter \ No newline at end of file +# Casper 3 Hugo Starter for Forestry + +[Hugo port of the Casper 3 theme](https://github.com/jonathanjanssens/hugo-casper3) originally by Ghost. + +Import this project into Forestry + + +## 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/). diff --git a/content/post/rich-content.md b/content/post/rich-content.md index e2b3b2b..28bf8f8 100644 --- a/content/post/rich-content.md +++ b/content/post/rich-content.md @@ -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. + --- ## 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 >}} \ No newline at end of file diff --git a/static/images/hugo-casper3-forestry.jpg b/static/images/hugo-casper3-forestry.jpg new file mode 100644 index 0000000..336e1ca Binary files /dev/null and b/static/images/hugo-casper3-forestry.jpg differ