diff --git a/.eleventy.js b/.eleventy.js index 439c599..9778f5c 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -54,6 +54,8 @@ module.exports = (config) => { // added passthrough for global assets config.addPassthroughCopy('assets') + config.addPassthroughCopy('admin') + // added passthrough for images in their respective folders config.addPassthroughCopy('_content/**/images/**') diff --git a/_includes/base.njk b/_includes/base.njk index a14ca40..b0190fe 100644 --- a/_includes/base.njk +++ b/_includes/base.njk @@ -20,6 +20,7 @@ +
@@ -32,4 +33,15 @@ {% block footer %}{% endblock %} + diff --git a/admin/config.yml b/admin/config.yml new file mode 100644 index 0000000..f79ad71 --- /dev/null +++ b/admin/config.yml @@ -0,0 +1,45 @@ +backend: + name: gitea + repo: suroh/work.suroh.tk + app_id: 7bfaec5d-9c01-49bc-8c3c-d38ad5c7b16a + api_root: https://git.suroh.tk/api/v1 + base_url: https://git.suroh.tk + site_domain: work.suroh.tk + branch: main +media_folder: "assets/media" +public_folder: "/assets/media" + # Please run "npx netlify-cms-proxy-server" for local backend +local_backend: false +collections: + - label: "work" + name: "work" + folder: "_content/work" + create: true + fields: + - { label: "title", name: "title", widget: "string" } + - { label: "layout", name: "layout", widget: "hidden", default: "page.njk" } + - { label: "body", name: "body", widget: "markdown" } + - { label: "feature image", name: "imgFeat", widget: "image", media_folder: "images" } + - { label: "gallery", name: "gallery", widget: "image", allow_multiple: true, media_folder: "images" } + - label: "audio" + name: "audio" + folder: "_content/audio" + create: true + fields: + - { label: "title", name: "title", widget: "string" } + - { label: "layout", name: "layout", widget: "hidden", default: "page.njk" } + - { label: "body", name: "body", widget: "markdown" } + - { label: "feature image", name: "imgFeat", widget: "image", media_folder: "images" } + - { label: "gallery", name: "gallery", widget: "image", allow_multiple: true, media_folder: "images" } + - label: "Settings" + name: "settings" + editor: + preview: false + files: + - label: "Meta Settings" + name: "settings" + file: "src/_data/settings.yaml" + fields: + - { label: Name, name: name, widget: string } + - { label: Author, name: author, widget: string } + - { label: URL, name: url, widget: string } diff --git a/admin/index.html b/admin/index.html new file mode 100644 index 0000000..bbe8d7e --- /dev/null +++ b/admin/index.html @@ -0,0 +1,18 @@ + + + + + + + +