Giter VIP home page Giter VIP logo

gatsby-theme-try-ghost's Introduction

gatsby-theme-try-ghost

Released under MIT license. gatsby-theme-try-ghost npm package version.

A Gatsby theme plugin for creating blogs from headless Ghost CMS.

Turn your Ghost blog into a flaring fast static website. This Gatsby theme is a frontend replacement of the Ghost handlebars engine featuring the standard Ghost Casper skin and functionality. All content is sourced from a headless Ghost CMS.

⚠️ I am no longer maintaining these plugins and am going to archive them soon.

🔥 Alternatives

Tired of gatsby-config.js? Check out Blogody for an integrated solution with many more benefits!

Favor Next.js over Gatsby? Head over to next-cms-ghost!

Tutorials ✨ 🆕

Check out the Tutorials for practical guides on using this project.

Demo

Play with the Demo to get a first impression.

Features

  • Ghost Casper look and feel
  • Feature & inline images with lazy-loading and blur-up effect 🚀 🆕
  • Infinite Scroll ✨
  • Featured posts pinned on top 🆕
  • Sticky navigation headers
  • Hover on author avatar
  • Styled 404 page
  • SEO optimized
  • Fully responsive
  • Advanced routing 🆕
  • Composable and extensible
  • Incremental build enabled 🚀 🆕

Plugins

Additional features can be integrated by installing Gatsby themes or plugins. The following plugins have been tested to work with gatsby-theme-try-ghost:

Name Version Description
gatsby-theme-ghost-dark-mode version Dark mode toggle 🌗
gatsby-rehype-ghost-links version Rewrite CMS links from absolute to relative
gatsby-rehype-inline-images 🆕 version Lazy-loading inline images with blur-up
gatsby-rehype-prismjs version Syntax highlighting with PrismJS
gatsby-theme-ghost-contact version Contact page
gatsby-theme-ghost-commento version Commenting system with Commento
gatsby-theme-ghost-toc 🆕 version Table of Contents
gatsby-theme-ghost-members 🆕 version Member Subscriptions
gatsby-plugin-ackee-tracker version Site tracking with Ackee
gatsby-plugin-google-analytics version Site tracking with Google Analytics
gatsby-theme-ghost-tags 🆕 version Tags page

Quick Start

Head over to the starter repo to get up and running quickly! The starter is recommended if you are creating a new site.

Installation

This mono repository contains the demo code, the base theme and add-ons. If you are here to install the Gatsby base theme plugin in your existing project, check out the theme specific README for further details. All add-ons can be found under the packages/ folder.

In case you want to work with this repository (for local development, pull requests, etc.):

  1. Clone or fork this repository:
git clone https://github.com/styxlab/gatsby-theme-try-ghost.git
cd gatsby-theme-try-ghost
  1. Run yarn to install dependencies.

  2. Run yarn develop to start the example locally.

Contributions

Special thanks go to the following contributors: marcoSven, jem, sawilde, tobimori, Torqu3Wr3nch and mf.

PRs are welcome! Consider contributing to this project if you are missing feature that is also useful for others. Explore this guide, to get some more ideas.

Credits

This project would not be possible without the great Gatsby, Ghost, React, GraphQL, Node and the JavaScript eco-system in general.

Disclaimer

This project is not affiliated with Gatsby or Ghost.

Copyright & License

Copyright (c) 2020 styxlab - Released under the MIT license.

gatsby-theme-try-ghost's People

Contributors

arthurgeek avatar atownsend247 avatar chancharles avatar el7cosmos avatar illogic-al avatar lamellama avatar m1guelpf avatar marcosven avatar motherfacker avatar savyajha avatar sawilde avatar styxlab avatar tobimori avatar unixisking avatar woodies11 avatar yanneves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gatsby-theme-try-ghost's Issues

TypeError: Cannot read property 'typeOrTypeDef' of undefined

Getting this error when trying to do gatsby build

error "gatsby-transformer-rehype" threw an error while running the createSchemaCustomization lifecycle:
Cannot read property 'typeOrTypeDef' of undefined
TypeError: Cannot read property 'typeOrTypeDef' of undefined

  • create-schema-customization.js:13 type

Gatsby CLI version: 2.11.15
Gatsby version: 2.22.15

After looking into the code it seems it's looking for plugin jamify-source-ghost which I don't have installed, which is why I think this error occurs. See code here:

const useTypeExists = (store, name) => type => {
  const types = store.getState().schemaCustomization.types;
  const plugin = types.find(node => node.plugin.name === name);
  const defs = plugin.typeOrTypeDef.definitions;
  const exists = defs.find(node => node.name.value === type);
  return exists !== undefined;
};

I would just comment this out normally, but I'm trying to do a CI/CD build and the build process is doing an npm install of all packages, including pulling in gatsby-transformer-rehype.
Could this be fixed?
Thank you!

deprecated warnings during install

Hello - trying to install and use ghost theme. During install I received errors relating to being deprecated.

npm WARN deprecated [email protected]: [...]
npm WARN deprecated [email protected]: [...]
npm WARN deprecated @babel/[email protected]: [...]
npm WARN deprecated [email protected]: [...]
npm WARN deprecated [email protected]: [...]
npm WARN deprecated [email protected]: [...]
npm WARN deprecated [email protected]: [...]

Later when I try to develop I get several more warnings and errors (attached) and not being able to develop.

Are the deprecated warning issues causing the later ones? I tried to search around and couldn't find many answers.

Thank you

ghostErrorsFull.txt

ERROR #98123 WEBPACK [...]
warn There are multiple modules with names that only differ in casing. [...]
the full output is attached.

Netifly build failed Error: connect ECONNREFUSED 127.0.0.1:2368

Hey, great tool, however I'm having troubles with building it on Netifly.

  1. Created a local ghost instance
  2. Did this npx npm gatsby new try-ghost https://github.com/styxlab/gatsby-starter-try-ghost
  3. Created .ghost json and configured it
  4. Created new GitHub repo here
  5. Git pushed
  6. Connected to Netifly and tried to build, but got the error log below.
