Skip to content

Commit 8167d93

Browse files
committed
Updates netlify-cms.
1 parent 4575f12 commit 8167d93

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

src/static/admin/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ backend:
22
name: git-gateway
33
branch: master # Branch to update (optional; defaults to master)
44

5-
media_folder: "static/public" # Media files will be stored in the repo under public/public
6-
public_folder: "/public" # Folder path where uploaded files will be accessed, relative to the base of the built site
5+
media_folder: "unoptimized-images/" # Media files will be stored in the repo under public/uploads
6+
public_folder: "/" # Folder path where uploaded files will be accessed, relative to the base of the built site
77

88
collections:
99
- name: "articles" # Used in routes, e.g., /admin/collections/blog
@@ -13,7 +13,7 @@ collections:
1313
slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
1414
fields: # The fields for each document, usually in front matter.
1515
# Remove any that aren't needed for posts
16-
- {label: "Layout", name: "layout", widget: "hidden", default: "blog", required: false}
16+
- {label: "Layout", name: "layout", widget: "hidden", default: "post", required: false}
1717
- {label: "Title", name: "title", widget: "string"}
1818
- {label: "Author", name: "author", widget: "string", required: false}
1919
- {label: "Published", name: "created", widget: "datetime", required: false}

src/static/admin/index.html

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,9 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Content Manager</title>
7-
8-
<!-- Include the styles for the Netlify CMS UI, after your own styles -->
9-
<link rel="stylesheet" href="https://unpkg.com/netlify-cms@^1.0.0/dist/cms.css" />
10-
11-
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
12-
137
</head>
148
<body>
159
<!-- Include the script that builds the page and powers Netlify CMS -->
16-
<script src="https://unpkg.com/netlify-cms@^1.0.0/dist/cms.js"></script>
17-
<script>
18-
if (window.netlifyIdentity) {
19-
window.netlifyIdentity.on("init", user => {
20-
if (!user) {
21-
window.netlifyIdentity.on("login", () => {
22-
document.location.href = "/admin/";
23-
});
24-
}
25-
});
26-
}
27-
</script>
10+
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
2811
</body>
2912
</html>

0 commit comments

Comments
 (0)