Skip to content
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

fix(gatsby-source-drupal): allow specifying disallowed link types #19930

Merged
merged 1 commit into from
Dec 4, 2019

Conversation

mglaman
Copy link
Contributor

@mglaman mglaman commented Dec 3, 2019

Description

Adds a disallowedLinkTypes setting that allows you to exclude specific link types.

By default it excludes self and describedby, meeting the current state. This allows skipping link types on /jsonapi. This way someone could exclude certain resource links from being crawled, so it actually allows someone to add performance enhancements when building.

I've added a test fixture and test.

Related Issues

Fixes #19921
Relates #19867
Relates #19879

@mglaman mglaman requested a review from a team as a code owner December 3, 2019 04:41
larowlan
larowlan previously approved these changes Dec 3, 2019
Copy link
Contributor

@larowlan larowlan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I have a question about the use of lodash in 2019

@larowlan
Copy link
Contributor

larowlan commented Dec 3, 2019 via email

@muescha
Copy link
Contributor

muescha commented Dec 4, 2019

I miss a documentation in the plugin readme

@mglaman mglaman requested a review from a team as a code owner December 4, 2019 03:53
@mglaman
Copy link
Contributor Author

mglaman commented Dec 4, 2019

Added information to the README

Copy link
Contributor

@pvdz pvdz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

The only changes are whitespace related. Can you check whether Prettier ran at all? It's benign but prevents future (unrelated) changes by these files when Prettier does run on them.

Good to merge otherwise!


You can use the `disallowedLinkTypes` option to skip link types found in JSON:API documents. By default it skips the `self` and `describedby` links, which do not provide data that can be sourced. You may override the setting to add additional link types to be skipped.

```javascript
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip: you can use ```js here ;) But ```javascript also works so it's fine either way.

Copy link
Contributor

@pvdz pvdz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind previous comments. Turns out we don't format fixtures :)
Thanks!

@pvdz pvdz merged commit 238b9fc into gatsbyjs:master Dec 4, 2019
@mglaman mglaman deleted the mglaman-19921 branch December 5, 2019 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide disallowed links setting for the Drupal source plugin
5 participants