5:08:56 PM: success onPreInit - 0.012s
5:08:56 PM: success delete html and css files from previous builds - 0.021s
5:08:56 PM: success initialize cache - 0.007s
5:08:56 PM: success copy gatsby files - 0.054s
5:08:56 PM: success onPreBootstrap - 0.008s
5:08:56 PM: success createSchemaCustomization - 0.031s
5:08:56 PM: info GhostPost/feature_image/data-schema/https://images.unsplash.com/photo-1532630571098-79a3d222b00d?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ&s=a88235003c40468403f936719134519d
5:08:56 PM: info GhostPage/feature_image/data-schema-page/https://images.unsplash.com/photo-1532630571098-79a3d222b00d?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ&s=a88235003c40468403f936719134519d
5:08:56 PM: error "gatsby-source-ghost" threw an error while running the sourceNodes lifecycle:
5:08:56 PM: connect ECONNREFUSED 127.0.0.1:2368
5:08:56 PM: 
5:08:56 PM:   Error: connect ECONNREFUSED 127.0.0.1:2368
5:08:56 PM: 
5:08:56 PM: not finished source and transform nodes - 0.142s
5:08:56 PM: Skipping functions preparation step: no functions directory set
5:08:56 PM: Caching artifacts
5:08:56 PM: Started saving node modules
5:08:56 PM: Finished saving node modules
5:08:56 PM: Started saving build plugins
5:08:56 PM: Finished saving build plugins
5:08:56 PM: Started saving yarn cache
5:08:56 PM: Finished saving yarn cache
5:08:56 PM: Started saving pip cache
5:09:03 PM: Finished saving pip cache
5:09:03 PM: Started saving emacs cask dependencies
5:09:03 PM: Finished saving emacs cask dependencies
5:09:03 PM: Started saving maven dependencies
5:09:03 PM: Finished saving maven dependencies
5:09:03 PM: Started saving boot dependencies
5:09:03 PM: Finished saving boot dependencies
5:09:03 PM: Started saving go dependencies
5:09:03 PM: Finished saving go dependencies
5:09:06 PM: Error running command: Build script returned non-zero exit code: 1
5:09:06 PM: Failing build: Failed to build site
5:09:06 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
5:09:06 PM: Finished processing build request in 1m11.637727655s

Any idea of what I'm doing wrong?

My config is available here.

Thanks.

Headline tags in content page not showing properly

Hi styxlab,

I found a little bug from dark mode plugin.

As you can see in content page there is some css not showing properly. When the dark mode is disable i couldn't be able to see headline in content page.

Screen Shot 2563-04-07 at 12 19 58

Commento server links provided through gatsby-theme-ghost-commento are lost after page reload

Hey there, thank you very much for all the work you've done so far for this theme as well as the array of accompanying plugins, they're really well made. I've started a blog using gatsby-starter-try-ghost as the base, and enabled both gatsby-rehype-ghost-links (enabled by default from the starter) and gatsby-theme-ghost-commento. I think there's a bug where any links in a page referencing the provided Commento server to gatsby-theme-ghost-commento gets rewritten to start from /, i.e. absolute links that are not exactly of the static site's host gets rewritten to be relative.

Here's a reproduction GIF:
bug

As you can see, when I start from my home page and click on a post, the Commento link is untouched and works. However, if you were to refresh directly from a page, that link (for commento.js) gets rewritten. I'm thinking this is possibly because my Commento server contains the same string as my static site, i.e. commento.monobytes.com contains the host of my static site server monobytes.com.

Infinite loading always loading up content from index, not tag or author pages

Hi there.
I'm currently in the works of porting our old Ghost theme to Gatsby. While doing that, I stumbled upon your packages.

I've implemented Infinite Scrolling on my theme (which can be found here - a live version is available here and noticed, that the infinite scrolling on the author and tag pages just uses the index content.

You can compare it with this instance, running our old, Ghost-based theme. The password is relaunch.

Remove the stub post by default in gatsby-transformer-rehype

I was surprised to suddenly have on my blog a "Data Schema" post. After some research, I found that's the stub Ghost uses to populate the GraphQL schema.

I noticed you added a special condition in the gatsby-transformer-rehype filter to remove this stub post. Maybe we should add this by default?

If we do not use gatsby-transformer-rehype, we don't get the stub post (I don't know why), so it makes sense to remove it by default if we use the transformer?

Props are not updated when navigating internal links

Hi,

Out of the box just installing gatsby-theme-try-ghost starter and connecting to my Ghost instance, I noticed that clicking through the main navigation of the site pointing to /tag/ links, updates the collection title and posts count displayed on the page, but posts are not updated. Hitting F5 and fully refreshing the collection page seems to work and correct posts are then displayed.

I think it might be related to gatsby-plugin-catch-links plugin, however bellow snippet in gastby-config.js doesn't seem to help.

{
      resolve: `gatsby-plugin-catch-links`,
      options: {
        excludePattern: /(tag)/,
      },
},

Could you please help to resolve this?

gatsby-rehype-ghost-links doesn't seem to update GhostPage items

Thanks for your work with all things Ghost. I'm having a hard time getting absolute links to be converted to relative using gatsby-rehype-ghost-links.

This is what I've done:

  1. Cloned a copy of https://github.com/styxlab/gatsby-starter-try-ghost
  2. Update my .ghost.json with my ghost server
  3. gatsby develop

I'm seeing that the post content gets relative links but not the pages. I've tried

  1. debugging the plugin and spitting out URLs that it's processing during the build, but it appears to be working correctly in that page content is getting run through the gatsby-rehype-ghost-links/gatsby-node.js functionality.
  2. gatsby repl but the nodes don't have updated links which I'm assuming occurs after the
  3. Plinking around with the graphql

I thought Netlify might build it differently so I sent it there but I'm seeing the same thing, relative links in the posts but not in the pages.

Any additional ideas on how to debug why pages aren't getting processed properly? As you can see I'm out of my league. Thank you for your pity. 😞

Page Not Found Error (404) on "tag" and "author" tabs

After removing all of the "ghost" user default post I get a Page Not Found Error (404) on the "tag" and "author" tabs.

The links dont seem to have updated as the links still point to the follow:

[domain]/tag/getting-started/
[domain]/author/ghost/

Screen Shot 2020-04-21 at 13 23 41

Suggestion: Move out hardcoded strings to separate files

Hi,

first of all, I wanted to let you know that I think you are doing an amazing job with this theme so far, it is exactly what I was looking for.

That being said, I am building a non-English site using your starter and I'm forced to shadow many of the components simply to translate the hardcoded english text strings inside. Could you please move those hard coded strings to a separate file, let's say strings.json so I only need to shadow that?

Also, I am looking to add a image zoom capability to the theme, I think something like this https://github.com/francoischalifour/medium-zoom would make a great addition to the list of theme plugins.

Feature images not shown

