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

github.com/your-identity/hugo-theme-dimension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authord-asnaghi <asnaghi@me.com>2020-05-17 21:57:49 +0300
committerd-asnaghi <asnaghi@me.com>2020-05-17 21:57:49 +0300
commit1e1abd2e31c6727c820f683be01c4f7c650198d1 (patch)
tree1870614a2ef9db1ea55ceb16aaa4790ef372ab6e
parent66cc1bc0072a9f66c8f118231fb56fb1f8c6ee16 (diff)
[CMS] added netlify support
-rw-r--r--README.md6
-rw-r--r--layouts/partials/header.html1
-rw-r--r--layouts/partials/netlify-cms.html2
-rw-r--r--layouts/partials/netlify-identity.html2
-rw-r--r--static/admin/config.yml45
-rw-r--r--static/admin/index.html12
-rw-r--r--theme.toml2
7 files changed, 68 insertions, 2 deletions
diff --git a/README.md b/README.md
index f5131cf..751b5f0 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Dimension
-A port of HTML5UP's responsive and minimal dimension theme.
+A hugo port of HTML5UP's responsive and minimal dimension theme. With native support for Netlify's headless CMS.
![Dimension](https://github.com/your-identity/hugo-theme-dimension/blob/master/images/screenshot.png?raw=1)
@@ -13,6 +13,7 @@ A port of HTML5UP's responsive and minimal dimension theme.
- [How to run your site](#how-to-run-your-site)
- [How to contribute](#how-to-contribute)
- [Sponsoring](#sponsoring)
+ - [Quick deploy](#quick-deploy)
- [License](#license)
## How to start
@@ -69,6 +70,9 @@ If you like my work and want to support the development of the project, now you
<a href="https://www.buymeacoffee.com/dasnaghi" target="_blank"><img src="https://res.cloudinary.com/panr/image/upload/v1579374705/buymeacoffee_y6yvov.svg" alt="Buy Me A Coffee" ></a>
+## Quick deploy
+[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/your-identity/hugo-theme-dimension)
+
## License
Copyright © 202020 Davide Asnaghi
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index e0be750..917838f 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -9,4 +9,5 @@
<style>
:root{--site-background : url("{{ .Params.background | default "images/bg.jpg" | absURL }}")};
</style>
+ {{ partial "netlify-cms.html" .}}
</head> \ No newline at end of file
diff --git a/layouts/partials/netlify-cms.html b/layouts/partials/netlify-cms.html
new file mode 100644
index 0000000..1e671e7
--- /dev/null
+++ b/layouts/partials/netlify-cms.html
@@ -0,0 +1,2 @@
+<!-- Include the script that builds the page and powers Netlify CMS -->
+<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script> \ No newline at end of file
diff --git a/layouts/partials/netlify-identity.html b/layouts/partials/netlify-identity.html
new file mode 100644
index 0000000..ab43efc
--- /dev/null
+++ b/layouts/partials/netlify-identity.html
@@ -0,0 +1,2 @@
+<!-- Include the script that enables Netlify Identity on this page. -->
+<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> \ No newline at end of file
diff --git a/static/admin/config.yml b/static/admin/config.yml
new file mode 100644
index 0000000..053ece1
--- /dev/null
+++ b/static/admin/config.yml
@@ -0,0 +1,45 @@
+backend:
+ name: git-gateway
+ branch: master
+media_folder: static/img
+public_folder: /img
+collections:
+
+ - name: 'home'
+ label: 'Home Page'
+ folder: 'content/'
+ create: false
+ slug: '_index.md'
+ editor:
+ preview: false
+ fields:
+ - { label: 'Title', name: 'title', widget: 'string' }
+ - { label: 'Publish Date', name: 'date', widget: 'datetime' }
+ - { label: 'Description', name: 'description', widget: 'string' }
+ - { label: 'Background', name: 'background', widget: 'image' }
+
+ - name: 'pages'
+ label: 'Pages'
+ folder: 'content/'
+ create: true
+ slug: '{{slug}}'
+ editor:
+ preview: false
+ fields:
+ - { label: 'Title', name: 'title', widget: 'string' }
+ - { label: 'Publish Date', name: 'date', widget: 'datetime' }
+ - { label: 'Description', name: 'description', widget: 'string' }
+ - { label: 'Background', name: 'background', widget: 'image' }
+
+ - name: 'posts'
+ label: 'Posts'
+ folder: 'content/posts'
+ create: true
+ slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
+ editor:
+ preview: false
+ fields:
+ - { label: 'Title', name: 'title', widget: 'string' }
+ - { label: 'Publish Date', name: 'date', widget: 'datetime' }
+ - { label: 'Description', name: 'description', widget: 'string' }
+ - { label: 'Body', name: 'body', widget: 'markdown' } \ No newline at end of file
diff --git a/static/admin/index.html b/static/admin/index.html
new file mode 100644
index 0000000..711f0d9
--- /dev/null
+++ b/static/admin/index.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Content Manager</title>
+ {{ partial "netlify-identity.html" .}}
+ </head>
+ <body>
+ {{ partial "netlify-cms.html" .}}
+ </body>
+</html> \ No newline at end of file
diff --git a/theme.toml b/theme.toml
index 9c56ba5..4cf22dc 100644
--- a/theme.toml
+++ b/theme.toml
@@ -1,7 +1,7 @@
name = "dimension"
license = "MIT"
licenselink = "https://github.com/panr/hugo-theme-dimension/blob/master/LICENSE.md"
-description = "A port of HTML5's dimension theme, optimized for markdown based CMS."
+description = "A port of HTML5UP's dimension theme, optimized for markdown based CMS."
homepage = "https://github.com/your-identity/hugo-theme-dimension/"
tags = ["blog", "clean", "customizable", "dark", "highlighting", "minimal", "personal", "responsive", "simple", "responsive"]
features = ["blog", "syntax highlighting"]