├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .ghost.json ├── .github └── FUNDING.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── gatsby-config.js ├── mediaConfig.js ├── netlify.toml ├── package.json ├── routesConfig.js ├── siteConfig.js ├── src └── images │ └── site-meta.png ├── starters.yml ├── static ├── favicon.ico ├── favicon.png ├── images │ └── logo.svg └── robots.txt └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 4 9 | end_of_line = lf 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.hbs] 14 | insert_final_newline = false 15 | 16 | [*.json] 17 | indent_size = 2 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | 22 | [*.{yml,yaml}] 23 | indent_size = 2 24 | 25 | [Makefile] 26 | indent_style = tab 27 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | public/** 2 | plugins/**/*.js 3 | plugins/*/node_modules/* 4 | !plugins/*/src/*.js 5 | content/** 6 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'parser': 'babel-eslint', 3 | 'parserOptions': { 4 | 'ecmaVersion': 6, 5 | 'ecmaFeatures': { 6 | 'jsx': true, 7 | 'experimentalObjectRestSpread': true 8 | } 9 | }, 10 | plugins: ['ghost', 'react'], 11 | extends: [ 12 | 'plugin:ghost/node', 13 | 'plugin:ghost/ember', 14 | 'plugin:react/recommended' 15 | ], 16 | "settings": { 17 | "react": { 18 | "createClass": "createReactClass", 19 | "pragma": "React", 20 | "version": "16.0", 21 | "flowVersion": "0.53" 22 | }, 23 | "propWrapperFunctions": ["forbidExtraProps"] 24 | }, 25 | "rules": { 26 | "ghost/sort-imports-es6-autofix/sort-imports-es6": "off", 27 | "ghost/ember/use-ember-get-and-set": "off", 28 | "no-console": "off", 29 | "no-inner-declarations": "off", 30 | "valid-jsdoc": "off", 31 | "require-jsdoc": "off", 32 | "quotes": ["error", "backtick"], 33 | "consistent-return": ["error"], 34 | "arrow-body-style": [ 35 | "error", 36 | "as-needed", 37 | { "requireReturnForObjectLiteral": true } 38 | ], 39 | "jsx-quotes": ["error", "prefer-double"], 40 | "semi": ["error", "never"], 41 | "object-curly-spacing": ["error", "always"], 42 | "comma-dangle": [ 43 | "error", 44 | { 45 | "arrays": "always-multiline", 46 | "objects": "always-multiline", 47 | "imports": "always-multiline", 48 | "exports": "always-multiline", 49 | "functions": "ignore" 50 | } 51 | ], 52 | "react/prop-types": [ 53 | "error", 54 | { 55 | "ignore": ["children"] 56 | } 57 | ] 58 | } 59 | }; 60 | -------------------------------------------------------------------------------- /.ghost.json: -------------------------------------------------------------------------------- 1 | { 2 | "development": { 3 | "apiUrl": "https://valdymas.medeinos.lt", 4 | "contentApiKey": "e3ec7b18ad58b7795bb82f2a15" 5 | }, 6 | "production": { 7 | "apiUrl": "https://valdymas.medeinos.lt", 8 | "contentApiKey": "e3ec7b18ad58b7795bb82f2a15" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [styxlab] 4 | open_collective: jamify-cloud 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Node template 2 | 3 | # Logs 4 | logs 5 | *.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | 10 | # Runtime data 11 | pids 12 | *.pid 13 | *.seed 14 | *.pid.lock 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # nyc test coverage 23 | .nyc_output 24 | 25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 26 | .grunt 27 | 28 | # Bower dependency directory (https://bower.io/) 29 | bower_components 30 | 31 | # node-waf configuration 32 | .lock-wscript 33 | 34 | # Compiled binary addons (https://nodejs.org/api/addons.html) 35 | build/Release 36 | 37 | # Dependency directories 38 | node_modules/ 39 | jspm_packages/ 40 | 41 | # Typescript v1 declaration files 42 | typings/ 43 | 44 | # Optional npm cache directory 45 | .npm 46 | 47 | # Optional eslint cache 48 | .eslintcache 49 | 50 | # Optional REPL history 51 | .node_repl_history 52 | 53 | # Output of 'npm pack' 54 | *.tgz 55 | 56 | # Yarn Integrity file 57 | .yarn-integrity 58 | 59 | # dotenv environment variables file 60 | .env 61 | 62 | # IDE 63 | .idea/* 64 | *.iml 65 | *.sublime-* 66 | 67 | # OSX 68 | .DS_Store 69 | .vscode 70 | 71 | # Docs Custom 72 | .cache/ 73 | public 74 | yarn-error.log 75 | .netlify/ 76 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributors welcome! 2 | 3 | As the interest in this project is rising, I want to list some ideas on how you can easily make a contribution. Just pick one area where you feel most skilled and don't forget to [coordinate with me](https://atmolabs.org/contact/), so your contribution receives full recognition. 4 | 5 | # Write a blog article 6 | 7 | Once you start using `gatsby-theme-try-ghost` or one of its addons, you'll naturally build some knowledge about how to use it. You may also come across some hurdles, see things you like or dislike, find out new things etc. Why not share your experience with others? 8 | 9 | You can help this project tremendously by writing a blog article about your experience using this repo, or you make a speed comparison with other blog solutions, or show others how to overcome the hurdles you came across. I'm sure you have even more ideas, as you are most likely already running a blog! 10 | 11 | # Test in different scenarios 12 | 13 | Sourcing in your own content is a first test, as your content may contain elements which are not in our standard demo pages. The build should always succeed, but you may notice something on your site which doesn't quite come through as expected. It might be a wrong meta tag, it might be a displaced image or a colour glitch. 14 | 15 | Please open an [issue on Github](https://github.com/styxlab/gatsby-theme-try-ghost/issues), so this can be corrected in one of the next releases. If you know how to solve it yourself, you can of course also issue a pull request. There are also very different scenarios, where we rely on you reporting an issue. Make tests on different browsers, on desktop or mobile or with different screen sizes to name a few. 16 | 17 | # Improve existing plugins 18 | 19 | When you start using the plugins, you might feel that an important feature or configuration option is missing. Adding a new option to an existing plugin is usually easier than writing something from scratch. So, this is also a good place for first time contributors. 20 | 21 | For example, the [gatsby-rehype-prismjs](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-rehype-prismjs) plugin could be improved to better support dark mode, font sizing, code highlighting and code numbering. This is just *one* starting point, start by improving plugins you need most in *your own* projects. 22 | 23 | # Make a new plugin 24 | 25 | It's always rewarding to write a new plugin as you really see your own accomplishments. Again, choose something that is missing in your own project. Some obvious plugins that are currently missing are: 26 | 27 | - Social link plugin (social links can be more easily added and configured) 28 | - Google AMP pages 29 | - Search plugin (UI and backend) 30 | - About page (similar to [gatsby-theme-ghost-contact](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-theme-ghost-contact)) 31 | - Gatsby images within content areas 32 | 33 | # Write unit tests 34 | 35 | In order to make this repository more robust and to being able to handle more contributions, unit tests would be a great addition. If you have some prior experience about writing unit tests you are very welcome to add unit tests to this repository. 36 | 37 | # Where to go from here? 38 | 39 | If you have picked your area, a specific task or an idea where you want to contribute, just [get in contact](https://atmolabs.org/contact/), so we can coordinate. 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 styxlab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | Jamify 4 | 5 |

6 |

7 | Jamify's blog starter
8 |

9 | 10 | [![Released under MIT license.](https://badgen.net/github/license/micromatch/micromatch)](https://github.com/styxlab/gatsby-starter-try-ghost/blob/master/LICENSE) 11 | [![gatsby-starter-try-ghost npm package version.](https://badgen.net/npm/v/gatsby-starter-try-ghost)](https://www.npmjs.org/package/gatsby-starter-try-ghost) 12 | 13 | A [Gatsby](https://www.gatsbyjs.org/) starter for creating blogs from headless [Ghost CMS](https://ghost.org/changelog/jamstack/). 14 | 15 | Turn your Ghost blog into a flaring fast static website. This Gatsby theme is a front-end replacement of the Ghost Handlebars engine featuring an enhanced Ghost Casper look and feel. All content is sourced from a headless Ghost CMS. 16 | 17 |   18 | 19 | ## ⚠️ I am no longer actively maintaining this plugin, but PRs for fixes and version updates are most welcome! 20 | 21 |   22 | 23 | ## 🔥 Alternatives 24 | 25 | > Tired of `gatsby-config.js`? Check out [Blogody](https://www.blogody.com) for an integrated solution with many more benefits! 26 | 27 | > Favor [Next.js](https://nextjs.org/) over Gatsby? Head over to [next-cms-ghost](https://github.com/styxlab/next-cms-ghost)! 28 | 29 |   30 | 31 | ## 🎓 Tutorials 32 | 33 | Check out the [Tutorials](https://www.jamify.org) for practical guides on using this project. 34 | 35 |   36 | 37 | ## 🎉 Demo 38 | 39 | > Play with the [Demo](https://demo.jamify.org/) to get a first impression. 40 | 41 | [![gatsby-starter-try-ghost](https://static.gotsby.org/v1/assets/images/jamify-demo.png)](https://styxlab.github.io) 42 | 43 |   44 | 45 | ## ✨ Features 46 | 47 | - Ghost Casper look and feel 48 | - Images with [lazy-loading and blur-up effect](https://using-gatsby-image.gatsbyjs.org/) 🚀 🆕 49 | - Infinite Scroll ✨ 50 | - Featured posts pinned on top 🆕 51 | - Sticky navigation headers 52 | - Hover on author avatar 53 | - Styled 404 page 54 | - SEO optimized 55 | - Fully responsive 56 | - Advanced routing 🆕 57 | - Composable and extensible 58 | - Incremental build enabled 🚀 🆕 59 | 60 |   61 | 62 | ## 📦 Included Plugins 63 | 64 | The following plugins have been included for convenience: 65 | 66 | | Name | Version | Description | 67 | | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | 68 | | [`gatsby-theme-ghost-dark-mode`](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-theme-ghost-dark-mode) | [![version](https://badgen.net/npm/v/gatsby-theme-ghost-dark-mode)](https://www.npmjs.com/package/gatsby-theme-ghost-dark-mode) | Dark mode toggle 🌗 | 69 | | [`gatsby-rehype-ghost-links`](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-rehype-ghost-links) | [![version](https://badgen.net/npm/v/gatsby-rehype-ghost-links)](https://www.npmjs.com/package/gatsby-rehype-ghost-links) | Rewrite CMS links from absolute to relative | 70 | | [`gatsby-rehype-prismjs`](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-rehype-prismjs) | [![version](https://badgen.net/npm/v/gatsby-rehype-prismjs)](https://www.npmjs.com/package/gatsby-rehype-prismjs) | Syntax highlighting with [PrismJS](http://prismjs.com/) | 71 | | [`gatsby-theme-ghost-members`](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-theme-ghost-members) 🆕 | [![version](https://badgen.net/npm/v/gatsby-theme-ghost-members)](https://www.npmjs.com/package/gatsby-theme-ghost-members) | Member Subscriptions | 72 | 73 | If you don't need them, you can take them out in `gatsby-config.js` and `package.json` which may save you some time during the build process. 74 | 75 |   76 | 77 | ## 🎁 More Plugins 78 | 79 | Additional features can be integrated by installing Gatsby themes or plugins. The following plugins have been tested to work with [`gatsby-starter-try-ghost`](https://github.com/styxlab/gatsby-starter-try-ghost): 80 | 81 | | Name | Version | Description | 82 | | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | 83 | | [`gatsby-rehype-inline-images`](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-rehype-inline-images) 🆕 | [![version](https://badgen.net/npm/v/gatsby-rehype-inline-images)](https://www.npmjs.com/package/gatsby-rehype-inline-images) | Lazy-loading inline images with blur-up | 84 | | [`gatsby-theme-ghost-contact`](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-theme-ghost-contact) | [![version](https://badgen.net/npm/v/gatsby-theme-ghost-contact)](https://www.npmjs.com/package/gatsby-theme-ghost-contact) | Contact page | 85 | | [`gatsby-theme-ghost-commento`](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-theme-ghost-commento) | [![version](https://badgen.net/npm/v/gatsby-theme-ghost-commento)](https://www.npmjs.com/package/gatsby-theme-ghost-commento) | Commenting system with [Commento](https://commento.io/) | 86 | | [`gatsby-theme-ghost-toc`](https://github.com/styxlab/gatsby-theme-try-ghost/tree/master/packages/gatsby-theme-ghost-toc) 🆕 | [![version](https://badgen.net/npm/v/gatsby-theme-ghost-toc)](https://www.npmjs.com/package/gatsby-theme-ghost-toc) | Table of Contents | 87 | | [`gatsby-plugin-ackee-tracker`](https://github.com/burnsy/gatsby-plugin-ackee-tracker) | [![version](https://badgen.net/npm/v/gatsby-plugin-ackee-tracker)](https://www.npmjs.com/package/gatsby-plugin-ackee-tracker) | Site tracking with [Ackee](https://github.com/electerious/Ackee) | 88 | | [`gatsby-plugin-google-analytics`](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-analytics) | [![version](https://badgen.net/npm/v/gatsby-plugin-google-analytics)](https://www.npmjs.com/package/gatsby-plugin-google-analytics) | Site tracking with [Google Analytics](https://developers.google.com/analytics) | 89 | 90 |   91 | 92 | ## 🏁 Getting Started 93 | 94 | 1. Install this starter by running 95 | 96 | ```bash 97 | gatsby new try-ghost https://github.com/styxlab/gatsby-starter-try-ghost 98 | ``` 99 | 100 | 2. Change directory 101 | 102 | ```bash 103 | cd try-ghost 104 | ``` 105 | 106 | 3. Run 107 | 108 | ```bash 109 | yarn develop 110 | ``` 111 | 112 | and visit your site at `http://localhost:8000`. 113 | 114 |   115 | 116 | ## 💡 Configure 117 | 118 | ```js 119 | //siteConfig.js 120 | module.exports = { 121 | // Do not include a trailing slash! 122 | siteUrl: `https://your-blog.com`, 123 | 124 | // Maximum number of post shown per page 125 | // Infinite Scroll: Initial chunk of posts, subsequent posts are fetched one by one 126 | postsPerPage: 3, 127 | 128 | // This allows an alternative site title for meta data for pages. 129 | siteTitleMeta: `Gatsby Starter Ghost CMS`, 130 | 131 | // This allows an site description for meta data for pages. 132 | siteDescriptionMeta: `Turn your Ghost blog into a flaring fast static site with Gatsby`, 133 | 134 | // Used for App and Offline manifest e.g. Mobile Home Screen 135 | shortTitle: `Ghost`, 136 | siteIcon: `favicon.png`, 137 | backgroundColor: `#e9e9e9`, 138 | themeColor: `#15171A`, 139 | 140 | // Include Gatsby images for lazy loading and image optimizations (default: true) 141 | gatsbyImages: true, 142 | 143 | // Overwrite navigation menu (default: []), label is case sensitive 144 | // overwriteGhostNavigation: [{ label: `Home`, url: `/` }], 145 | }; 146 | ``` 147 | 148 | In the configuration shown above, the most important fields to be changed are `siteUrl`, `siteTitleMeta` and `siteDescriptionMeta`. Update at least those to fit your needs. 149 | 150 |   151 | 152 | ## 🔑 Ghost Content API keys 153 | 154 | All content is sourced from a Ghost CMS. By default, content is fetched from the demo location at `https://cms.gotsby.org`. Surely you want to source your own content. There are two ways to make your content keys available. Choose the method according to your build scenario. 155 | 156 | ### Building with cloud providers 157 | 158 | If you build your project with a cloud provider (e.g. Gatsby, Netlify, Vercel), the best option is to provide the keys with environment variables: 159 | 160 | | Key | Value (example) | 161 | | --------------------- | -------------------------- | 162 | | GHOST_API_URL | http:\/\/localhost:2368 | 163 | | GHOST_CONTENT_API_KEY | 9fccdb0e4ea5b572e2e5b92942 | 164 | 165 | The place where you can define them depends on the provider, but you usually find the option under the site settings. This avoids publishing keys in a public repository and is most secure. 166 | 167 | ### Building locally 168 | 169 | If you build locally or on a private network where the build directory is not accessible to the world, you can safely add a new `.ghost.json` file in your base directory with the following JSON structure: 170 | 171 | ```bash 172 | 173 | { 174 | "development": { 175 | "apiUrl": "http://localhost:2368", 176 | "contentApiKey": "9fccdb0e4ea5b572e2e5b92942" 177 | }, 178 | "production": { 179 | "apiUrl": "http://localhost:2368", 180 | "contentApiKey": "9fccdb0e4ea5b572e2e5b92942" 181 | } 182 | } 183 | ``` 184 | 185 | This file is part of `.gitignore` to avoid accidentally publishing it to your public repository. Change the `apiUrl` and `contentApiKey` to match your own Ghost CMS Content API keys. 186 | 187 |   188 | 189 | ## 🤯 Ensure headless mode of Ghost CMS 190 | 191 | For best SEO results it is strongly recommended to disable the default Ghost Handlebars theme front-end by selecting the _Make this site private_ flag within your Ghost admin settings. This enables password protection in front of the Ghost install and sets `` so your Gatsby front-end becomes the authoritative source for search engines. 192 | 193 |   194 | 195 | ## 💫 Deploy 196 | 197 | [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/styxlab/gatsby-starter-try-ghost) 198 | 199 | [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/styxlab/gatsby-starter-try-ghost) 200 | 201 |   202 | 203 | ## 🔧 Update 204 | 205 | It is recommended to install [npm-upgrade](https://www.npmjs.com/package/npm-upgrade) with `sudo npm install npm-upgrade -g`. Change into the base directory and update all packages with: 206 | 207 | ```bash 208 | npm-upgrade 209 | ``` 210 | 211 | You will be prompted to update all packages within your `package.json` file. Next, download the new packages: 212 | 213 | ```bash 214 | yarn 215 | yarn clean 216 | ``` 217 | 218 | The update process is now complete and you can start a new build with `yarn build` (or `yarn develop`). 219 | 220 |   221 | 222 | ## 💣 Reporting issues 223 | 224 | Please report all bugs and issues at [gatsby-theme-try-ghost/issues](https://github.com/styxlab/gatsby-theme-try-ghost/issues) as all development is happening there. 225 | 226 |   227 | 228 | ## 🧐 Disclaimer 229 | 230 | This project is not affiliated with [Gatsby](https://www.gatsbyjs.org/) or [Ghost](https://ghost.org/). 231 | 232 |   233 | 234 | # Copyright & License 235 | 236 | Copyright (c) 2020 styxlab - Released under the [MIT license](LICENSE). 237 | -------------------------------------------------------------------------------- /gatsby-config.js: -------------------------------------------------------------------------------- 1 | const path = require(`path`) 2 | 3 | let siteConfig 4 | let ghostConfig 5 | let mediaConfig 6 | let routesConfig 7 | 8 | try { 9 | siteConfig = require(`./siteConfig`) 10 | } catch (e) { 11 | siteConfig = null 12 | } 13 | 14 | try { 15 | mediaConfig = require(`./mediaConfig`) 16 | } catch (e) { 17 | mediaConfig = null 18 | } 19 | 20 | try { 21 | routesConfig = require(`./routesConfig`) 22 | } catch (e) { 23 | routesConfig = null 24 | } 25 | 26 | try { 27 | ghostConfig = require(`./.ghost`) 28 | } catch (e) { 29 | ghostConfig = { 30 | development: { 31 | apiUrl: process.env.GHOST_API_URL, 32 | contentApiKey: process.env.GHOST_CONTENT_API_KEY, 33 | }, 34 | production: { 35 | apiUrl: process.env.GHOST_API_URL, 36 | contentApiKey: process.env.GHOST_CONTENT_API_KEY, 37 | }, 38 | } 39 | } finally { 40 | const { apiUrl, contentApiKey } = process.env.NODE_ENV === `development` ? ghostConfig.development : ghostConfig.production 41 | 42 | if (!apiUrl || !contentApiKey || contentApiKey.match(//)) { 43 | ghostConfig = null //allow default config to take over 44 | } 45 | } 46 | 47 | module.exports = { 48 | plugins: [ 49 | `gatsby-plugin-preact`, 50 | `gatsby-plugin-netlify`, 51 | { 52 | resolve: `gatsby-source-filesystem`, 53 | options: { 54 | path: path.join(__dirname, `src`, `images`), 55 | name: `images`, 56 | }, 57 | }, 58 | { 59 | resolve: `gatsby-theme-try-ghost`, 60 | options: { 61 | ghostConfig: ghostConfig, 62 | siteConfig: siteConfig, 63 | mediaConfig: mediaConfig, 64 | routes: routesConfig, 65 | }, 66 | }, 67 | { 68 | resolve: `gatsby-theme-ghost-dark-mode`, 69 | options: { 70 | // Set to true if you want your theme to default to dark mode (default: false) 71 | // Note that this setting has an effect only, if 72 | // 1. The user has not changed the dark mode 73 | // 2. Dark mode is not reported from OS 74 | defaultModeDark: false, 75 | // If you want the defaultModeDark setting to take precedence 76 | // over the mode reported from OS, set this to true (default: false) 77 | overrideOS: false, 78 | }, 79 | }, 80 | { 81 | resolve: `gatsby-theme-ghost-members`, 82 | }, 83 | { 84 | resolve: `gatsby-transformer-rehype`, 85 | options: { 86 | filter: node => ( 87 | node.internal.type === `GhostPost` || 88 | node.internal.type === `GhostPage` 89 | ), 90 | plugins: [ 91 | { 92 | resolve: `gatsby-rehype-ghost-links`, 93 | }, 94 | { 95 | resolve: `gatsby-rehype-prismjs`, 96 | }, 97 | ], 98 | }, 99 | }, 100 | { 101 | resolve: `gatsby-plugin-gatsby-cloud`, 102 | }, 103 | // this (optional) plugin enables Progressive Web App + Offline functionality 104 | // This plugin is currently causing issues: https://github.com/gatsbyjs/gatsby/issues/25360 105 | //`gatsby-plugin-offline`, 106 | ], 107 | } 108 | -------------------------------------------------------------------------------- /mediaConfig.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | // Include Gatsby images for lazy loading and image optimizations (default: true) 4 | gatsbyImages: true, 5 | 6 | // Loading methods: lazy, eager or auto (default: lazy) 7 | gatsbyImageLoading: `lazy`, 8 | 9 | // Fading in transition (default: true) 10 | // true negatively impacts Lighthouse 6 LCP score 11 | gatsbyImageFadeIn: true, 12 | 13 | } 14 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "gatsby build" 3 | publish = "public" 4 | 5 | [template] 6 | incoming-hooks = ["Ghost"] 7 | 8 | [[plugins]] 9 | package = "netlify-plugin-gatsby-cache" 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gatsby-starter-try-ghost", 3 | "description": "Turn your Ghost blog into a flaring fast static site with Gatsby", 4 | "version": "2.0.0", 5 | "license": "MIT", 6 | "keywords": [ 7 | "gatsby", 8 | "gatsby-starter", 9 | "gatsby-starter-ghost", 10 | "gatsby-plugin", 11 | "jamify", 12 | "jamify-starter", 13 | "jamify-starter-ghost", 14 | "ghost", 15 | "ghost-theme", 16 | "casper", 17 | "blogging", 18 | "static-site", 19 | "static-site-generator", 20 | "gatsbyjs", 21 | "react" 22 | ], 23 | "scripts": { 24 | "develop": "gatsby develop", 25 | "build": "gatsby build --log-pages", 26 | "clean": "gatsby clean", 27 | "config": "git update-index --skip-worktree .ghost.json", 28 | "deploy": "gatsby build && echo 'demo.jamify.org' > public/CNAME && gh-pages -f -d public -b master -r git@github.com:styxlab/styxlab.github.io" 29 | }, 30 | "dependencies": { 31 | "gatsby": "^3.0.0", 32 | "gatsby-plugin-ackee-tracker": "^2.2.0", 33 | "gatsby-plugin-gatsby-cloud": "^2.0.0", 34 | "gatsby-plugin-netlify": "^3.0.0", 35 | "gatsby-plugin-preact": "^5.0.0", 36 | "gatsby-rehype-ghost-links": "^2.0.0", 37 | "gatsby-rehype-prismjs": "^2.0.0", 38 | "gatsby-theme-ghost-dark-mode": "^2.0.0", 39 | "gatsby-theme-ghost-members": "^2.0.0", 40 | "gatsby-theme-try-ghost": "^2.0.0", 41 | "gatsby-transformer-rehype": "^1.9.8", 42 | "preact": "^10.5.12", 43 | "preact-render-to-string": "^5.1.12", 44 | "prismjs": "^1.23.0", 45 | "react": "^17.0.1", 46 | "react-dom": "^17.0.1" 47 | }, 48 | "devDependencies": { 49 | "babel-eslint": "^10.1.0", 50 | "eslint": "^7.21.0", 51 | "eslint-plugin-ghost": "^2.0.0", 52 | "eslint-plugin-react": "^7.22.0", 53 | "gh-pages": "^3.1.0", 54 | "react": "^17.0.1", 55 | "react-dom": "^17.0.1" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /routesConfig.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | basePath: `/`, 4 | 5 | collections: [], 6 | 7 | } 8 | -------------------------------------------------------------------------------- /siteConfig.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Do not include a trailing slash! 3 | siteUrl: `https://demo.jamify.org`, 4 | 5 | // Enable infinite scroll (default: true) 6 | infiniteScroll: true, 7 | 8 | // Initial number fetched, scrolling lazy loads posts one by one 9 | // If infinite scroll is disabled: maximum number of post shown per page 10 | postsPerPage: 3, 11 | 12 | // This allows an alternative site title for meta data for pages. 13 | siteTitleMeta: `Gatsby Starter Ghost CMS`, 14 | 15 | // This allows an site description for meta data for pages. 16 | siteDescriptionMeta: `Turn your Ghost blog into a flaring fast static site with Gatsby`, 17 | 18 | // Used for App and Offline manifest e.g. Mobile Home Screen 19 | shortTitle: `Jamify`, 20 | siteIcon: `favicon.png`, 21 | backgroundColor: `#e9e9e9`, 22 | themeColor: `#15171A`, 23 | 24 | // Show more logs for debugging purposes (default: false) 25 | verbose: false, 26 | 27 | // Severity for verbose mode: (`info`, `warn`, `error`) 28 | severity: `info`, 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/images/site-meta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/styxlab/gatsby-starter-try-ghost/117f7a644d85ab1ba533fbf103e6a41808988732/src/images/site-meta.png -------------------------------------------------------------------------------- /starters.yml: -------------------------------------------------------------------------------- 1 | - url: https://styxlab.github.io 2 | repo: https://github.com/styxlab/gatsby-starter-try-ghost 3 | description: A Gatsby starter for creating blogs from headless Ghost CMS. 4 | tags: 5 | - Blog 6 | - CMS:Headless 7 | - SEO 8 | - Styling:PostCSS 9 | features: 10 | - Casper standard Ghost theme 11 | - Data sourcing from headless Ghost 12 | - Sticky navigation headers 13 | - Hover on author avatar 14 | - Responsive design 15 | - SEO optimized 16 | - Styled 404 page 17 | - OpenGraph structured data 18 | - Twitter Cards meta 19 | - Sitemap Generation 20 | - XML Sitemaps 21 | - Progressive Web App 22 | - Offline Support 23 | - RSS Feed 24 | - Composable and extensible 25 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/styxlab/gatsby-starter-try-ghost/117f7a644d85ab1ba533fbf103e6a41808988732/static/favicon.ico -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/styxlab/gatsby-starter-try-ghost/117f7a644d85ab1ba533fbf103e6a41808988732/static/favicon.png -------------------------------------------------------------------------------- /static/images/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | --------------------------------------------------------------------------------