It's great news!!! Just tried it. There is an issue on the featured image. Featured image in desktop version disappears, but in the mobile version is fine. Let me show you:

This is my repo details:

Gatsby cloud log show some issue:

(node:6700) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

The GraphQL query in the non-page component "/usr/src/app/www/node_modules/gatsby-theme-try-ghost/src/templates/page.js" will not be run.

code block or inline code language not specified in html. applying generic code block

If you need, here is content and url api:

Originally posted by @KontenaIndonesia in #10 (comment)

Not applying custom theme!

Hi there Styxlab!

I've used your theme + gatsby + glitch for hosting + surge for deploy as a static website, but I've changed some details on the Casper theme and they are not being applied. On my panel admin, I've uploaded my new Casper theme, it shows correctly on my glitch but not when I deploy with surge in my domain. It keeps the default styles from the casper default eheme.

Any suggestion?

Include BasePath as option?

Is it possible to provide the basePath to this theme, in a similar way to the official Gatsby Blog Theme?
Ex:

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-theme-blog`,
      options: {
        // basePath defaults to `/`
        basePath: `/blog`,
      },
    },
  ],
}

Thank you for your time,
Andrés

Missing Dark Mode Toggle and Subscribe buttons

Hi,

I noticed that Dark Mode Toggle and Subscribe buttons are not being displayed in the header when using a starter. If I set defaultModeDark: true, dark mode is working, subscribe section is being displayed at the bottom of post pages, however buttons in the header are missing.

My gatsby-config.js file:

...

module.exports = {
  plugins: [
    {
      resolve: `gatsby-theme-try-ghost`,
      options: {
        ghostConfig: ghostConfig,
        siteConfig: siteConfig,
        routes: routesConfig,
      },
    },
    {
      resolve: `gatsby-theme-ghost-dark-mode`,
      options: {
        defaultModeDark: false,
        overrideOS: false,
      },
    },
    {
      resolve: `gatsby-theme-ghost-members`,
    },
    {
      resolve: `gatsby-transformer-rehype`,
      options: {
        filter: (node) => (
            node.internal.type === `GhostPost` ||
            node.internal.type === `GhostPage`
        ) && node.slug !== `data-schema`,
        plugins: [
          {
            resolve: `gatsby-rehype-ghost-links`,
          },
          {
            resolve: `gatsby-rehype-prismjs`,
          },
          {
            resolve: `gatsby-transformer-sharp-watermark`,
            options: {
              watermark: `/src/images/watermark.png`,
            },
          },
        ],
      },
    },
    {
      resolve: `gatsby-theme-ghost-toc`,
      options: {
        maxDepth: 2,
      },
    },
    {
      resolve: `gatsby-plugin-advanced-sitemap`,
      options: {
        addUncaughtPages: false,
      },
    },
  ],
};

Running on Windows

It was reported on #62 that installing this repository on windows did not work.

According to the Gatsby docs, it should be possible to run this project by using the Windows Subsystem for Linux (WSL).

Opened this issue to test / update this project so it runs on WSL without problems.

CSS clash with Commento

In screen.css:

.post-full-content pre {
    padding: 20px;
}

This padding affects any <pre> tags in Commento, so you get something like this:
image

On a side note, since Commento injects HTML into a source, should they have scoped their CSS or was it intentional to allow the user's CSS to apply to comments as well?

when use custom storage adapter, deploy in netlify is wrong

hi, there
my ghost site use ghost-qcloud-cos as image storage.
when i use this gatsby starter deploy in netlify ,something wrong
8:17:08 AM: Build ready to start 8:17:10 AM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774 8:17:10 AM: build-image tag: v3.3.7 8:17:10 AM: buildbot version: 11918e084194721d200458438c92ff8180b3b56c 8:17:10 AM: Fetching cached dependencies 8:17:10 AM: Starting to download cache of 158.8MB 8:17:10 AM: Finished downloading cache in 556.456063ms 8:17:10 AM: Starting to extract cache 8:17:16 AM: Finished extracting cache in 5.848886095s 8:17:16 AM: Finished fetching cache in 6.461083901s 8:17:16 AM: Starting to prepare the repo for build 8:17:17 AM: Preparing Git Reference refs/heads/master 8:17:17 AM: Starting build script 8:17:17 AM: Installing dependencies 8:17:18 AM: Started restoring cached node version 8:17:20 AM: Finished restoring cached node version 8:17:22 AM: v10.19.0 is already installed. 8:17:22 AM: Now using node v10.19.0 (npm v6.13.4) 8:17:23 AM: Attempting ruby version 2.6.2, read from environment 8:17:24 AM: Using ruby version 2.6.2 8:17:24 AM: Using PHP version 5.6 8:17:24 AM: Started restoring cached node modules 8:17:24 AM: Finished restoring cached node modules 8:17:24 AM: Started restoring cached yarn cache 8:17:24 AM: Finished restoring cached yarn cache 8:17:25 AM: Installing NPM modules using Yarn version 1.17.0 8:17:26 AM: yarn install v1.17.0 8:17:26 AM: [1/4] Resolving packages... 8:17:27 AM: [2/4] Fetching packages... 8:17:50 AM: info [email protected]: The platform "linux" is incompatible with this module. 8:17:50 AM: info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. 8:17:50 AM: info [email protected]: The platform "linux" is incompatible with this module. 8:17:50 AM: info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. 8:17:50 AM: [3/4] Linking dependencies... 8:17:50 AM: warning "gatsby > [email protected]" has unmet peer dependency "@types/react@^15.0.0 || ^16.0.0". 8:17:50 AM: warning "gatsby > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". 8:17:50 AM: warning "gatsby-theme-try-ghost > [email protected]" has incorrect peer dependency "[email protected]". 8:17:50 AM: warning "gatsby-theme-try-ghost > [email protected]" has incorrect peer dependency "[email protected]". 8:17:50 AM: warning "gatsby-theme-try-ghost > [email protected]" has unmet peer dependency "react-is@>= 16.8.0". 8:18:02 AM: [4/4] Building fresh packages... 8:18:08 AM: success Saved lockfile. 8:18:08 AM: Done in 42.20s. 8:18:08 AM: NPM modules installed using Yarn 8:18:08 AM: Started restoring cached go cache 8:18:08 AM: Finished restoring cached go cache 8:18:08 AM: unset GOOS; 8:18:08 AM: unset GOARCH; 8:18:08 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64'; 8:18:08 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}"; 8:18:08 AM: go version >&2; 8:18:08 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env'; 8:18:08 AM: go version go1.12 linux/amd64 8:18:08 AM: Installing missing commands 8:18:08 AM: Verify run directory 8:18:08 AM: Executing user command: gatsby build 8:18:11 AM: success open and validate gatsby-configs - 0.372s 8:18:12 AM: success load plugins - 0.917s 8:18:12 AM: success onPreInit - 0.012s 8:18:12 AM: success delete html and css files from previous builds - 0.015s 8:18:12 AM: success initialize cache - 0.009s 8:18:12 AM: success copy gatsby files - 0.036s 8:18:12 AM: success onPreBootstrap - 0.009s 8:18:12 AM: success createSchemaCustomization - 0.026s 8:18:13 AM: info GhostPost/feature_image/data-schema/https://images.unsplash.com/photo-1532630571098-79a3d222b00d?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ&s=a88235003c40468403f936719134519d 8:18:13 AM: info GhostPage/feature_image/data-schema-page/https://images.unsplash.com/photo-1532630571098-79a3d222b00d?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ&s=a88235003c40468403f936719134519d 8:18:14 AM: info GhostPage/feature_image/about///inote-1251069384.cos.ap-nanjing.myqcloud.com/ghost/content/images/2020/03/23b4df21fef4c2fc.jpg 8:18:14 AM: info GhostPage/feature_image/authors///inote-1251069384.cos.ap-nanjing.myqcloud.com/ghost/content/images/2020/03/85b74cc45c645c64.jpg 8:18:14 AM: info GhostPage/feature_image/menu///inote-1251069384.cos.ap-nanjing.myqcloud.com/ghost/content/images/2020/03/031c7c9fbb8e4e9c.jpg 8:18:14 AM: error Error processing images in node Ghost__Page__5e64f0c86d0b073a49216457: 8:18:14 AM: wrong url: //inote-1251069384.cos.ap-nanjing.myqcloud.com/ghost/content/images/2020/03/23b4df21fef4c2fc.jpg 8:18:14 AM: not finished source and transform nodes - 1.135s 8:18:14 AM: Skipping functions preparation step: no functions directory set 8:18:14 AM: Caching artifacts 8:18:14 AM: Started saving node modules 8:18:14 AM: Finished saving node modules 8:18:14 AM: Started saving yarn cache 8:18:14 AM: Finished saving yarn cache 8:18:14 AM: Started saving pip cache 8:18:14 AM: Finished saving pip cache 8:18:14 AM: Started saving emacs cask dependencies 8:18:14 AM: Finished saving emacs cask dependencies 8:18:14 AM: Started saving maven dependencies 8:18:14 AM: Finished saving maven dependencies 8:18:14 AM: Started saving boot dependencies 8:18:14 AM: Finished saving boot dependencies 8:18:14 AM: Started saving go dependencies 8:18:14 AM: Finished saving go dependencies 8:18:14 AM: failed during stage 'building site': Build script returned non-zero exit code: 1 8:18:14 AM: Error running command: Build script returned non-zero exit code: 1 8:18:14 AM: Failing build: Failed to build site 8:18:14 AM: Finished processing build request in 1m4.49301802s
but when i use gatsby-starter-ghost .everything ok .
you can try use Content API Key: c42581dd8dbdf0fc5608e4532d and URL https://inote.xyz

In-page footnote links lead to linked part getting hidden behind header

Problem: If I click on a footnote, I expect to be taken to the text of the footnote itself, but the text gets hidden behind the floating header. This doesn't happen with the table of contents which the toc plugin of this theme provides.

Example: On this page on my blog, we have various footnotes. An example would be the first footnote. However, if you go to the first footnote you'll see it gets hidden behind the header strip.

An example which gets it right (using headings, not footnotes) is the jamify.org blog. For example this link from jamify goes to the linked heading without it getting hidden behind the header strip.

Any chance of getting the same behaviour for footnotes as well?

Caveat: I see the same behaviour for footnotes in the default Casper theme.

Failed to compile

Hi there (again),

I just install ghost to MacBook and will pull the content to the your gatsby repo (offline). But the error appears.

There was an error in your GraphQL query:

Cannot query field "coverImageSharp" on type "GhostSettings".

If you don't expect "coverImageSharp" to exist on the type "GhostSettings" it is most likely a typo.
However, if you expect "coverImageSharp" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "coverImageSharp" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "GhostSettings":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: /Users/macbook/Gatsby/g222g/node_modules/gatsby-theme-try-ghost/src/components/common/HeaderIndex.js

There was an error in your GraphQL query:

Cannot query field "coverImageSharp" on type "GhostSettings".

If you don't expect "coverImageSharp" to exist on the type "GhostSettings" it is most likely a typo.
However, if you expect "coverImageSharp" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "coverImageSharp" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "GhostSettings":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: /Users/macbook/Gatsby/g222g/node_modules/gatsby-theme-try-ghost/src/components/common/Layout.js

There was an error in your GraphQL query:

Cannot query field "coverImageSharp" on type "GhostSettings".

If you don't expect "coverImageSharp" to exist on the type "GhostSettings" it is most likely a typo.
However, if you expect "coverImageSharp" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "coverImageSharp" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "GhostSettings":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: /Users/macbook/Gatsby/g222g/node_modules/gatsby-theme-try-ghost/src/components/common/meta/AuthorMeta.js

There was an error in your GraphQL query:

Cannot query field "coverImageSharp" on type "GhostSettings".

If you don't expect "coverImageSharp" to exist on the type "GhostSettings" it is most likely a typo.
However, if you expect "coverImageSharp" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "coverImageSharp" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "GhostSettings":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: /Users/macbook/Gatsby/g222g/node_modules/gatsby-theme-try-ghost/src/components/common/meta/WebsiteMeta.js

There was an error in your GraphQL query:

Cannot query field "coverImageSharp" on type "GhostSettings".

If you don't expect "coverImageSharp" to exist on the type "GhostSettings" it is most likely a typo.
However, if you expect "coverImageSharp" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "coverImageSharp" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "GhostSettings":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: /Users/macbook/Gatsby/g222g/node_modules/gatsby-theme-try-ghost/src/components/common/meta/ArticleMeta.js

There was an error in your GraphQL query:

Cannot query field "coverImageSharp" on type "GhostSettings".

If you don't expect "coverImageSharp" to exist on the type "GhostSettings" it is most likely a typo.
However, if you expect "coverImageSharp" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "coverImageSharp" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "GhostSettings":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: /Users/macbook/Gatsby/g222g/node_modules/gatsby-theme-try-ghost/src/components/common/SiteNav.js

Pass `tableOfContents` to rehype-plugins

First of all, thanks for your repo, it provides awesome resources to hack Ghost and to make it better. I love it!

I try to implement a custom tableOfContents for my posts but within the blog post. Hence, I wanted to replace a custom div with my toc markup:

<div id="toc"></div> -> <ul><li>Heading 1</li>...</ul>

I tried to write a gatsby-rehype-* plugin to visit my post html and replace my target div with my markup. However, I was surprised tableOfContents is not passed to plugins and only provided for the "end-user", Gatsby.

Do you think it's possible to make that field available to rehype-plugins?

If not, do you have a suggestion for my problem? I've seen the TableOfContents component shadowing in your example, but that's not what I want because the TOC would be outside of the article.

Thanks!

Cannot embedded gist github

Hello there, i try to embedded my gist into my post, i have done to embedded the gist script to my HTML component, but is not shown after i publish it.

Screen Shot 2020-03-17 at 17 07 57

Screen Shot 2020-03-17 at 17 06 34

cannot download nested images through gatsby-plugin-ghost-images

I can't figure out the proper syntax for providing the absolute path of images nested inside a node to gatsby-plugin-ghost-images.
This is where the image sits:

query MyQuery {
  ghostPost {
    primary_author {
      profile_image
    }
  }
}

And this is how I tried to pull it up in gatsby.config.js:

 {
            resolve: `gatsby-plugin-ghost-images`,
            options: {
                // An array of node types and image fields per node
                // Image fields must contain a valid absolute path to the image to be downloaded
                lookup: [
                    {
                        type: `GhostPost`,
                        imgTags: [
                            `feature_image`,
                            `./primary_author/profile_image`,
                        ],
                    },
                    {
                        type: `GhostPost/primary_author`,
                        imgTags: [`profile_image`],
                    },
                    {
                        type: `GhostPage`,
                        imgTags: [`feature_image`],
                    },
                    {
                        type: `GhostSettings`,
                        imgTags: [`cover_image`],
                    },
                    {
                        type: `GhostAuthor`,
                        imgTags: [`profile_image`],
                    },
                ],
                // Additional condition to exclude nodes
                // Takes precedence over lookup
                exclude: (node) => node.ghostId === undefined,
                // Additional information messages useful for debugging
                verbose: true,
                // Option to disable the module (default: false)
                disable: false,
            },
        },

While

{
  type: `GhostAuthor`,
  imgTags: [`profile_image`],
},

does download the image correctly, I'd like to access the image through GhostPost node. Is it possible?

Table Of Contents , Appearing over images

Screenshot_2020-05-30 Routing with Jamify

@styxlab Table of content in jamify looks great, But there are few issues like TOC appearing on top images. Also is it possible to give an option to hide/show, So that it won't distract people reading the posts .

Alternative pageNumber 0

How do I get the pageNumber 0 to show up at /blog instead of /?
In /src/gatsby-theme-try-ghost/gatsby-node.js I have changed to

    paginate({
        createPage,
        items: posts,
        itemsPerPage: postsPerPage,
        component: indexTemplate,
        pathPrefix: ({ pageNumber }) => {
            if (pageNumber === 0) {
                return `/blog`
            } else {
                return `/page`
            }
        },
    })

This seems to allow the index at /src/pages/index.js to load instead of the ghost pageNumber 0 but it does not display the ghost pageNumber 0 at /blog.

I am having difficulty with styling on my index page.
Not sure if it's a related of separate issue.

error (node:1835) [DEP0066] DeprecationWarning

Hi there,

I found error while installing on Gatsby Cloud. Let see this screenshot --> https://jmp.sh/Vbzpul8

22:43:58 PM: error (node:1835) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

22:43:59 PM: error Error processing images in node Ghost__Settings__1: undefined

Pull content from local storage

Hi there,

I'm running this theme on my Macbook. And I will publish my content, how to do that? I'm looking for the folder to put the content but did not found. Any Idea?

Can gatsby-plugin-feed be disabled?

I do not need an RSS feed at the moment and I am getting this error.
How can I disable gatsby-plugin-feed?

10:26:24 PM: error "gatsby-plugin-feed" threw an error while running the onPostBuild lifecycle:
10:26:24 PM: Cannot read property 'parent' of null
10:26:24 PM:   174 |             _options$feed = (0, _extends2.default)({}, options, {}, feed), setup = _options$feed.setup, locals = (0, _objectWithoutPropertiesLoose2.default)(_options$feed, ["setup"]);
10:26:24 PM:   175 |             serializer = feed.serialize && typeof feed.serialize === "function" ? feed.serialize : serialize;
10:26:24 PM: > 176 |             rssFeed = serializer(locals).reduce(function (merged, item) {
10:26:24 PM:       |                       ^
10:26:24 PM:   177 |               merged.item(item);
10:26:24 PM:   178 |               return merged;
10:26:24 PM:   179 |             }, new _rss.default(setup(locals)));
10:26:24 PM: 
10:26:24 PM:   TypeError: Cannot read property 'parent' of null
10:26:24 PM:   
10:26:24 PM:   - parse.js:69 Function.exports.update
10:26:24 PM:     [repo]/[cheerio]/lib/parse.js:69:26
10:26:24 PM:   
10:26:24 PM:   - parse.js:19 module.exports
10:26:24 PM:     [repo]/[cheerio]/lib/parse.js:19:11
10:26:24 PM:   
10:26:24 PM:   - static.js:27 Function.exports.load
10:26:24 PM:     [repo]/[cheerio]/lib/static.js:27:14
10:26:24 PM:   
10:26:24 PM:   - generate-feed.js:8 generateItem
10:26:24 PM:     [repo]/[gatsby-theme-try-ghost]/src/utils/rss/generate-feed.js:8:33
10:26:24 PM:   
10:26:24 PM:   - generate-feed.js:49 allGhostPost.edges.map.edge
10:26:24 PM:     [repo]/[gatsby-theme-try-ghost]/src/utils/rss/generate-feed.js:49:102
10:26:24 PM:   
10:26:24 PM:   - Array.map
10:26:24 PM:   
10:26:24 PM:   - generate-feed.js:49 serialize
10:26:24 PM:     [repo]/[gatsby-theme-try-ghost]/src/utils/rss/generate-feed.js:49:72
10:26:24 PM:   
10:26:24 PM:   - gatsby-node.js:176 _callee2$
10:26:24 PM:     [repo]/[gatsby-plugin-feed]/gatsby-node.js:176:23
10:26:24 PM:   
10:26:24 PM:   - next_tick.js:68 process._tickCallback
10:26:24 PM:     internal/process/next_tick.js:68:7
10:26:24 PM:   
10:26:24 PM: 
10:26:24 PM: not finished onPostBuild - 0.181s
10:26:24 PM: (sharp:1430): GLib-CRITICAL **: 05:26:24.522: g_hash_table_lookup: assertion 'hash_table != NULL' failed
10:26:24 PM: (sharp:1430): GLib-CRITICAL **: 05:26:24.612: g_hash_table_lookup: assertion 'hash_table != NULL' failed
10:26:24 PM: Skipping functions preparation step: no functions directory set
10:26:24 PM: Caching artifacts
10:26:24 PM: Started saving node modules
10:26:24 PM: Finished saving node modules
10:26:24 PM: Started saving yarn cache
10:26:24 PM: Finished saving yarn cache
10:26:24 PM: Started saving pip cache
10:26:24 PM: Finished saving pip cache
10:26:24 PM: Started saving emacs cask dependencies
10:26:25 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
10:26:24 PM: Finished saving emacs cask dependencies
10:26:24 PM: Started saving maven dependencies
10:26:25 PM: Finished saving maven dependencies
10:26:25 PM: Shutting down logging, 7 messages pending

Cannot shadow gatsby-theme-try-ghost/src/utils/fragments.js

I'm unable to shadow gatsby-theme-try-ghost/src/utils/fragments.js. I've created <site-name>/src/gatsby-theme-try-ghost/utils/fragments.js which differs thus:

@@ -166,16 +166,6 @@ export const ghostPostFields = graphql`
             tableOfContents
         }
 
