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
AileenCGN opened this Issue Jan 11, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@AileenCGN
Copy link
Member

AileenCGN 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.

@AileenCGN AileenCGN created this issue from a note in Launch (Icebox) Jan 11, 2019

@AileenCGN AileenCGN 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

@AileenCGN AileenCGN self-assigned this Jan 11, 2019

@AileenCGN AileenCGN removed this from Icebox in Launch Jan 11, 2019

@AileenCGN

This comment has been minimized.

Copy link
Member

AileenCGN 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

This comment has been minimized.

Copy link
Member

ErisDS commented Jan 11, 2019

I think logo is also affected?

@AileenCGN

This comment has been minimized.

Copy link
Member

AileenCGN 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.

@AileenCGN

This comment has been minimized.

Copy link
Member

AileenCGN 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.

@AileenCGN AileenCGN closed this in 1dc66a9 Jan 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment