mirror of
https://github.com/kingomarnajjar/gatsby-starter-netlify-cms.git
synced 2026-07-25 22:27:24 +10:00
add script to helmet
This commit is contained in:
parent
6897e6a97c
commit
515d3ab4ec
3 changed files with 12 additions and 3 deletions
10
README.md
10
README.md
|
|
@ -18,6 +18,12 @@ $ cd [SITE_DIRECTORY_NAME]
|
|||
$ gatsby build
|
||||
$ gatsby serve
|
||||
```
|
||||
|
||||
## Accessing the CMS
|
||||
### Accessing the CMS
|
||||
Follow the [Netlify CMS Quick Start Guide](https://www.netlifycms.org/docs/quick-start/#authentication) to set up authentication, and hosting.
|
||||
|
||||
## Take a Test Drive
|
||||
Netlify CMS can run in any frontend web environment, but the quickest way to try it out is by running it on a pre-configured starter site with Netlify. Our example here is the Kaldi coffee company template. Use the button below to build and deploy your own copy of the repository:
|
||||
|
||||
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/AustinGreen/gatsby-starter-netlify-cms/&stack=cms"><img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify"></a>
|
||||
|
||||
After clicking that button, you’ll authenticate with GitHub and choose a repository name. Netlify will then automatically create a repository in your GitHub account with a copy of the files from the template. Next, it will build and deploy the new site on Netlify, bringing you to the site dashboard when the build is complete. Next, you’ll need to set up Netlify’s Identity service to authorize users to log in to the CMS.
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ module.exports = class HTML extends React.Component {
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
{this.props.headComponents}
|
||||
{css}
|
||||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js" />
|
||||
</head>
|
||||
<body {...this.props.bodyAttributes}>
|
||||
{this.props.preBodyComponents}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
import React from 'react';
|
||||
import Link from 'gatsby-link';
|
||||
import Helmet from 'react-helmet';
|
||||
|
||||
export default function Index({ data }) {
|
||||
const { edges: posts } = data.allMarkdownRemark;
|
||||
return (
|
||||
<section className="section">
|
||||
<Helmet>
|
||||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js" />
|
||||
</Helmet>
|
||||
<div className="container">
|
||||
{posts.filter(post => post.node.frontmatter.templateKey === 'blog-post').map(({ node: post }) => {
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue