gatsby-theme | M O N O R E P O for Gatsby themes | Theme library
kandi X-RAY | gatsby-theme Summary
kandi X-RAY | gatsby-theme Summary
M O N O R E P O for Gatsby themes
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gatsby-theme
gatsby-theme Key Features
gatsby-theme Examples and Code Snippets
Community Discussions
Trending Discussions on gatsby-theme
QUESTION
I'm studying GatsbyJS. I use this cool template
https://www.gatsbyjs.com/starters/LekoArts/gatsby-starter-portfolio-jodie
I have been trying to change my original logo and I wrote below. seems like 2nd line is fine. but The logo won't show up. And Another things during this logo changing somehow datsby develop command stoped. When I was editing sentences It's fine. But when I was starting to chang logo gatsby develop stop often. Could you teach me please?
UPDATE
Current error
ValidationError: Invalid configuration object. Webpack has been initialized using a con figuration object that does not match the API schema.
- configuration.module.rules[10].exclude: The provided value "src/@lekoarts/gatsby-the me-jodie/icons/svg/" is not an absolute path!
...gatsby-config.js
ANSWER
Answered 2022-Jan-21 at 06:53You are declaring your component (Logo
) with the same name than the imported asset (import {ReactComponent as Logo} from './logo.svg'
, named as Logo
).
First of all, try changing the names like:
QUESTION
I'm familiar with cloning git projects. But I'm struggling to clone a Gatsby project, https://github.com/MunifTanjim/gatsby-theme-dox, and then run the website locally.
I run git clone https://github.com/MunifTanjim/gatsby-theme-dox
Then it downloads
I go into the correct directly, and I've tried
gatsby build
This works
then
gatsby develop
I get the following error:
...ANSWER
Answered 2021-Dec-28 at 05:54Once you clone the repository you need to install the dependencies. cd
to the root of your project and run npm install
or yarn install
.
gatsby build
and gatsby develop
, like all Gatsby commands, must be run in the root of your project, where the package.json
is located. Otherwise, it will throw an exception.
In your case, run the following in order:
QUESTION
I've followed this helpful answer: how do you clone a git Gatsby project and run it locally? to load up a demo Gatsby project on git.
But I get the following error:
...ANSWER
Answered 2021-Dec-20 at 19:25Then I added a
404.html
page to thedemo/public
directory since
The /public
folder is the one that is automatically generated in each build from the code from the source (/src
) folder. You must not place code there, otherwise, in each build, it will be lost. Take a look at the docs:
/public
Automatically generated. The output of the build process will be exposed inside this folder. Should be added to the.gitignore
file if not added already.
If you want to create a custom 404 page, you can create one by creating a 404.js
file inside src/pages
.
Regarding your main issue, the fact that the output spots a localhost:9000
(port 9000) indicates that you used gatsby build
, not gatsby develop
(otherwise the port would be the 8000). Using the first one (gatsby build
) you'll need to rebuild the whole site to see the changes while running gatsby develop
you'll see instantly the changes you made (unless you change the data sources) because of the hot reload feature.
Your issue appears because there's no socket.io.js
file, so it throws a 404 error (not found).
I'd suggest:
- Refresh the cache by running
gatsby clean
- Make sure the
yarn install
or thenpm install
finished without errors (all dependencies installed properly) - Run gatsby develop
- Make some "live" changes and once you feel comfortable enough proceed with the following commands.
- Run again
gatsby build
- Serve the site by
gatsby serve
(this will make your site live locally underlocalhost:9000
)
More recommendations can be found in this GitHub thread.
I'd recommend you, as I pointed in your previous answer, read the gatsby-cli
docs to know what you are doing in each command.
QUESTION
I can't seem to get this project running on my new Macbook Pro:
https://github.com/apollographql/gatsby-theme-apollo/tree/main/packages/gatsby-theme-apollo-docs
This is the command to run:
npm install gatsby-theme-apollo-docs
I get all of these "could not resolve dependency" warnings, I have tried running:
npm audit fix
and
npm audit fix --force
But still cannot get this project to run. This is what it says when I run it:
...ANSWER
Answered 2021-Nov-02 at 13:55First off, I see that you've used sudo
in your code block above, which could cause issues, and is probably not what you want.
It seems likely to me that the issue is with peer dependency resolution. Though npm audit
will flag potential vulnerabilities, but your application shouldn't fail because you haven't run it. The peer dependencies required by gatsby-theme-apollo-docs@v5.3.1 are gatsby@^2.13.80
, react@>=16.9.0
, and react-dom@>=16.9.0
. But it seems as though you have other packages installed which have incompatible requirements on these libraries (specifically the react
). For instance:
QUESTION
I am using the @lekoarts gatsby-theme-minimal-blog
. You can view my code here:
https://github.com/CodyWMitchell/my-site
I feel like I am losing hair because of how much time I have spent trying to get this working. I am running Gatsby
locally, and I've somehow successfully shadowed the footer component. I want to shadow the header component, but for some reason nothing is working at all.
In the lekoarts theme, the footer is in the same folder location as the header component, but when I add a file called header.tsx
to overwrite the other header.tsx
in the same location as the footer that is successfully shadowing nothing happens. I tried adding it in every other possible place I can think of, restarting the local build, and I'm at my wits end.
Here's the kicker, when I remove footer.tsx from the local src directory I added it to, It gives me an error now? Why would it give me an error for a file not existing that wasn't even there in the theme to begin with until I added it?
I really (really) want to give a static site generator a shot, but this feels extremely frustrating for something that should be simple, and it's discouraging me for suggesting something like this for any kind of complex project.
Any help or advice would be much appreciated.
...ANSWER
Answered 2021-Nov-05 at 09:21Try to clean .cache
folder and re-run the dev. Every time you "shadow" or change the components in theme folder, you should do it.
Just run gatsby clean
or npm run clean
- I saw that script in your repo.
QUESTION
Currently I am having trouble having gatsby build my HTML renderer due to my poor config knowledge. I tried finding examples online of configs and read the documentation but can't seem to get the order right here.
...ANSWER
Answered 2021-Sep-12 at 09:05You are mixing configurations between gatsby-node.js
and gatsby-config.js
. webpack-related configuration must be placed in gatsby-node.js
while all plugin-related stuff must be placed in gatsby-config.js
. Your final configuration should look like this:
In your gatsby-node.js
:
QUESTION
This app was originally built using react, however we have decided to convert everything over and use Gatsbyjs. I am new to Gatsby and I am trying to get my images to render correctly using the artist data. Here is how this part of the data was originally built:
...ANSWER
Answered 2021-Jun-08 at 05:16Your data, when using page queries, is always under props.data
so your nesting should look like:
QUESTION
I am using a gatsby starter gatsby-theme-carbon. It has a switcher component whose code is available here. It looks like this Switcher screenshot.
How do I disable the Switcher completely using component shadowing ? ( i.e. I don't want the Switcher at all in my website).
Thanks in advance for the help.
...ANSWER
Answered 2021-Jun-05 at 09:50As you can see in Shadowing in Gatsby themes docs:
This feature allows users to replace a file in the
src
directory that is included in the webpack bundle with their own implementation. This works for React components, pages insrc/pages
, JSON files, TypeScript files, as well as any other imported file (such as.css
) in your site.
The shadowing API uses a deterministic file structure approach to know which component should or shouldn't be rendered. In your case, you just can override the CSS props
to display it as none, or you just shadow and return an empty component, since shadowing is used to extend Gatsby themes. Create a src/gatsby-theme-blog/components/Switcher/Switcher.js
in your project and do something like:
QUESTION
- Problem Summary
There are two .gif images in my blog post, which are breaking the responsiveness of my site, they don't seem to get resized when opened on a mobile device. Although they seem to be fine when opened from pc.
PC view:
Mobile view:
As you can see, in mobile view the two .gif images are still the same size, which breaks the responsiveness of the page. Is there a way I could solve this issue?
The syntax I've used to include the .gif in my .mdx file is-
![otter dancing with a fish](./neural_net_data_manupulation_2.gif)
- Config.js file of my site:
ANSWER
Answered 2021-Feb-15 at 15:34The HTML on the question's page shows that the GIF images for figure 6(a) and 6(b) are not responsive.
Here is the HTML for figure 6(a):
QUESTION
I'm using both plugins, gatsby-theme-i18n and gatsby-theme-i18n-react-i18next
I think gatsby-theme-i18n-react-i18next
work fine. But gatsby-theme-i18n
for markdown files don't work, possibly I don't understand well enough so
I can change language for Layout
, Template
(gatsby-theme-i18n-react-i18next) but I can't change language for markdowns
(gatsby-theme-i18n)
I toggle between en
// th
to change language like so
gatsby-config.js
...ANSWER
Answered 2021-Feb-08 at 08:46Based on the template of the i18next official documentation you need to provide the locale in your template query:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gatsby-theme
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page