Skip to content

Commit aee47db

Browse files
Merge pull request #1 from SpeksForks/master
MINOR: adding Netlify CMS basics
2 parents 3861adc + d47eabc commit aee47db

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

.eleventy.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module.exports = function(config) {
2-
3-
// Set Assets Folder
2+
// Pass "assets" and "admin" folders through
43
config.addPassthroughCopy("assets");
4+
config.addPassthroughCopy("admin");
55

66
return {
77
passthroughFileCopy: true,
8-
markdownTemplateEngine: "njk",
8+
markdownTemplateEngine: "njk",
99
templateFormats: ["html", "njk", "md"],
1010
dir: {
11-
input: "src",
12-
output: "_site",
11+
input: "src",
12+
output: "_site",
1313
includes: "includes"
1414
}
1515
}
16-
}
16+
}

admin/config.yml

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

admin/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Content Manager</title>
7+
</head>
8+
<body>
9+
<!-- Include the script that builds the page and powers Netlify CMS -->
10+
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
11+
</body>
12+
</html>

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"build": "eleventy",
9+
"watch": "eleventy --watch",
10+
"serve": "eleventy --watch --serve"
811
},
912
"repository": {
1013
"type": "git",

0 commit comments

Comments
 (0)