about summary refs log tree commit diff
path: root/static
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-02-03 19:38:24 +0100
committerGitHub <noreply@github.com>2020-02-03 19:38:24 +0100
commit8fe56e0b34eac47b92be6cc99ca95c67eaf0affc (patch)
treebd3061fa31cbbc9207cbaa5c02f23dec150aa906 /static
parenteca7ecabd386edc0e138d6d7a1de2881dacffa41 (diff)
downloadkronika-8fe56e0b34eac47b92be6cc99ca95c67eaf0affc.tar.gz
kronika-8fe56e0b34eac47b92be6cc99ca95c67eaf0affc.zip
Netlify cms (#7)
* Add netlify CMS

* Add netlify.toml

* Add example media library

* Add Netlify Identity

* Fix post path

* Add content

* Add body

* Fix date format

* Add site url

* Add image

* Disable editorial workflow

* Add date path

* Add file extension

* Use the latest release

* Fix slug

* Filename on preview path

* Remove filenames
Diffstat (limited to 'static')
-rw-r--r--static/admin/config.yml56
-rw-r--r--static/admin/index.html21
2 files changed, 77 insertions, 0 deletions
diff --git a/static/admin/config.yml b/static/admin/config.yml
new file mode 100644
index 0000000..2d710c0
--- /dev/null
+++ b/static/admin/config.yml
@@ -0,0 +1,56 @@
+backend:
+  name: git-gateway
+
+#publish_mode: editorial_workflow
+display_url: https://puszcza.netlify.com
+site_url: https://puszcza.netlify.com
+locale: 'pl'
+
+media_folder: 'static/media'
+media_library:
+  name: uploadcare
+  config:
+    publicKey: demopublickey
+
+collections:
+  - name: posts
+    label: 'Wpisy'
+    folder: 'wpisy'
+    slug: '{{title}}'
+    path: '{{year}}/{{month}}/{{day}}/{{slug}}'
+    preview_path: 'kronika/{{year}}/{{month}}/{{day}}/{{title}}'
+    preview_path_date_field: 'date'
+    editor:
+      preview: false
+    fields:
+      - label: 'Tytuł'
+        name: title
+        widget: string
+        required: true
+
+      - label: 'Autor'
+        name: author
+        widget: string
+        required: true
+
+      - label: 'Data'
+        name: date
+        widget: datetime
+        dateFormat: DD.MM.YYYY
+        timeFormat: false
+        required: true
+
+      - label: 'Kategorie/Tagi'
+        name: category
+        widget: list
+        required: false
+
+      - label: 'Zdjęcie okładki - link'
+        name: image
+        widget: string
+        required: false
+
+      - label: 'Wpis'
+        name: body
+        widget: markdown
+        required: true
diff --git a/static/admin/index.html b/static/admin/index.html
new file mode 100644
index 0000000..79adafc
--- /dev/null
+++ b/static/admin/index.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8" />
+    <title>Netlify CMS</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  </head>
+  <body>
+    <!--[if lt IE 8]>
+      <p class="browserupgrade">
+        You are using an <strong>outdated</strong> browser. Please
+        <a href="http://browsehappy.com/">upgrade your browser</a> to improve
+        your experience.
+      </p>
+    <![endif]-->
+
+    <noscript>You need to have javascript enabled</noscript>
+    <script src="https://unpkg.com/netlify-cms@2.10.16/dist/netlify-cms.js"></script>
+    <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
+  </body>
+</html>