Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Netlify CMS #301

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export default function Home({
<title>{title}</title>
<meta name="prixite" content="Prixte" />
<link rel="icon" href="/favicon.ico" />
<script
defer
src="https://identity.netlify.com/v1/netlify-identity-widget.js"
></script>
</Head>
<div className="home-page-container">
<Container maxWidth="xl">
Expand Down
17 changes: 17 additions & 0 deletions public/admin/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
backend:
name: git-gateway
repo: prixite/prixite.github.io
branch: cms # Branch to update (optional; defaults to master)
media_folder: public/images/posts
public_folder: /images/posts
collections:
- name: 'blogs'
label: 'Blogs'
folder: 'data/blogs'
create: true
fields:
- { label: 'Title', name: 'title', widget: 'string' }
- { label: 'Date', name: 'date', widget: 'string' }
- { label: 'Description', name: 'excerpt', widget: 'string' }
- { label: 'Cover Image', name: 'cover_image', widget: 'image' }
- { label: 'Body', name: 'body', widget: 'markdown' }
14 changes: 14 additions & 0 deletions public/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<!-- https://cdn.jsdelivr.net/npm/netlify-cms@^2.0.0/dist/netlify-cms.js -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>
</html>