Skip to content

Commit

Permalink
Add Forestry.io configuration (#10925)
Browse files Browse the repository at this point in the history
<!--
  Have any questions? Check out the contributing docs at https://gatsby.app/contribute, or
  ask in this Pull Request and a Gatsby maintainer will be happy to help :)
-->

## Description

<!-- Write a brief description of the changes introduced by this PR -->
This adds front matter template configuration files and other configuration required for Forestry.io.
  • Loading branch information
jpatters authored and calcsam committed Jan 8, 2019
1 parent 4546330 commit 1b1f979
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .forestry/front_matter/templates/blog.yml
@@ -0,0 +1,35 @@
---
label: blog
hide_body: false
is_partial: false
fields:
- name: title
label: Title
type: text
hidden: false
default: ''
- name: date
label: Date
type: datetime
hidden: false
default: ''
- name: author
label: Author
type: text
hidden: false
default: ''
- name: tags
label: Tags
type: tag_list
hidden: false
default: ''
- name: image
label: Image
type: file
hidden: false
default: ''
- name: showImageInArticle
label: 'Show Image? '
type: boolean
hidden: false
default: ''
8 changes: 8 additions & 0 deletions .forestry/front_matter/templates/docs.yml
@@ -0,0 +1,8 @@
---
label: Docs
hide_body: false
is_partial: false
fields:
- type: text
name: title
label: Title
42 changes: 42 additions & 0 deletions .forestry/settings.yml
@@ -0,0 +1,42 @@
---
new_page_extension: md
auto_deploy: false
admin_path:
webhook_url:
sections:
- type: heading
label: Content
- type: directory
path: docs/blog
label: Blog Posts
create: all
match: "**/*.md"
templates:
- blog
- type: directory
path: docs/docs
label: Docs
create: all
match: "**/*.md"
templates:
- making-a-site-with-user-authentication
- type: document
path: docs/blog/author.yaml
label: Authors
- type: document
path: docs/sites.yml
label: Featured Sites
- type: document
path: docs/starters.yml
label: Starters
upload_dir: www/src/uploads
public_path: "/src/uploads"
front_matter_path: ''
use_front_matter_path: false
file_template: ":filename:"
custom_preview: true
build:
preview_command: npm run forestry:preview
preview_env:
- BUILD_DIR=www/
output_directory: www/public
4 changes: 3 additions & 1 deletion www/package.json
Expand Up @@ -39,6 +39,7 @@
"gatsby-remark-copy-linked-files": "^2.0.5",
"gatsby-remark-graphviz": "^1.0.0",
"gatsby-remark-images": "^2.0.1",
"gatsby-remark-normalize-paths": "^1.0.0",
"gatsby-remark-prismjs": "^3.0.2",
"gatsby-remark-responsive-iframe": "^2.0.5",
"gatsby-remark-smartypants": "^2.0.5",
Expand Down Expand Up @@ -96,7 +97,8 @@
"serve": "gatsby serve",
"test": "echo \"Error: no test specified\" && exit 1",
"scrapeStarters": "cd src/data/StarterShowcase && node scraper.js",
"stylelint": "stylelint './src/**/*.js'"
"stylelint": "stylelint './src/**/*.js'",
"forestry:preview": "gatsby develop -p 8080 -H 0.0.0.0"
},
"devDependencies": {
"front-matter": "^2.3.0",
Expand Down

0 comments on commit 1b1f979

Please sign in to comment.