-        # ImgSharp
-        featureImageSharp {
-            base
-            childImageSharp {
-                fluid(maxWidth: 1040) {
-                    ...GatsbyImageSharpFluid
-                }
-            }
-        }
-
     }
 `
 
@@ -278,15 +268,6 @@ export const ghostPageFields = graphql`
             tableOfContents
         }
 
-        # ImgSharp
-        featureImageSharp {
-            base
-            childImageSharp {
-                fluid(maxWidth: 1040) {
-                    ...GatsbyImageSharpFluid
-                }
-            }
-        }
     }
 `
 
@@ -313,15 +294,5 @@ export const ghostSettingsFields = graphql`
             label
             url
         }
-
-        # ImgSharp
-        coverImageSharp {
-            base
-            childImageSharp {
-                fluid(quality: 90, maxWidth: 1920) {
-                    ...GatsbyImageSharpFluid
-                }
-            }
-        }
     }
 `

Unfortunately whenever I try to run gatsby develop I get this issue: Found two different GraphQL fragments with identical name "GhostPostFields". Fragment names must be unique.

However, if I apply these differences to the original file in <site-name>/node_modules/gatsby-theme-try-ghost/src/utils/fragments.js then it works.

gatsby-plugin-google-analytics won't get loaded

Cloned the started repo and added the following to my gatsby-config.js in the plugin section:

        {
            resolve: `gatsby-plugin-google-analytics`,
            options: {
                // The property ID; the tracking code won't be generated without it
                trackingId: `my property ID on google analytics platform`,
            },
        },

No page has the google analytics js script present in the HTML output.

Cannot query field "mediaUrl" on type "ghostConfig".

Hi,

Thanks for this theme. When I try to run either build or develop on version 1.32.2, here's the error I get:

ERROR #85923  GRAPHQL

There was an error in your GraphQL query:

Cannot query field "mediaUrl" on type "ghostConfig".

If you don't expect "mediaUrl" to exist on the type "ghostConfig" it is most likely a typo.
However, if you expect "mediaUrl" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "mediaUrl" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "ghostConfig":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: node_modules/gatsby-theme-try-ghost/src/utils/use-options.js:8:13

The error does not happen in version 1.32.0.

Integrating Discourse with Gatsby Ghost blog

Hey,

I really liked the starter theme youve created based on the casper theme. i see that youve used commento but Im currently trying to figure out how to use discourse (which i already have running) as a commenting system for my gastby based ghost site.

Any help is highly appreciated.

Inline images in blog post not sourced from /static but from original Ghost website

Just learning to use this project, and so far I love it! My site is quite a bit faster and handles load tests better than the original Ghost site did, along with many other improvements. Thanks for the awesome work!

I run Ghost via a Docker container, which is available on the internet at one URL (ghost.justin.palpant.us). That ghost blog is marked as Private. I use that URL as the target in my .ghost.json, and then build another Docker image this Gatsby starter repo. I then run the Gatsby Docker image on another URL, justin.palpant.us

I noticed, however, that when I put an image into my Ghost blog, inline, using the Image or Gallery tools, those images aren't being served from the statically built site, but instead still use the original Ghost URLs, ghost.justin.palpant.us/content/images/...

Screenshot 2020-04-26 17 28 35

I'd definitely prefer not to need the Ghost blog to be up at all and to have 100% of the content served from the static Gatsby site. Post header images do work this way, with the header image being stored in the Gatsby image and served from a relative static path from the Gatsby site.

An example of images being served from the original Ghost can be seen in a post I just made about messing around with my GPUs:

Screenshot 2020-04-26 17 34 58

Whereas post header images can be served from /static:
Screenshot 2020-04-26 17 36 14

Now, I have to admit, I have only the vaguest idea of how this Gatsby site generator works - aside from the fact that gatsby build somehow downloads the content of my Ghost blog using the Content API, I'm lost. But I thought I'd check - is this expected behavior, that Image and Gallery sections will be sourced with original full URLs?

Happy to help with any additional information or contributions if I can!

Unknown type "HtmlRehype".

After upgrading yarn packages my project fails to build.

Project Repo: https://github.com/danielclough/TranslateJPN-Gatsby

"apiUrl": "https://admin.translateJPN.com",
"contentApiKey": "91e212b71a04a5ef13a8b63ba4"

 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "HtmlRehype".

File: node_modules/gatsby-theme-try-ghost/src/utils/fragments.js:154:20


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "HtmlRehype".

File: node_modules/gatsby-theme-try-ghost/src/utils/fragments.js:263:20


 ERROR #85908  GRAPHQL

There was an error in your GraphQL query:

The fragment "GhostPostFields" does not exist.

  36 |
  37 | export const pageQuery = graphql`
  38 |   query GhostNotFoundQuery {
  39 |     allGhostPost(
  40 |         sort: { order: DESC, fields: [published_at] },
  41 |         limit: 3,
  42 |         skip: 0
  43 |     ) {
  44 |       edges {
  45 |         node {
> 46 |           ...GhostPostFields
     |           ^^^^^^^^^^^^^^^^^^
  47 |         }
  48 |       }
  49 |     }
  50 |   }
  51 | `
  52 |

Did you mean to use "GhostTagFields"?

File: node_modules/gatsby-theme-try-ghost/src/pages/404.js


 ERROR #85908  GRAPHQL

There was an error in your GraphQL query:

The fragment "GhostPostFields" does not exist.

  47 |             ...GhostAuthorFields
  48 |         }
  49 |         allGhostPost(
  50 |             sort: { order: DESC, fields: [published_at] },
  51 |             filter: {authors: {elemMatch: {slug: {eq: $slug}}}},
  52 |             limit: $limit,
  53 |             skip: $skip
  54 |         ) {
  55 |             edges {
  56 |                 node {
> 57 |                 ...GhostPostFields
     |                 ^^^^^^^^^^^^^^^^^^
  58 |                 }
  59 |             }
  60 |         }
  61 |     }
  62 | `
  63 |
  64 | export default Author
  65 |

