Gatsby: [v2] Verify that all stub articles actually exist

Created on 13 Aug 2018  Β·  15Comments  Β·  Source: gatsbyjs/gatsby

There are several docs I've found that are defined in doc-links.yaml as stubs, but that don't have corresponding stub Markdown files. For example, I'm pretty sure none of the stubs under "Sourcing Content and Data" exist.

We need to do a once-over to ensure that the stubs exist to avoid 404s.

Docs that need to be created:

  • [x] /docs/docs/unit-testing.md
  • [x] /docs/docs/testing-components-with-graphql.md
  • [x] /docs/docs/end-to-end-testing.md
  • [x] /docs/docs/testing-css-in-js.md
  • [x] /docs/docs/testing-react-components.md
  • [x] /docs/docs/adding-search.md
  • [x] /docs/docs/adding-third-party-services.md
  • [x] /docs/docs/adding-analytics.md
  • [x] /docs/docs/adding-forms.md

The stub template is here:

https://github.com/gatsbyjs/gatsby/blob/151b1f9a7e1dac890779941db24eff9f35900b8c/docs/docs/authentication-tutorial.md

For anyone who'd like to open a PR, you can add one or more of these stubs in a pull request. This is a great way for first-timers to get involved!

cc: @shannonbux @amberleyromo @kkemple

good first issue help wanted documentation

Most helpful comment

Looks great, @kartiklad β€” merged! Thanks so much for your help! πŸ’ͺπŸ’œ

All 15 comments

I'll take care of it πŸ‘πŸΌ

Can we run a link checker to make sure we're not missing anything once this is done?

Update robots.txt temporarily so we can run the broken link checker.

https://github.com/stevenvachon/broken-link-checker seems to work locally with current robots.txt
currently running it with blc -g -r -f -e https://next.gatsbyjs.org (recursively + only internal links) and it produces:

Getting links from: https://next.gatsbyjs.org/docs/
...
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/post-css/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/testing/
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/unit-testing/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/testing-components-with-graphql/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/end-to-end-testing/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/testing-css-in-js/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/testing-react-components/ (HTTP_404)
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/debugging/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/debugging-html-builds/

Just after a while I'm getting some ERRNO_ECONNRESET which I think my connection can't handle all the concurrent requests

All right, I probably tried to do too much - here are broken links from /docs page (with some false negatives because of my connection) - but enough to spot actual broken links

Getting links from: https://next.gatsbyjs.org/docs/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-starters/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/recipes/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/overview/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/preparing-your-environment/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/basic-hardware-software-requirements/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/browser-support/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-on-macs/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-on-windows/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/deploying-and-hosting/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/preparing-for-deployment/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/deploy-gatsby/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/path-prefix/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/how-gatsby-works-with-github-pages/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/customization/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/babel/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/add-custom-webpack-config/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/custom-html/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/environment-variables/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/api-proxy/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/images-and-files/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/adding-images-fonts-files/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/static-folder/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/dropping-images-into-static-folders/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/importing-single-files/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/importing-media-content/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-source-filesystem-programmatic-import/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/working-with-images/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/content-and-data/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/sourcing-from-the-filesystem/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/sourcing-from-databases/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/sourcing-from-saas-services/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/sourcing-from-private-apis/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/headless-cms/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/sourcing-from-netlify-cms/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/sourcing-from-wordpress/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/sourcing-from-drupal/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/sourcing-from-contentful/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/sourcing-from-prose/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/graphql/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/introducing-graphiql/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/creating-and-modifying-pages/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/page-query/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/static-query/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/adding-markdown-pages/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/adding-a-list-of-markdown-blog-posts/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/creating-slugs-for-pages/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/programmatically-create-pages-from-data/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/plugins/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/plugin-authoring/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/submit-to-plugin-library/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/source-plugin-tutorial/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/styling/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/css-modules/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/typography-js/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/glamor/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/styled-components/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/creating-global-styles/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/component-css/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/post-css/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/testing/
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/unit-testing/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/testing-components-with-graphql/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/end-to-end-testing/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/testing-css-in-js/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/testing-react-components/ (HTTP_404)
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/debugging/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/debugging-html-builds/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/debugging-replace-renderer-api/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/debugging-the-build-process/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/performance-tracing/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/building-apps-with-gatsby/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/progressive-web-app/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/creating-dynamically-rendered-navigation/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/authentication/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/e-commerce/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/interactive-pages/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/preparing-for-site-launch/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/add-404-page/
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/adding-search/ (ERRNO_ECONNRESET)
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/adding-tags-and-categories-to-blog-posts/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/creating-a-sitemap/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/linking-between-pages/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/seo/
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/adding-third-party-services/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/adding-search/ (HTTP_undefined)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/adding-analytics/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/adding-forms/ (HTTP_404)
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/performance/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/caching/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/local-https/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/lighthouse-audit/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-link/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/node-apis/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/browser-apis/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/ssr-apis/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-config/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/actions/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/graphql-reference/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/node-interface/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/api-specification/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/v2-release-notes/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/v1-release-notes/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/v0-release-notes/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/migrating-from-v1-to-v2/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/migrating-from-v0-to-v1/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-core-philosophy/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/life-and-times-of-a-gatsby-build/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/building-with-components/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-lifecycle-apis/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/prpl-pattern/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/querying-with-graphql/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/authentication-tutorial/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/ecommerce-tutorial/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/wordpress-source-plugin-tutorial/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/image-tutorial/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/community/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/code-of-conduct/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/how-to-contribute/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/contributor-swag/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/how-to-file-an-issue/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/how-to-label-an-issue/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/how-to-submit-a-pr/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/pair-programming/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-style-guide/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/design-principles/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/rfc-process/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/templates/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/how-to-run-a-gatsby-workshop/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/how-to-pitch-gatsby/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/submit-a-blogpost/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/site-showcase-submissions/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/submit-to-starter-showcase/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/glossary/
β”œβ”€β”€β”€OK─── https://next.gatsbyjs.org/docs/gatsby-cli/
Finished! 189 links found. 55 excluded. 10 broken.

