diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index aff82a1..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml deleted file mode 100644 index 471eeda..0000000 --- a/.github/workflows/dependabot.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Dependabot auto-merge -on: pull_request - -permissions: - contents: write - pull-requests: write - -jobs: - dependabot: - runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} - steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@v1.1.1 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Enable auto-merge for Dependabot PRs - run: gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 0bd6b27..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Deploy - -on: - push: - branches: [main] - -jobs: - github_pages_deploy: - runs-on: ubuntu-latest - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - - uses: actions/checkout@v3 - - name: Use Node.js 20.x - uses: actions/setup-node@v3 - with: - node-version: 20.x - - name: Install dependencies - run: | - yarn install - yarn export - - name: Deploy - run: | - git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git - yarn deploy -- -u "github-actions-bot " - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index b5d95ee..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Tests - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - lint_and_tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Use Node.js 20.x - uses: actions/setup-node@v3 - with: - node-version: 20.x - - name: Install dependencies - run: yarn install - - name: Run eslint - run: yarn lint - env: - CI: true - - name: Run typescript - run: yarn type-check - env: - CI: true - - name: Run build - run: yarn export - env: - CI: true diff --git a/next.config.js b/next.config.js index 74dca5f..d94d926 100644 --- a/next.config.js +++ b/next.config.js @@ -1,11 +1,40 @@ -const withNextra = require('nextra')({ - theme: 'nextra-theme-docs', - themeConfig: './theme.config.tsx', -}) - +// Original Next.js config module.exports = { - ...withNextra(), + reactStrictMode: true, + output: 'export', images: { + // output: export doesn't support Next.js image optimization unoptimized: true, }, -}; + // Next.js doesn't support trailing slashes in basePath + // This config needs to be in sync with export-images.config.js + basePath: (process.env.WEBSITE_BASE_PATH || '').replace(/\/$/, ""), + webpack: (config) => { + // Add Typescript support + // Reference: https://www.altogic.com/blog/nextjs-typescript + config.resolve.extensions.push(".ts", ".tsx"); + return config; + }, + eslint: { + dirs: [ + 'pages', + 'src', + 'app', + 'components', + 'lib', + 'theme.config.jsx', + "tailwind.config.js", + "next.config.js", + "postcss.config.js", + ] + } +} + +// Add Nextra config +const withNextra = require('nextra')({ + theme: 'nextra-theme-docs', + themeConfig: './theme.config.tsx', + latex: true, // LaTeX support: https://nextra.site/docs/guide/advanced/latex +}); + +module.exports = withNextra(module.exports)