Did you mean to use "GhostTagFields"?

File: node_modules/gatsby-theme-try-ghost/src/templates/author.js


 ERROR #85908  GRAPHQL

There was an error in your GraphQL query:

The fragment "GhostPostFields" does not exist.

  48 | // The `limit` and `skip` values are used for pagination
  49 | export const pageQuery = graphql`
  50 |   query GhostPostQuery($limit: Int!, $skip: Int!) {
  51 |     allGhostPost(
  52 |         sort: { order: DESC, fields: [published_at] },
  53 |         limit: $limit,
  54 |         skip: $skip
  55 |     ) {
  56 |       edges {
  57 |         node {
> 58 |           ...GhostPostFields
     |           ^^^^^^^^^^^^^^^^^^
  59 |         }
  60 |       }
  61 |     }
  62 |   }
  63 | `
  64 |

Did you mean to use "GhostTagFields"?

File: node_modules/gatsby-theme-try-ghost/src/templates/index.js


 ERROR #85908  GRAPHQL

There was an error in your GraphQL query:

The fragment "GhostPageFields" does not exist.

  67 |         }).isRequired,
  68 |     }).isRequired,
  69 |     location: PropTypes.object.isRequired,
  70 | }
  71 |
  72 | export default Page
  73 |
  74 | export const postQuery = graphql`
  75 |     query($slug: String!) {
  76 |         ghostPage(slug: { eq: $slug }) {
> 77 |             ...GhostPageFields
     |             ^^^^^^^^^^^^^^^^^^
  78 |         }
  79 |     }
  80 | `
  81 |

