forked from opstrace/next-product-docs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: next12, local docs, md/mdx support (#13)
This has been a few months in the works and there may be a few new issues here and there, but overall we're very happy to finally release the next major version of the Next Product Docs for Next.js. The biggest change is the support for "local" docs, in the same repository as the website and/or product itself. This was a requirement for the [Cert-Manager](https://cert-manager.io) docs, where the website and docs are coupled. It also allows a range of combinations. We added support to skip the `root path` to support pure `docs` repositories. Another breaking change is the move from environment variables to options/props. This was getting a bit out of hand, so we switched to a set of options to configure both the path and props functions. Please see the readme for further information. We've done our best to test this with previous docs versions, if we missed anything please [open an issue](https://github.com/zentered/next-product-docs/issues/new) and describe the problem. * feat: use local docs folder * refactor: esm and improved re-usability for other projects * fix: overhaul relative links lib and tests, fix variable scope * fix: relative links with target and trailing slash * fix: local docs adjustments * feat: add pnpm link steps * fix: remove scroll-element and prefix * fix!: next12 dynamic routing https://nextjs.org/docs/routing/dynamic-routes\#catch-all-routes * feat!: use options instead of environment variables * feat: re-add sections * feat: re-add tabs * fix: serialization + tests * chore: update dependencies * chore: readme adjustments Co-authored-by: Mo Sattler <[email protected]> BREAKING CHANGE: the entire library has been refactored to ESM and updated to the latest libraries. Please update with caution.
- Loading branch information
1 parent
e342a3f
commit cfcb9af
Showing
44 changed files
with
9,234 additions
and
9,203 deletions.
There are no files selected for viewing
This file contains 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,11 +1,13 @@ | ||
{ | ||
"presets": [ | ||
["@babel/preset-env", { "targets": { "node": "current" } }], | ||
[ | ||
"@babel/preset-react", | ||
"@babel/preset-env", | ||
{ | ||
"runtime": "automatic" | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
] | ||
], | ||
"@babel/preset-react" | ||
] | ||
} |
This file contains 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 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,22 +1,7 @@ | ||
version: 2 | ||
updates: | ||
# Fetch and update latest `npm` packages | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: monthly | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
# Fetch and update latest `github-actions` pkgs | ||
- package-ecosystem: github-actions | ||
directory: '/' | ||
schedule: | ||
interval: monthly | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope |
This file contains 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 |
---|---|---|
|
@@ -10,20 +10,22 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14.x | ||
uses: actions/[email protected] | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
with: | ||
node-version: 14 | ||
|
||
version: '${{ inputs.pnpm-version }}' | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
cache: 'pnpm' | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
run: pnpm install | ||
|
||
- name: Test | ||
run: yarn test | ||
# - name: Test | ||
# run: pnpm test | ||
|
||
- name: Build | ||
run: yarn build | ||
run: pnpm build | ||
|
||
- name: Semantic Release | ||
run: npx semantic-release | ||
|
This file contains 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 |
---|---|---|
|
@@ -11,28 +11,19 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2.1.4 | ||
version: '${{ inputs.pnpm-version }}' | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: '@opstrace' | ||
|
||
node-version: ${{ inputs.node-version }} | ||
cache: 'pnpm' | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
run: pnpm install | ||
|
||
- name: Lint Code Base | ||
uses: github/[email protected] | ||
env: | ||
LINTER_RULES_PATH: / | ||
LOG_LEVEL: 'WARN' | ||
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json | ||
VALIDATE_JAVASCRIPT_STANDARD: false | ||
FILTER_REGEX_EXCLUDE: .*husky.*|README.md | ||
DEFAULT_BRANCH: main | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: pnpm lint | ||
|
||
- name: Test | ||
run: yarn test | ||
# - name: Test | ||
# run: pnpm test |
This file contains 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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
coverage | ||
|
||
# next.js | ||
/.next/ | ||
|
This file contains 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,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep package.json && yarn install | ||
git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep package.json && pnpm install |
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
test | ||
.prettierrc | ||
.babelrc | ||
src | ||
.eslint* | ||
.github | ||
coverage | ||
setupTests.js | ||
assets | ||
.husky | ||
.stylelintrc.json | ||
rollup.config.js |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.