newsliner-gatsby

所属分类:快速开发平台
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2021-09-08 07:50:53
上 传 者sh-1993
说明:  盖茨比新闻班机
(newsliner gatsby)

文件列表:
.ghost.json (256, 2021-09-08)
LICENSE (1057, 2021-09-08)
functions/ (0, 2021-09-08)
functions/subscribe/ (0, 2021-09-08)
functions/subscribe/subscribe.js (1854, 2021-09-08)
gatsby-browser.js (879, 2021-09-08)
gatsby-config.js (6139, 2021-09-08)
gatsby-node.js (4978, 2021-09-08)
netlify.toml (230, 2021-09-08)
package-lock.json (874254, 2021-09-08)
package.json (1975, 2021-09-08)
plugins/ (0, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/ (0, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/.babelrc (137, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/common.js (1033, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/gatsby-node.js (3607, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/gatsby-ssr.js (2111, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/index.js (7, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/package.json (1074, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/src/ (0, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/src/common.js (1267, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/src/gatsby-node.js (2157, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/src/gatsby-ssr.js (2051, 2021-09-08)
plugins/gatsby-plugin-ghost-manifest/yarn.lock (127118, 2021-09-08)
src/ (0, 2021-09-08)
src/components/ (0, 2021-09-08)
src/components/common/ (0, 2021-09-08)
src/components/common/Footer.js (1595, 2021-09-08)
src/components/common/Header.js (3136, 2021-09-08)
src/components/common/Hero.js (727, 2021-09-08)
src/components/common/Layout.js (3991, 2021-09-08)
src/components/common/MobileMenu.js (1475, 2021-09-08)
src/components/common/Navigation.js (1341, 2021-09-08)
src/components/common/Pagination.js (1149, 2021-09-08)
src/components/common/PostCard.js (2099, 2021-09-08)
src/components/common/PostCta.js (608, 2021-09-08)
src/components/common/Sharing.js (2365, 2021-09-08)
src/components/common/SubscribeForm.js (3409, 2021-09-08)
... ...

# Gatsby Newsliner Starter (with Ghost as Headless CMS) A starter template to build lightning fast websites with [Ghost](https://ghost.org) & [Gatsby](https://gatsbyjs.org) brought to you by [Epilocal](https://www.epilocal.com/) as part of the [NewsCloud](https://www.epilocal.com/products/newscloud/) project to support local news. This template was built on top of the [gatsby-starter-ghost](https://github.com/tryghost/gatsby-starter-ghost) template, so much of the installation instructions will be the same. **Demo:** https://newsliner-gatsby.epilocal.com/   ![newsliner-gatsby](https://user-images.githubusercontent.com/9167731/115685254-bc85b800-a360-11eb-8230-b4fb369461ff.png)   # Installing ```bash # With Gatsby CLI gatsby new newsliner-gatsby https://github.com/epilocal/newsliner-gatsby.git ``` ```bash # From Source git clone https://github.com/epilocal/newsliner-gatsby.git cd newsliner-gatsby ``` Then install dependencies ```bash yarn ```   # Running Start the development server. You now have a Gatsby site pulling content from headless Ghost. ```bash gatsby develop ``` By default, the starter will populate content from a default Ghost install located at https://cloud.epilocal.com/epilocal. To use your own install, you will need to edit the `.ghost.json` config file with your credentials. Change the `apiUrl` value to the URL of your Ghost site. For Ghost(Pro) customers, this is the Ghost URL ending in `.ghost.io`, and for people using the self-hosted version of Ghost, it's the same URL used to access your site. Next, update the `contentApiKey` value to a key associated with the Ghost site. A key can be provided by creating an integration within Ghost Admin. Navigate to Integrations and click "Add new integration". Name the integration appropriately and click create. Finally, configure your desired URL in `siteConfig.js`, so links (e. g. canonical links) are generated correctly. You can also update other default values, such as `postsPerPage` in this file. To use this starter without issues, your Ghost installation needs to be at least on version `2.10.0`. The default Ghost version that is used for this starter is `3.x`. If your Ghost installation is on a lower version, you will need to pass in a `version` property in your `.ghost.json` settings: **Ghost >=2.10.0 <3.0.0** ```json { "apiUrl": "https://gatsby.ghost.io", "contentApiKey": "9cc5c67c358edfdd81455149d0", "version": "v2" } ``` **Ghost >=3.0.0** ```json { "apiUrl": "https://gatsby.ghost.io", "contentApiKey": "9cc5c67c358edfdd81455149d0" } ```   # Deploying with Netlify The starter contains three config files specifically for deploying with Netlify. A `netlify.toml` file for build settings, a `/static/_headers` file with default security headers set for all routes, and `/static/_redirects` to set Netlify custom domain redirects. To deploy to your Netlify account, hit the button below. [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/epilocal/newsliner-gatsby) Content API Keys are generally not considered to be sensitive information, they exist so that they can be changed in the event of abuse; so most people commit it directly to their `.ghost.json` config file. If you prefer to keep this information out of your repository you can remove this config and set [Netlify ENV variables](https://www.netlify.com/docs/continuous-deployment/#build-environment-variables) for production builds instead. This template uses a Netlify serverless function to add email subscribers to your Ghost instance via the Ghost Admin API. If you want to use this feature, you will need to add the API URL and your Ghost Admin API Key as Netlify ENV variables. Once deployed, you can set up a [Ghost + Netlify Integration](https://docs.ghost.org/integrations/netlify/) to use deploy hooks from Ghost to trigger Netlify rebuilds. That way, any time data changes in Ghost, your site will rebuild on Netlify.   # Optimising You can disable the default Ghost Handlebars Theme front-end by enabling the `Make this site private` flag within your Ghost settings. This enables password protection in front of the Ghost install and sets `` so your Gatsby front-end becomes the source of truth for SEO.   # Extra options ```bash # Run a production build, locally gatsby build # Serve a production build, locally gatsby serve ``` Gatsby `develop` uses the `development` config in `.ghost.json` - while Gatsby `build` uses the `production` config.   # Copyright & License Copyright (c) 2021 Epilocal - Released under the [MIT license](LICENSE).

近期下载者

相关文件


收藏者