Did you mean to use "GhostTagFields"?

File: node_modules/gatsby-theme-try-ghost/src/templates/page.js


 ERROR #85908  GRAPHQL

There was an error in your GraphQL query:

The fragment "GhostPostFields" does not exist.

  123 |     }).isRequired,
  124 |     location: PropTypes.object.isRequired,
  125 |     pageContext: PropTypes.object,
  126 | }
  127 |
  128 | export default Post
  129 |
  130 | export const postQuery = graphql`
  131 |     query($slug: String!, $prev: String!, $next: String!, $tag: String!, $limit: Int!, $skip: Int!) {
  132 |         post: ghostPost(slug: { eq: $slug }) {
> 133 |             ...GhostPostFields
      |             ^^^^^^^^^^^^^^^^^^
  134 |         }
  135 |         prev: ghostPost(slug: { eq: $prev }) {
  136 |             ...GhostPostFields
  137 |         }
  138 |         next: ghostPost(slug: { eq: $next }) {
  139 |             ...GhostPostFields
  140 |         }
  141 |         allGhostPost(
  142 |             sort: { order: DESC, fields: [published_at] },
  143 |             filter: {slug: { ne: $slug },tags: {elemMatch: {slug: {eq: $tag}}}},

Did you mean to use "GhostTagFields"?

File: node_modules/gatsby-theme-try-ghost/src/templates/post.js


 ERROR #85908  GRAPHQL

There was an error in your GraphQL query:

The fragment "GhostPostFields" does not exist.

  126 | }
  127 |
  128 | export default Post
  129 |
  130 | export const postQuery = graphql`
  131 |     query($slug: String!, $prev: String!, $next: String!, $tag: String!, $limit: Int!, $skip: Int!) {
  132 |         post: ghostPost(slug: { eq: $slug }) {
  133 |             ...GhostPostFields
  134 |         }
  135 |         prev: ghostPost(slug: { eq: $prev }) {
> 136 |             ...GhostPostFields
      |             ^^^^^^^^^^^^^^^^^^
  137 |         }
  138 |         next: ghostPost(slug: { eq: $next }) {
  139 |             ...GhostPostFields
  140 |         }
  141 |         allGhostPost(
  142 |             sort: { order: DESC, fields: [published_at] },
  143 |             filter: {slug: { ne: $slug },tags: {elemMatch: {slug: {eq: $tag}}}},
  144 |             limit: $limit,
  145 |             skip: $skip
  146 |         ) {

Did you mean to use "GhostTagFields"?

File: node_modules/gatsby-theme-try-ghost/src/templates/post.js


 ERROR #85908  GRAPHQL

There was an error in your GraphQL query:

The fragment "GhostPostFields" does not exist.

  129 |
  130 | export const postQuery = graphql`
  131 |     query($slug: String!, $prev: String!, $next: String!, $tag: String!, $limit: Int!, $skip: Int!) {
  132 |         post: ghostPost(slug: { eq: $slug }) {
  133 |             ...GhostPostFields
  134 |         }
  135 |         prev: ghostPost(slug: { eq: $prev }) {
  136 |             ...GhostPostFields
  137 |         }
  138 |         next: ghostPost(slug: { eq: $next }) {
> 139 |             ...GhostPostFields
      |             ^^^^^^^^^^^^^^^^^^
  140 |         }
  141 |         allGhostPost(
  142 |             sort: { order: DESC, fields: [published_at] },
  143 |             filter: {slug: { ne: $slug },tags: {elemMatch: {slug: {eq: $tag}}}},
  144 |             limit: $limit,
  145 |             skip: $skip
  146 |         ) {
  147 |             edges {
  148 |                 node {
  149 |                 ...GhostPostFields

Did you mean to use "GhostTagFields"?

File: node_modules/gatsby-theme-try-ghost/src/templates/post.js


 ERROR #85908  GRAPHQL

There was an error in your GraphQL query:

The fragment "GhostPostFields" does not exist.

  139 |             ...GhostPostFields
  140 |         }
  141 |         allGhostPost(
  142 |             sort: { order: DESC, fields: [published_at] },
  143 |             filter: {slug: { ne: $slug },tags: {elemMatch: {slug: {eq: $tag}}}},
  144 |             limit: $limit,
  145 |             skip: $skip
  146 |         ) {
  147 |             edges {
  148 |                 node {
> 149 |                 ...GhostPostFields
      |                 ^^^^^^^^^^^^^^^^^^
  150 |                 }
  151 |             }
  152 |         }
  153 |     }
  154 | `
  155 |

Did you mean to use "GhostTagFields"?

File: node_modules/gatsby-theme-try-ghost/src/templates/post.js


 ERROR #85908  GRAPHQL

There was an error in your GraphQL query:

The fragment "GhostPostFields" does not exist.

  49 |             ...GhostTagFields
  50 |         }
  51 |         allGhostPost(
  52 |             sort: { order: DESC, fields: [published_at] },
  53 |             filter: {tags: {elemMatch: {slug: {eq: $slug}}}},
  54 |             limit: $limit,
  55 |             skip: $skip
  56 |         ) {
  57 |             edges {
  58 |                 node {
> 59 |                 ...GhostPostFields
     |                 ^^^^^^^^^^^^^^^^^^
  60 |                 }
  61 |             }
  62 |         }
  63 |     }
  64 | `
  65 |

Did you mean to use "GhostTagFields"?

File: node_modules/gatsby-theme-try-ghost/src/templates/tag.js

failed extract queries from components - 1.893s

gatsby-plugin-ghost-images won't work

WSL dev environment.

node -v
v12.16.3
yarn -v
1.22.4

Followed the intructions: clonerd the repo, issued yarn and then yarn develop.
The build process spits out a lot of


 ERROR #85923  GRAPHQL

There was an error in your GraphQL query:

Cannot query field "featureImageSharp" on type "GhostPost".

If you don't expect "featureImageSharp" to exist on the type "GhostPost" it is most likely a typo.
However, if you expect "featureImageSharp" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "featureImageSharp" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "GhostPost":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: ../packages/gatsby-theme-try-ghost/gatsby-node.js:187:26


 ERROR #11321  PLUGIN

"gatsby-theme-try-ghost" threw an error while running the createPages lifecycle:

Cannot query field "featureImageSharp" on type "GhostPost". Did you mean "feature_image"?

GraphQL request:106:17
105 |                 # ImgSharp
106 |                 featureImageSharp {
    |                 ^
107 |                     base

  189 |     // Check for any errors
  190 |     if (result.errors) {
> 191 |         throw new Error(result.errors)
      |               ^
  192 |     }
  193 | 
  194 |     // Extract query results

File: ../packages/gatsby-theme-try-ghost/gatsby-node.js:191:15



  Error: Cannot query field "featureImageSharp" on type "GhostPost". Did you mean "feature_image"?
  GraphQL request:106:17
  105 |                 # ImgSharp
  106 |                 featureImageSharp {
      |                 ^
  107 |                     base
  
  - gatsby-node.js:191 Object.exports.createPages
    /home/enrico/gatsby-theme-try-ghost/packages/gatsby-theme-try-ghost/gatsby-node.js:191:15
  

failed createPages - 0.082s

It seems that the plugin gatsby-plugin-ghost-images isn't working or isn't event getting loaded.

Attacched the full log.
out.log

Issue with the starter

Hi, how are you?
I am using your starter. I did everything right until the adding api keys step.
I didn't find the .ghost.json file and according to the starter(or to me) i am supposed to define the apis in siteconfig. Could you kindly help me by showing me how and where to put the apis. Is there something i should add to the siteconfig or to the main gatsby-config file?
try { ghostConfig = require(./.ghost) } catch (e) { ghostConfig = { development: { apiUrl: process.env.GHOST_API_URL, contentApiKey: process.env.GHOST_CONTENT_API_KEY, }, production: { apiUrl: process.env.GHOST_API_URL, contentApiKey: process.env.GHOST_CONTENT_API_KEY, }, } } finally { const { apiUrl, contentApiKey } = process.env.NODE_ENV === development ? ghostConfig.development : ghostConfig.production if (!apiUrl || !contentApiKey || contentApiKey.match(/<key>/)) { ghostConfig = null //allow default config to take over } }

here's both my site config and gatsby config

athcms gatsby config file
athcms site config file

failed Building static HTML for pages

Can not build the site when i was using my own ghost content API (.ghost.json)

jempurich/gatsby-starter-try-ghost@1452214

Please check my deploy log below.
Screen Shot 2563-04-10 at 19 01 29

error Building static HTML failed for path "/init/"
6:37:53 PM: 10 | const PreviewPosts = ({ posts, primaryTagCount, prev, next }) => {
6:37:53 PM: 11 | const primaryTag = posts && posts[0] && posts[0].node && posts[0].node.primary_tag
6:37:53 PM: > 12 | const url = routing(primaryTag.url, primaryTag.slug)
6:37:53 PM: | ^
6:37:53 PM: 13 |
6:37:53 PM: 14 | return (
6:37:53 PM: 15 |


6:37:53 PM:
6:37:53 PM: WebpackError: TypeError: Cannot read property 'url' of undefined
6:37:53 PM:
6:37:53 PM: - PreviewPosts.js:12 PreviewPosts6:37:53 PM: node_modules/gatsby-theme-try-ghost/src/components/common/PreviewPosts.js:12 :36

Newsletter signup integration

Thanks for the good work on the starter. I am using it and it "just works".
Do you know if it is possible to integrate an email newsletter signup using something like Formspree?

Define a CDN from which images do not get processed

Hi,

I've been using Ghost with the Cloudinary plugin, and I'd like to switch to using this project. However, I've found that it processes images from Cloudinary and stores them as well. Is it possible to get gatsby to not process images coming from a particular domain? Or to not process images at all?

Because if I try to disable the gatsby-plugin-ghost-images then the entire build stops working.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.