Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icon, ghost_head, and ghost_foot to data-stub file #18

Closed
aileen opened this issue Jan 11, 2019 · 4 comments
Closed

Add icon, ghost_head, and ghost_foot to data-stub file #18

aileen opened this issue Jan 11, 2019 · 4 comments
Assignees
Labels
enhancement Improvement/enhancement of existing features

Comments

@aileen
Copy link
Member

aileen commented Jan 11, 2019

Because the publication icon and the code injections are not populated by default for new Ghost instances, they are populated as null from the gatsby-source-ghost plugin. Using these properties then in GraphQL queries causes the build to break.

This is a known issue with GraphQL and being tracked for this repository here: TryGhost/gatsby-source-ghost#2

Due to this issue we created a data-stub file which needs to be imported before you connect the starter with your own Ghost installation.

This data-stub file needs to be amended to insert an icon (preferably favicon.png), as well as some dummy site codeinjection content.

Whereas this change is pretty easy to do, it needs to be discussed and thought through, what data we want to inject and how to prevent overwriting existing one.

Once, the data-stub file is extended, we need to include those three properties in the fragments file.

@aileen aileen changed the title Add icon, ghost_head, and ghost_foot to data-stub.json file Add icon, ghost_head, and ghost_foot to data-stub file Jan 11, 2019
@aileen aileen self-assigned this Jan 11, 2019
@aileen aileen added the enhancement Improvement/enhancement of existing features label Jan 11, 2019
@aileen
Copy link
Member Author

aileen commented Jan 11, 2019

The main issue I see here is that the chance of someone having a custom icon || codeinjection already in place is very high. Adding those values to the data-stub file would cause it to overwrite their custom data which is not a nice solution.

One - very simple - solution could just be to write instructions in our README and explain that those fields need to be populated manually by the user.

Even tho icon is currently not used in this starter by default, it should be available at least.

Depending on the outcome of #20 the usage of ghost_head and ghost_foot might not be needed within our GraphQL schema, as it will be available in the global site config.

@ErisDS
Copy link
Member

ErisDS commented Jan 11, 2019

I think logo is also affected?

@aileen
Copy link
Member Author

aileen commented Jan 14, 2019

I think logo is also affected?

Yes, can be. I didn't include this initially, as it gets populated by default for new Ghost installs.

@aileen
Copy link
Member Author

aileen commented Jan 16, 2019

This will be fixed with an update to gatsby-source-ghost, which includes a workaround to populate the Gatsby GraphQL schema without the fields being populated.

@aileen aileen closed this as completed in 1dc66a9 Jan 16, 2019
aaromp pushed a commit to aaromp/aaronward.info that referenced this issue Jun 20, 2022
closes TryGhost#18

- Updates to the version 3.2.0 of gatsby-source-ghost, which makes the need for the data-stub file unnecessary
- Include missing fields in settings fragment
- Remove data stub recommendation from README
tinstack pushed a commit to tinstack/gatsby-starter-ghost that referenced this issue Sep 6, 2024
closes TryGhost#18

- Updates to the version 3.2.0 of gatsby-source-ghost, which makes the need for the data-stub file unnecessary
- Include missing fields in settings fragment
- Remove data stub recommendation from README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement/enhancement of existing features
Projects
None yet
Development

No branches or pull requests

2 participants