-
Notifications
You must be signed in to change notification settings - Fork 157
Benface/Nextra #319
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
Merged
Merged
Benface/Nextra #319
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1c18407
Run `pnpm lint` in PR CI/CD
benface 977689d
Fix Prettier check
benface 7a9ad6e
Fix lint by getting rid of alias imports
benface 6dcfd41
Fix search by moving `.env` to `website` package
benface 66271c0
Fix “Edit page” link as `pagePath` now includes `pages/`
benface ee25bef
Shouldn’t need to repeat default value of `SITE_URL` (it’s already in…
benface 8c22460
Don’t use `inset` for better Safari support (unrelated to Nextra)
benface a0717fa
Update `lint`, `lint:fix`, and `typecheck` scripts
benface e8baaf6
Revert "Fix lint by getting rid of alias imports"
benface 82c66e5
fix eslint warnings
dimaMachina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,12 +16,12 @@ export const EditPageLink = ({ mobile = false, ...props }: EditPageLinkProps) => | |
| // If the current page is in a language other than English, link to the English version, as translations are handled by Crowdin | ||
| const { pagePath: _pagePath } = useContext(NavContext)! | ||
| const pagePathSegments = _pagePath.split('/') | ||
| pagePathSegments[0] = ['en', '[locale]'].includes(pagePathSegments[0]) ? pagePathSegments[0] : 'en' | ||
| pagePathSegments[1] = ['en', '[locale]'].includes(pagePathSegments[1]) ? pagePathSegments[1] : 'en' | ||
| const pagePath = pagePathSegments.join('/') | ||
|
|
||
| return ( | ||
| <Link | ||
| href={`https://github.com/graphprotocol/docs/blob/main/pages/${pagePath}`} | ||
| href={`https://github.com/graphprotocol/docs/blob/main/website/${pagePath}`} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice catch for edit on github, forget to test it |
||
| target="_blank" | ||
| sx={{ | ||
| display: 'block', | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /** @type {import('next-sitemap').IConfig} */ | ||
| module.exports = { | ||
| siteUrl: process.env.SITE_URL || 'https://thegraph.com/docs/', | ||
| siteUrl: process.env.SITE_URL, | ||
| generateIndexSitemap: false, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| {/* _app.mdx is not typesafe but _app.tsx is. | ||
| _app.mdx is used in nextra for better performance and smallest bundle size. | ||
| */} | ||
| {/* _app.mdx is not typesafe but _app.tsx is. */} | ||
| {/* _app.mdx is used in nextra for better performance and smallest bundle size. */} | ||
|
|
||
| export { default } from '../components/_app' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benface we should use
&&instead, otherwise, it's not fails if some command fails, e.g.eslint --max-warnings 0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, oops. I guess I just find it annoying that if e.g. Prettier fails, the TS errors are not even shown. Maybe Prettier should be last?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I guess the following commands
typecheck->eslint->prettierwill be better