Great! Thanks for this, @pieh!

It took 30 minutes, but I got the full site output from that tool, if anyone is interested.

https://gist.github.com/amberleyromo/78ad2efaabeac53208626a16b8b7e047

I have what I need for the docs work though. Thanks y'all

@amberleyromo Seems like the list has a lot of Broken links. Happy to help if you need! :)

We'd love to have your help, @kartiklad! I'm not sure that everything in @amberleyromo's report is actually broken; I think that tool sent back a lot of false positives. The checklist at the top of this issue is a better starting point.

Thanks so much for contributing! πŸ’ͺπŸ’œ

Awesome! I’ll get on it and send a PR soon...cheers!

These ones should all work now and I've updated the checklist at the top of the issue:

β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/unit-testing/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/testing-components-with-graphql/
(HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/end-to-end-testing/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/testing-css-in-js/ (HTTP_404)
β”œβ”€BROKEN─ https://next.gatsbyjs.org/docs/testing-react-components/ (HTTP_404)

On Fri, Aug 17, 2018 at 1:39 AM, Kartik Lad notifications@github.com
wrote:

Awesome! I’ll get on it and send a PR soon...cheers!

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gatsbyjs/gatsby/issues/7294#issuecomment-413784249,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ae9o2nER0i0CcdthEZlsmPrcB1mW-0daks5uRnMjgaJpZM4V7dsW
.

Looks like the "Adding Third Party Services" overview and its children are
the only things broken. Also, "Adding Search" exists, but in a different section of the docs! We need to just move it to "Adding Third Party Services", I suppose. I'm not sure if that's the right choice.

@jlengstorf, the "Sourcing content and data" section works for me. Does it still not work for you?

Also, wondering if we ought to rename
https://next.gatsbyjs.org/docs/headless-cms/ to "Sourcing from Headless
CMSs" <--does that pluralization bother anyone else on a nav bar? It's not
my favorite. We could do "Sourcing from a Headless CMS". Once we agree on
whether/which title change to do, I can do it and then add a redirect.

@shannonbux I think "Sourcing from a Headless CMS" sounds better

Hey @shannonbux @jlengstorf,

Just made a pull request(#7432) to add the missing pages and also moved the Adding search page to 3rd party services. Hope it's ok?

Looks great, @kartiklad β€” merged! Thanks so much for your help! πŸ’ͺπŸ’œ

Was this page helpful?
0 / 5 - 0 ratings