Add stack=cms params in README file, enable editorial workflow and make netlify identity widget only available in homepage
This commit is contained in:
parent
32204eb9b0
commit
9c39192352
4 changed files with 21 additions and 5 deletions
|
|
@ -121,7 +121,7 @@ Now, your blog is ready to be deployed. All generated files are located at `_sit
|
|||
|
||||
Clone this repository on own GitHub account and deploy to Netlify:
|
||||
|
||||
[](https://app.netlify.com/start/deploy?repository=https://github.com/ixartz/Eleventy-Starter-Boilerplate)
|
||||
[](https://app.netlify.com/start/deploy?repository=https://github.com/ixartz/Eleventy-Starter-Boilerplate&stack=cms)
|
||||
|
||||
### Contributions
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ backend:
|
|||
name: git-gateway
|
||||
branch: master
|
||||
|
||||
publish_mode: editorial_workflow
|
||||
media_folder: 'src/assets/images/posts' # Media files will be stored in the repo under src/assets/images/posts
|
||||
public_folder: '/assets/images/posts' # The src attribute for uploaded media will begin with assets/images/posts
|
||||
|
||||
|
|
@ -11,8 +12,25 @@ collections:
|
|||
folder: "src/posts" # The path to the folder where the documents are stored
|
||||
create: true # Allow users to create new documents in this collection
|
||||
slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
|
||||
editor:
|
||||
preview: false # Disable the editor preview and use instead 'preview links'
|
||||
fields: # The fields for each document, usually in front matter
|
||||
- { name: "title", label: "Title" }
|
||||
- { name: "description", label: "Description" }
|
||||
- { name: "date", label: "Date", widget: "datetime" }
|
||||
- { name: "body", label: "Body", widget: "markdown" }
|
||||
- name: "config"
|
||||
label: "Configuration"
|
||||
editor:
|
||||
preview: false
|
||||
files:
|
||||
- name: "global"
|
||||
label: "Global"
|
||||
file: "src/_data/site.json"
|
||||
fields:
|
||||
- { name: "site_name", label: "Site name" }
|
||||
- { name: "title", label: "Site title" }
|
||||
- { name: "description", label: "Site description" }
|
||||
- { name: "url", label: "Site url" }
|
||||
- { name: "locale", label: "Language" }
|
||||
- { name: "author", label: "Author" }
|
||||
|
|
|
|||
|
|
@ -10,8 +10,5 @@
|
|||
<!-- Include the script that builds the page and powers Netlify CMS -->
|
||||
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
|
||||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
|
||||
<script>
|
||||
CMS.registerPreviewStyle('/assets/styles/main.css');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
"@context": "http://schema.org"
|
||||
}
|
||||
</script>
|
||||
<% } %> <%- include('webpack.ejs') %>
|
||||
<% } %><%- include('webpack.ejs') %> <% if (page.url == "/") { %>
|
||||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
|
||||
<script>
|
||||
if (window.netlifyIdentity) {
|
||||
|
|
@ -59,6 +59,7 @@
|
|||
});
|
||||
}
|
||||
</script>
|
||||
<% } %>
|
||||
</head>
|
||||
|
||||
<body class="antialiased w-full text-gray-700">
|
||||
|
|
|
|||
Loading…
Reference in a new issue