Comments (6)
Hey @SvenAlHamad! You sure can change the color palette in this theme. You'll want to shadow gatsby-theme-apollo-core/utils/colors
.
You can check out all of the available keys in the linked file. If you want to keep most of the colors intact but only change a few of them, you can shadow the file like so:
// src/gatsby-theme-apollo-core/utils/colors.js
const {colors} = require('gatsby-theme-apollo-core/src/utils/colors');
exports.colors = {
...colors, // spread in default color values
primary: '#ff0000' // change the primary color to red
};
Here's what the result of this change looks like:
from gatsby-theme-apollo.
that was it it! gonna play with it some more. Thanks again for this package!
from gatsby-theme-apollo.
@trevorblades thanks for this. whats the next step after adding that colors.js file? do I need to edit something in the gatsby-config?
from gatsby-theme-apollo.
@wrod7 you shouldn't need to edit anything in your Gatsby config once you set up your custom colors.js file. Just restart your build and you should see the new colors 👍
Let me know if you're seeing something different!
from gatsby-theme-apollo.
@trevorblades took a few restarts also had something wrong in the gatsby-config but its good now. thanks!
im having trouble setting up component shadowing. is there something in the config i need to change to make it shadowing work?
here is my tree:
|-- source
|-- index.mdx
|-- src
|-- assets
|-- custom-logo.svg
|-- gatsby-theme-apollo
|-- components
|-- logo.js
|-- gatsby-theme-apollo-core
|-- utils
|-- colors.js
|-- gatsby-config.js
here is my config:
const themeOptions = require('gatsby-theme-apollo-docs/theme-options');
module.exports = {
pathPrefix: '/docs',
plugins: [
{
resolve: 'gatsby-theme-apollo-docs',
options: {
...themeOptions,
root: __dirname,
siteName: 'Docs',
subtitle: 'Platform',
description: 'Description',
githubRepo: '...',
spectrumPath: '...',
sidebarCategories: {
null: ['index'],
},
},
},
],
};
from gatsby-theme-apollo.
@wrod7 you've almost got it! If you want to shadow the logo, you'll want to do that in your src/gatsby-theme-apollo-core
directory rather than the gatsby-theme-apollo
one. I realized that the core theme docs were still telling users to shadow the logo in the way that you are, so I updated that section: https://github.com/apollographql/gatsby-theme-apollo/tree/master/packages/gatsby-theme-apollo-core#logotitle
Your directory structure should look like this when you're done:
|-- source
|-- index.mdx
|-- src
|-- assets
|-- custom-logo.svg
|-- gatsby-theme-apollo-core
|-- components
|-- logo.js
|-- utils
|-- colors.js
|-- gatsby-config.js
And your logo.js
file could look like this:
export {ReactComponent as default} from '../assets/custom-logo.svg';
from gatsby-theme-apollo.
Related Issues (20)
- navConfig not showing up HOT 1
- Changing the sidebar on a per page basis (per set of pages) HOT 2
- Content not loading in development environment HOT 2
- dark-mode for documentation website. HOT 2
- Compatibility with Gatsby V3 HOT 1
- Issues with running on Windows local machine vs Docker container
- Don't use Link with external links HOT 1
- Improve mobile code snippet viewing
- Update links to community HOT 3
- Cannot query field "image" on type "MarkdownRemarkFields". HOT 11
- Upgrade -core and -docs from Gatsby v2 HOT 8
- Monorepo documentation issues with navigation HOT 1
- a vulnerability CVE-2020-15168 is introduced in gatsby-theme-apollo-docs
- Any way to customize primsjs config?
- Adding sub menus to the left side nav
- Query results timing out after 15 seconds
- In example: Error: error:0308010C:digital envelope routines::unsupported HOT 2
- Allow L and R sidebars to be collapsed
- Can't make it run because of missing dependency and errors HOT 2
- Invalid plugins - Example no usable anymore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-theme-apollo.