Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wowchemy/starter-academic.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorGeorge Cushen <gcushen@users.noreply.github.com>2020-02-08 23:03:06 +0300
committerGeorge Cushen <gcushen@users.noreply.github.com>2020-02-08 23:03:06 +0300
commitecc423e9de2114387978017eb8f42f2fe0f44036 (patch)
treed0beb290121154ffd6937e01324c674916c435a9 /static
parent8c93100c1326887f52c996200dd7849a3c3b731c (diff)
feat: add support for editing pages in Netlify CMS
Adds support for writing blog posts and editing privacy policy and terms pages. To use, - You must already be using Netlify to deploy your site - Login to Netlify and setup your editors under the Identity section - Head over to YOUR_URL/admin/ See https://github.com/gcushen/hugo-academic/issues/1191
Diffstat (limited to 'static')
-rw-r--r--static/admin/config.yml89
-rw-r--r--static/admin/index.html13
2 files changed, 102 insertions, 0 deletions
diff --git a/static/admin/config.yml b/static/admin/config.yml
new file mode 100644
index 00000000..6c2951dc
--- /dev/null
+++ b/static/admin/config.yml
@@ -0,0 +1,89 @@
+backend:
+ name: git-gateway
+ branch: master
+media_folder: 'static/img/'
+public_folder: 'img'
+collections:
+ - name: posts
+ label: Posts
+ label_singular: Post
+ folder: 'content/post'
+ path: '{{slug}}/index'
+ create: true # Allow users to create new documents in this collection
+ fields: # The fields each document in this collection have
+ - {label: "Title", name: "title", widget: "string"}
+ - {label: "Publish Date", name: "date", widget: "datetime"}
+ - {label: "Subtitle", name: "subtitle", widget: "string"}
+ - {label: "Summary", name: "summary", widget: "markdown"}
+ - label: "Draft"
+ name: "draft"
+ required: false
+ widget: "boolean"
+ default: false
+ - label: "Featured"
+ name: "featured"
+ required: false
+ widget: "boolean"
+ default: false
+ - label: "Authors"
+ name: "authors"
+ required: false
+ widget: "list"
+ - label: "Tags"
+ name: "tags"
+ required: false
+ widget: "list"
+ - label: "Categories"
+ name: "categories"
+ required: false
+ widget: "list"
+ - label: "Projects"
+ name: "projects"
+ required: false
+ widget: "list"
+ - label: "Featured Image"
+ name: "featured"
+ widget: object
+ fields:
+ - label: "Upload an image named `featured.jpg/png`"
+ name: "filename"
+ widget: "image"
+ default: "featured"
+ media_library:
+ config:
+ multiple: false
+ - {label: Caption, name: caption, widget: string, required: false}
+ - {label: "Where's the focal point in the image? Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.", name: focal_point, widget: string, required: false, default: "Smart"}
+ - {label: Thumbnail Only?, name: preview_only, widget: boolean, required: false, default: false}
+ - {label: "Body", name: "body", widget: "markdown"}
+ - name: "pages"
+ label: "Pages"
+ files:
+ - file: "content/privacy.md"
+ label: "Privacy Policy"
+ name: "privacy"
+ fields:
+ - {label: "Title", name: "title", widget: "string"}
+ - {label: "Publish Date", name: "date", widget: "datetime"}
+ - {label: "Subtitle", name: "subtitle", widget: "string"}
+ - {label: "Summary", name: "summary", widget: "markdown"}
+ - label: "Draft"
+ name: "draft"
+ required: false
+ widget: "boolean"
+ default: false
+ - {label: "Body", name: "body", widget: "markdown"}
+ - file: "content/terms.md"
+ label: "Terms"
+ name: "terms"
+ fields:
+ - {label: "Title", name: "title", widget: "string"}
+ - {label: "Publish Date", name: "date", widget: "datetime"}
+ - {label: "Subtitle", name: "subtitle", widget: "string"}
+ - {label: "Summary", name: "summary", widget: "markdown"}
+ - label: "Draft"
+ name: "draft"
+ required: false
+ widget: "boolean"
+ default: false
+ - {label: "Body", name: "body", widget: "markdown"}
diff --git a/static/admin/index.html b/static/admin/index.html
new file mode 100644
index 00000000..d6a98e29
--- /dev/null
+++ b/static/admin/index.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en-us">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Content Manager | Academic</title>
+ <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
+</head>
+<body>
+<!-- Include the script that builds the page and powers Netlify CMS -->
+<script src="https://cdn.jsdelivr.net/npm/netlify-cms@2/dist/netlify-cms.min.js"></script>
+</body>
+</html>