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

1/4 Nextra v3 with i18n by locale folders #504

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ module.exports = {
// Only lint the English pages because the Markdown for the other languages is auto-generated from English (via Crowdin).
// But include all languages when running the ESLint extension in VS Code (in case the user has "eslint.validate": ["mdx"]),
// otherwise there will be random errors since the non-English files don't match any ruleset.
files: [`website/pages/${!isVSCode ? 'en/' : ''}**/*.{md,mdx}`],
files: [`website/pages/${isVSCode ? '' : 'en/'}**/*.{md,mdx}`],
excludedFiles: [
`website/pages/${isVSCode ? '' : 'en/'}developing/graph-ts/*.md`,
`website/pages/${isVSCode ? '' : 'en/'}querying/graph-client/*.md`,
],
benface marked this conversation as resolved.
Show resolved Hide resolved
parser: 'eslint-mdx',
processor: 'mdx/remark',
plugins: ['mdx'],
Expand Down
20 changes: 4 additions & 16 deletions .github/workflows/ci-cd-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 20
packageManager: pnpm
Comment on lines -22 to -25
Copy link
Contributor

Choose a reason for hiding this comment

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

How does it know which version of Node to use if we don't specify it? (As for pnpm, I guess it either looks at which lockfile exists or at package.json's packageManager.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

shared-config/setup@v1 looks packageManager field to understand which package manager and version to use.
and about Node.js it looks .node-version or .nvmrc file. @saihaj @enisdenjo correct me if I am wrong

Copy link
Member

Choose a reason for hiding this comment

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

shared-config/setup@v1 looks packageManager field to understand which package manager and version to use

Yes.

Node.js it looks .node-version or .nvmrc file

Not automatically, you have to provide either the node-version or node-version-file to the action.

uses: the-guild-org/shared-config/setup@v1

- name: Install dependencies
run: pnpm install
Expand All @@ -43,10 +40,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 20
packageManager: pnpm
uses: the-guild-org/shared-config/setup@v1

- name: Install dependencies
run: pnpm install
Expand All @@ -67,10 +61,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 20
packageManager: pnpm
uses: the-guild-org/shared-config/setup@v1

- name: Install dependencies
run: pnpm install
Expand All @@ -92,10 +83,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 20
packageManager: pnpm
uses: the-guild-org/shared-config/setup@v1

- name: Install dependencies
run: pnpm install
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/next-js-bundle-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 20
packageManager: pnpm
uses: the-guild-org/shared-config/setup@v1

- name: Restore Next.js Build
uses: actions/cache@v3
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/opengraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ jobs:
ref: ${{ env.COMMIT }}

- name: Set up env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 20
packageManager: pnpm
uses: the-guild-org/shared-config/setup@v1

- name: Deploy
working-directory: ./packages/og-image
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/website-integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ jobs:
run: git fetch origin main

- name: Set up env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 20
packageManager: pnpm
uses: the-guild-org/shared-config/setup@v1

- name: Build Site
run: pnpm build
Expand Down
1 change: 1 addition & 0 deletions .node-version
benface marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.5.1
benface marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22.5.1
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
out/
pnpm-lock.yaml
dist/
website/remote-files/*.json
website/.graphclient/

# ignore below md since they are fetched from GitHub
website/pages/en/developing/graph-ts/*.md
website/pages/en/querying/graph-client/*.md
benface marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-alpine as builder
FROM node:22-alpine as builder

ARG ENVIRONMENT
ENV ENVIRONMENT=$ENVIRONMENT
Expand Down
4 changes: 2 additions & 2 deletions packages/nextra-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@emotion/react": "^11",
"next": "^13",
"next-seo": "^6",
"nextra": "^2",
"nextra": "^3",
"react-dom": "^18",
"theme-ui": "^0.16"
},
Expand All @@ -51,7 +51,7 @@
"@types/react-dom": "^18.3.0",
"next": "^14.2.5",
"next-seo": "^6.5.0",
"nextra": "^2.13.4",
"nextra": "^3.0.0-alpha.30",
benface marked this conversation as resolved.
Show resolved Hide resolved
"react": "^18.3.1",
"react-dom": "^18.3.1",
"theme-ui": "^0.16.2",
Expand Down
4 changes: 0 additions & 4 deletions packages/nextra-theme/src/components/Code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,3 @@ export const CodeBlock = ({ children, ...props }: CodeBlockProps) => {
</Code.Block>
)
}

export const CodeInline = ({ children, ...props }: HTMLAttributes<HTMLElement>) => {
return <Code.Inline {...props}>{children as string}</Code.Inline>
}
Loading
Loading