-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from pine64/contribution
CMS, reading stats
- Loading branch information
Showing
10 changed files
with
227 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
site_url: https://pine64.org | ||
publish_mode: editorial_workflow | ||
|
||
backend: | ||
name: github | ||
repo: pine64/website | ||
branch: main | ||
site_domain: pine64.org | ||
|
||
media_folder: "static/images/uploads" # Adjust based on your media storage location | ||
public_folder: "/images/uploads" # URL path for accessing media | ||
logo_url: "https://pine64.org/img/logo.png" | ||
|
||
collections: | ||
- name: "blog" # This is the name used in the URL | ||
label: "Blog" # This is the singular name of the content type for the UI | ||
label_singular: "Blog post" | ||
folder: "content/blog" # The folder where your posts markdown files will be saved | ||
create: true # Allows users to create new documents in this collection | ||
slug: "{{slug}}" # Filename template for new posts | ||
preview_path: "{{year}}/{{month}}/{{day}}/{{slug}}/" | ||
preview: false | ||
fields: # List of fields for the front matter | ||
- { label: "Title", name: "title", widget: "string" } | ||
- { label: "Description", name: "description", widget: "text" } | ||
- { label: "Date", name: "date", widget: "datetime" } | ||
- { label: "Image", name: "images", widget: "image", required: false } | ||
#- { label: "Hidden", name: "hidden", widget: "boolean", default: false } | ||
#- { label: "Comments", name: "comments", widget: "boolean", default: true } | ||
- { label: "Draft", name: "draft", widget: "boolean", default: false } | ||
#- { label: "Weight", name: "weight", widget: "number" } | ||
- { label: "Body", name: "body", widget: "markdown" } | ||
- name: authors | ||
label: Authors | ||
label_singular: 'Author' | ||
widget: list | ||
fields: | ||
- { label: 'Name', name: 'name', widget: 'string', hint: 'First and Last' } | ||
- { label: 'Description', name: 'description', widget: 'markdown' } | ||
|
||
- name: "community" # This is the name used in the URL | ||
label: "Community" # This is the singular name of the content type for the UI | ||
label_singular: "Community" | ||
folder: "content/community" # The folder where your posts markdown files will be saved | ||
create: true # Allows users to create new documents in this collection | ||
slug: "{{slug}}" # Filename template for new posts | ||
preview: false | ||
fields: # List of fields for the front matter | ||
- { label: "Title", name: "title", widget: "string" } | ||
- { label: "Description", name: "description", widget: "text" } | ||
- { label: "Date", name: "date", widget: "datetime" } | ||
- { label: "Image", name: "images", widget: "image", required: false } | ||
- { label: "Draft", name: "draft", widget: "boolean", default: false } | ||
- { label: "Body", name: "body", widget: "markdown" } | ||
|
||
- name: "contests" # This is the name used in the URL | ||
label: "Contests" # This is the singular name of the content type for the UI | ||
label_singular: "Contest" | ||
folder: "content/contests" # The folder where your posts markdown files will be saved | ||
create: true # Allows users to create new documents in this collection | ||
slug: "{{slug}}" # Filename template for new posts | ||
preview: false | ||
fields: # List of fields for the front matter | ||
- { label: "Title", name: "title", widget: "string" } | ||
- { label: "Description", name: "description", widget: "text" } | ||
- { label: "Date", name: "date", widget: "datetime" } | ||
- { label: "Image", name: "images", widget: "image", required: false } | ||
- { label: "Draft", name: "draft", widget: "boolean", default: false } | ||
- { label: "Body", name: "body", widget: "markdown" } | ||
|
||
- name: "devices" # This is the name used in the URL | ||
label: "Devices" # This is the singular name of the content type for the UI | ||
label_singular: "Device" | ||
folder: "content/devices" # The folder where your posts markdown files will be saved | ||
create: true # Allows users to create new documents in this collection | ||
slug: "{{slug}}" # Filename template for new posts | ||
preview: false | ||
fields: # List of fields for the front matter | ||
- { label: "Title", name: "title", widget: "string" } | ||
- { label: "Description", name: "description", widget: "text" } | ||
- { label: "Date", name: "date", widget: "datetime" } | ||
- { label: "Image", name: "images", widget: "image", required: false } | ||
- { label: "Draft", name: "draft", widget: "boolean", default: false } | ||
- { label: "Body", name: "body", widget: "markdown" } | ||
|
||
# - name: "documentation" # This is the name used in the URL | ||
# label: "Documentation" # This is the singular name of the content type for the UI | ||
# label_singular: "Documentation" | ||
# folder: "content/documentation/Clusterboard" # The folder where your posts markdown files will be saved | ||
# create: true # Allows users to create new documents in this collection | ||
# slug: "{{slug}}" # Filename template for new posts | ||
# preview: false | ||
# nested: | ||
# depth: 4 # max depth to show in the collection tree | ||
# summary: '{{dirname}}' # optional summary for a tree node, defaults to the inferred title field | ||
# fields: # List of fields for the front matter | ||
# - label: Title | ||
# name: title | ||
# widget: string | ||
# - label: Body | ||
# name: body | ||
# widget: markdown | ||
# meta: { path: { widget: string, label: 'Path', index_file: '_index' } } | ||
|
||
- name: "podcast" # This is the name used in the URL | ||
label: "Podcast" # This is the singular name of the content type for the UI | ||
label_singular: "Podcast" | ||
folder: "content/podcast" # The folder where your posts markdown files will be saved | ||
create: true # Allows users to create new documents in this collection | ||
slug: "{{slug}}" # Filename template for new posts | ||
preview: false | ||
fields: # List of fields for the front matter | ||
- { label: "Title", name: "title", widget: "string" } | ||
- { label: "Description", name: "description", widget: "text" } | ||
- { label: "Date", name: "date", widget: "datetime" } | ||
- { label: "Image", name: "images", widget: "image", required: false } | ||
- { label: "Draft", name: "draft", widget: "boolean", default: false } | ||
- { label: "Body", name: "body", widget: "markdown" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta name="robots" content="noindex" /> | ||
<title>PINE64 CMS</title> | ||
</head> | ||
<body> | ||
<!-- Include the script that builds the page and powers Decap CMS --> | ||
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script> | ||
<!--<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>--> | ||
<!-- Decap CMS custom widget (Hugo shortcodes) from https://decapcms.org/docs/hugo/#using-decap-cms-content-in-hugo --> | ||
<script> | ||
// credits | ||
CMS.registerEditorComponent({ | ||
id: "credits", | ||
label: "Credits", | ||
fields: [{ | ||
name: "authors", | ||
label: "Author(s)", | ||
widget: "string" | ||
} | ||
], | ||
pattern: /^{{< credits "(.*?)" >}}/, | ||
fromBlock: function(match) { | ||
return { | ||
authors: match[1] | ||
}; | ||
}, | ||
toBlock: function(obj) { | ||
return `{{< credits ${obj.authors} >}}`; | ||
}, | ||
toPreview: function(obj) { | ||
return '<i>obj.authors</i>'; | ||
}, | ||
}); | ||
// toc | ||
CMS.registerEditorComponent({ | ||
id: "toc", | ||
label: "Table of Contents", | ||
pattern: /^{{< toc >}}/, | ||
fromBlock: function(match) { | ||
return { | ||
authors: match | ||
}; | ||
}, | ||
toBlock: function(obj) { | ||
return `{{< toc >}}`; | ||
}, | ||
toPreview: function(obj) { | ||
return '<b>TABLE OF CONTENTS WILL BE HERE</b>'; | ||
}, | ||
}); | ||
// gist | ||
CMS.registerEditorComponent({ | ||
id: "gist", | ||
label: "Gist", | ||
fields: [{ | ||
name: "username", | ||
label: "GitHub Username", | ||
widget: "string" | ||
}, | ||
{ | ||
name: "gid", | ||
label: "Gist ID", | ||
widget: "string" | ||
}, | ||
], | ||
pattern: /^{{< gist ([a-zA-Z0-9]+) ([a-zA-Z0-9]+) >}}/, | ||
fromBlock: function(match) { | ||
return { | ||
username: match[1], | ||
gid: match[2], | ||
}; | ||
}, | ||
toBlock: function(obj) { | ||
return `{{< gist ${obj.username} ${obj.gid} >}}`; | ||
}, | ||
toPreview: function(obj) { | ||
return '<a href="https://gist.github.com/' + obj.username + '/' + obj.id + '">gist</a>'; | ||
}, | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The favicon.ico in this folder is solely for Decap CMS |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters