Skip to content

Commit

Permalink
Merge pull request #34 from BTx123/feature/decap-cms
Browse files Browse the repository at this point in the history
Add decap-cms admin panel
  • Loading branch information
BTx123 authored Nov 30, 2024
2 parents 05a7df6 + 6184625 commit e022a64
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tabWidth: 4
useTabs: false
overrides:
- files:
- "*.yml"
options:
tabWidth: 2
printWidth: 1000
- files:
- "*.prettierrc"
options:
tabWidth: 2
parser: yaml
66 changes: 66 additions & 0 deletions static/admin/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
backend:
name: github
repo: BTx123/BTx123.github.io
branch: main
site_url: https://brian-tom.com
locale: en
logo_url: https://brian-tom.com/android-chrome-512x512.png
slug:
encoding: ascii
clean_accents: true
media_folder: static/images/uploads
public_folder: /images/uploads
publish_mode: editorial_workflow
editor:
preview: false
collections:
- name: posts
label: Posts
label_singular: Post
description: Blog posts
folder: content/posts
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
create: true
fields:
- { label: Type, name: type, widget: hidden, default: post }
- { label: Title, name: title, widget: string }
- { label: Description, name: description, widget: string, required: false }
- { label: Created On, name: date, widget: datetime, default: "{{now}}" }
- { label: Updated On, name: lastmod, widget: datetime, default: "{{now}}" }
- { label: Tags, name: tags, widget: list, field: { label: Tag, name: tag, widget: string }, summary: "{{fields.tag}}" }
- { label: Cover Image, name: coverImage, widget: image, required: false }
- { label: Body, name: body, widget: markdown, required: false }
- name: galleries
label: Galleries
label_singular: Gallery
description: Photo galleries
folder: content/galleries
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
path: "{{slug}}/index"
create: true
media_folder: ""
public_folder: ""
fields:
- { label: Type, name: type, widget: hidden, default: gallery }
- { label: Title, name: title, widget: string }
- { label: Description, name: description, widget: string, required: false }
- { label: Created On, name: date, widget: datetime, default: "{{now}}" }
- { label: Updated On, name: lastmod, widget: datetime, default: "{{now}}" }
- { label: Cover Image, name: coverImage, widget: image }
- { label: Tags, name: tags, widget: list, field: { label: Tag, name: tag, widget: string }, summary: "{{fields.tag}}" }
- { label: Location, name: location, widget: map, required: false }
- { label: Body, name: body, widget: markdown, required: false }
- name: pages
label: Pages
description: Custom pages
files:
- name: resume
label: Resume Page
file: content/resume.md
editor:
preview: false
fields:
- { label: Title, name: title, widget: string }
- { label: Publish Date, name: date, widget: datetime, default: "{{now}}" }
- { label: Description, name: description, widget: string }
- { label: Body, name: body, widget: markdown }
13 changes: 13 additions & 0 deletions static/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!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>Content Manager</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>
</body>
</html

0 comments on commit e022a64

Please sign in to comment.