added backend for easy updats

This commit is contained in:
suroh 2024-02-01 22:23:17 +01:00
parent d4b894a602
commit a3b36087bd
2 changed files with 13 additions and 1 deletions

View File

@ -46,7 +46,7 @@ module.exports = (config) => {
let sorted = []
let unsorted = []
let pages = collection.getFilteredByGlob(`_content/${cat}/*.md`)
let pages = collection.getFilteredByGlob(`src/_content/work/${cat}/*.md`)
for (let page of pages) {
if (page.data.sort) {

View File

@ -49,3 +49,15 @@ collections:
- {label: "Gallery", name: "gallery", widget: "image", media_library: { config: { multiple: true } }, required: false }
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Order", name: "sort", widget: "number"}
- label: "Pages"
name: "pages"
folder: "_content"
create: true
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Published", name: "published", widget: "boolean"}
- {label: "Featured Image", name: "imgFeat", widget: "image", required: false}
- {label: "Gallery", name: "gallery", widget: "image", media_library: { config: { multiple: true } }, required: false }
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Order", name: "sort", widget: "number"}