You can find a demo here
TODO
This repository is a monorepo managed using Lerna.
- ❤️ Gatsby
Made with 🎆 in Chicago by North x South
Gatsby Plugin Pantry 🤤
Home Page: https://gatsby-pantry-starter-demo.netlify.com/
License: MIT License
You can find a demo here
TODO
This repository is a monorepo managed using Lerna.
Made with 🎆 in Chicago by North x South
Hi there, I am trying to get a link list of all categories, or a tag-cloud which links to the corresponding lists.
How can I do that? My current query looks like this, but groups only the fieldValue
and not the slug to the /tag/_MYTAG
or /category/_MYCATEGORY
tags: allMarkdownRemark(filter: { frontmatter: { title: { ne: "" } } }) {
group(field: frontmatter___tags) {
fieldValue
totalCount
edges {
node {
fields {
tags
}
frontmatter {
tags
}
}
}
}
}
Sadly it's not possible to use gatsby-plugin-categories
with a custom slugify function. It would be great if the future plugin development goes for a more flexible approach, i.e. like gatsby-plugin-node-fields, allowing some configuration for example in gatsby-node.js
.
I ran gatsby new tags https://github.com/rmcfadzean/gatsby-pantry.git
and then opened the ./examples/starter-blog
folder. I ran yarn install
and then gatsby develop
. The gatsby develop command failed. Output and "UNHANDLED REJECTION" error shown below.
##Output from yarn install
:
PS C:\repos\gatsby\tags\examples\starter-blog> yarn install
yarn install v1.22.0
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: Invalid bin field for "url-loader".
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.14.7".
warning "gatsby > [email protected]" has incorrect peer dependency "[email protected]".
warning "gatsby > @
##Output from gatsby develop
PS C:\repos\gatsby\tags\examples\starter-blog> gatsby develop -p 8002
success open and validate gatsby-configs - 0.190 s
⠋ load plugins
ERROR
UNHANDLED REJECTION Unable to find plugin "gatsby-source-all-contributors". Perhaps you need to install its package?
Error: Unable to find plugin "gatsby-source-all-contributors". Perhaps you need to install its package?
- load.js:109 resolvePlugin
[starter-blog]/[gatsby]/dist/bootstrap/load-plugins/load.js:109:11
- load.js:152 processPlugin
[starter-blog]/[gatsby]/dist/bootstrap/load-plugins/load.js:152:20
- load.js:171 config.plugins.forEach.plugin
[starter-blog]/[gatsby]/dist/bootstrap/load-plugins/load.js:171:20
- Array.forEach
- load.js:170 module.exports
[starter-blog]/[gatsby]/dist/bootstrap/load-plugins/load.js:170:20
- index.js:58 module.exports
[starter-blog]/[gatsby]/dist/bootstrap/load-plugins/index.js:58:19
- index.js:138 module.exports
[starter-blog]/[gatsby]/dist/bootstrap/index.js:138:34
I copy pasted everything from the example-blog to my page, tags
and slug
are showing up in fields
but categories
not
There was an error in your GraphQL query:
Field "category" is not defined by type MarkdownRemarkFieldsFilterInput.
File: /Users/jan/Coding/React/page.com/src/templates/blog-category.js
There was an error in your GraphQL query:
Field "slug" is not defined by type MarkdownRemarkFieldsFilterInput.
File: /Users/jan/Coding/React/page.com/src/templates/blog-post.jsx
There was an error in your GraphQL query:
Cannot query field "slug" on type "MarkdownRemarkFields".
If you don't expect "slug" to exist on the type "MarkdownRemarkFields" it is most likely a typo.
However, if you expect "slug" to exist there are a couple of solutions to common problems:
´´´
Why does it not render?
`category: "Some Category"` are in each of my ".md" files
"gatsby": "^2.22.15",
"gatsby-plugin-categories": "^2.3.7",
"gatsby-plugin-tags": "^2.3.7",
If there is only one tag for the site, the plugin throws an exception 'TypeError: tags.map is not a function' because the tags value is interpreted as a string rather than an array.
What is the reference in category.js:
import PostListing from "../components/PostListing";
Is there an additional package to be installed?
git clone
cd into folder
npm install && gatsby develop
ERROR #10226 CONFIG
Couldn't find the "gatsby-source-all-contributors" plugin declared in "/Users/jan/Downloads/gatsby-pantry-master/examples/starter-blog/gatsby-config.js".
Tried looking for a local plugin in /Users/jan/Downloads/gatsby-pantry-master/examples/starter-blog/plugins/gatsby-source-all-contributors.
Tried looking for an installed package in the following paths:
- /Users/jan/Downloads/gatsby-pantry-master/examples/starter-blog/node_modules/gatsby/dist/bootstrap/load-themes/node_modules/gatsby-source-all-contributors
- /Users/jan/Downloads/gatsby-pantry-master/examples/starter-blog/node_modules/gatsby/dist/bootstrap/node_modules/gatsby-source-all-contributors
- /Users/jan/Downloads/gatsby-pantry-master/examples/starter-blog/node_modules/gatsby/dist/node_modules/gatsby-source-all-contributors
- /Users/jan/Downloads/gatsby-pantry-master/examples/starter-blog/node_modules/gatsby/node_modules/gatsby-source-all-contributors
- /Users/jan/Downloads/gatsby-pantry-master/examples/starter-blog/node_modules/gatsby-source-all-contributors
- /Users/jan/Downloads/gatsby-pantry-master/examples/node_modules/gatsby-source-all-contributors
- /Users/jan/Downloads/gatsby-pantry-master/node_modules/gatsby-source-all-contributors
- /Users/jan/Downloads/node_modules/gatsby-source-all-contributors
- /Users/jan/node_modules/gatsby-source-all-contributors
- /Users/node_modules/gatsby-source-all-contributors
- /node_modules/gatsby-source-all-contributors
not finished open and validate gatsby-configs - 0.051s
Hi,
I used the popular gatsby-starter-blog and then trying to use your plugin.
I have multiple errors: There is not Posts
, no ../layout
, no ../components/PostListing
At first I also have an error with the path.
that does not exist, but I could replace it with
name: "posts",
path: `${__dirname}/content/blog`,
Maybe the issue is with the gatsby-starter-blog (1097 stars) ? Since you plugins (tags & categories) seems to be well aligned with the documentation https://www.gatsbyjs.org/docs/adding-tags-and-categories-to-blog-posts/ ?
PostListing
is missing too. I only found it in https://github.com/Vagr9K/gatsby-advanced-starter/blob/master/src/components/PostListing/PostListing.jsx for example. But not even sure if it is the right one ...
Pls read this issues.
gatsbyjs/gatsby#16058
some one can change URL example for correctly ?
I'm seeing an inconsistency in how tag pages are created, and I really don't understand what is going on. In most cases, after doing a yarn build
, the only tags in the public/tags/
directory are from one page in src/pages/
, although a few of them have tags. The resulting tags are also inconsistent, as if only one of the pages' tags is being used.
The following repo exhibits the problem: https://github.com/tamouse/gatsby-tamouse-blog/tree/components in the components
branch.
I've forced in the public/
directory into the repo, so the limited number of tag pages can be shown.
I installed NodeJS with the Windows Installer, have:
node --version
v12.13.1
npm --version
6.12.1
npm install -g gatsby-cli
npm WARN deprecated [email protected]: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm view gatsby version
2.18.5
gatsby -v
Gatsby CLI version: 2.8.14
Installed the starter blog:
gatsby new tagtest https://github.com/gatsbyjs/gatsby-starter-blog
...
Your new Gatsby site has been successfully bootstrapped. Start developing it by running:
cd tagtest
gatsby develop
That much works as expected.
I tried to install tags:
https://github.com/rmcfadzean/gatsby-pantry/tree/master/packages/gatsby-plugin-tags
Gatsby plugin to automatically create index pages for tagged content
Install
yarn add gatsby-plugin-tags
That failed with hundreds of version errors. I learned you can't intermix npm with yarn! So I tried again:
npm install gatsby-plugin-tags
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\rimraf.cmd as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\rimraf
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\rimraf as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\rimraf
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\semver.cmd as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\semver
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\semver as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\semver
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\regjsparser.cmd as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\regjsparser
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\regjsparser as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\regjsparser
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\mime.cmd as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\mime
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\mime as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\mime
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\jsesc.cmd as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\jsesc
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\jsesc as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\jsesc
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\detect.cmd as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\detect-port
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\detect-port.cmd as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\detect-port
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\detect as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\detect-port
npm WARN rm not removing C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules.bin\detect-port as it wasn't installed by C:\Users\loren\Documents\Psychoros\Gatsby Test\tagtest\node_modules\detect-port
...
- [email protected]
added 364 packages from 117 contributors, removed 255 packages, updated 1753 packages and audited 23669 packages in 146.151s
found 0 vulnerabilities
Most plugins say you need to edit the gatsby-config.js file in the website’s root directory.
So I added:
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `src/utils/typography`,
},
},
// 191201LA
{
resolve: "gatsby-plugin-tags",
options: {
template: `${__dirname}/src/templates/post.jsx`
},
},
// endLA
],
}
I improvised that from another plugin.
Obviously some part of this doesn't work in gatsby develop:
...
ERROR #85901 GRAPHQLThere was an error in your GraphQL query:
Cannot query field "tags" on type "MarkdownRemarkFields".
File: node_modules\gatsby-plugin-tags\gatsby-node.js:65:22
ERROR #11321 PLUGIN
"gatsby-plugin-tags" threw an error while running the createPages lifecycle:
Cannot read property 'allMarkdownRemark' of undefined
TypeError: Cannot read property 'allMarkdownRemark' of undefined
defaults.js:24 transformer
[tagtest]/[gatsby-plugin-tags]/defaults.js:24:14gatsby-node.js:66 Object.createPages
[tagtest]/[gatsby-plugin-tags]/gatsby-node.js:66:17--> failed createPages - 0.231s
...
boundActionCreators is deprecated. Please use actions instead. For migration instructions, see https://gatsby.dev/boundActionCreators
Check the following files:
⠀
tagtest/node_modules/gatsby-plugin-sharp/gatsby-node.js
tagtest/node_modules/gatsby-plugin-sharp/index.js
tagtest/node_modules/gatsby-plugin-sharp/scheduler.js
tagtest/node_modules/gatsby/dist/bootstrap/index.js
tagtest/node_modules/gatsby/dist/bootstrap/page-hot-reloader.js
tagtest/node_modules/gatsby/dist/commands/build.js
tagtest/node_modules/gatsby/dist/commands/develop.js
tagtest/node_modules/gatsby/dist/internal-plugins/internal-data-bridge/gatsby-node.js
tagtest/node_modules/gatsby/dist/query/file-parser.js
tagtest/node_modules/gatsby/dist/query/index.js
tagtest/node_modules/gatsby/dist/query/query-runner.js
tagtest/node_modules/gatsby/dist/query/query-watcher.js
tagtest/node_modules/gatsby/dist/redux/actions/index.js
tagtest/node_modules/gatsby/dist/utils/api-node-helpers-docs.js
tagtest/node_modules/gatsby/dist/utils/api-runner-node.js
tagtest/node_modules/gatsby/dist/utils/source-nodes.js
tagtest/node_modules/redux/dist/redux.js
tagtest/node_modules/redux/es/redux.js
tagtest/node_modules/redux/lib/redux.js
tagtest/node_modules/redux/src/bindActionCreators.js
⠀
pathContext is deprecated. Please use pageContext instead. For migration instructions, see https://gatsby.dev/pathContext
Check the following files:
⠀
tagtest/node_modules/gatsby/cache-dir/commonjs/page-renderer.js
tagtest/node_modules/gatsby/cache-dir/commonjs/static-entry.js
tagtest/node_modules/gatsby/cache-dir/page-renderer.js
tagtest/node_modules/gatsby/cache-dir/static-entry.js
tagtest/node_modules/gatsby/dist/commands/develop.js
⠀
success Building development bundle - 34.004s
The original starter pages still appear, but obviously the tags part is broken. Maybe my yarn disaster left something bad in the project? Maybe some of those version warnings really matter? Maybe I'm doing something newbily stupid?
Maybe I need to give up on the starter blog I have and use this one?
https://github.com/rmcfadzean/gatsby-pantry/tree/master/examples/starter-blog
I'd really appreciate any clues!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.