Skip to content

Commit 3fb5e46

Browse files
authored
feat: libname_dotsuffix_* (#368)
1 parent 64b0c50 commit 3fb5e46

File tree

4 files changed

+60
-30
lines changed

4 files changed

+60
-30
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
type: string
1313
libname_short:
1414
type: string
15+
libname_dotsuffix_label:
16+
type: string
17+
libname_dotsuffix_href:
18+
type: string
1519
home_redirect:
1620
required: true
1721
type: string
@@ -74,6 +78,8 @@ jobs:
7478
-e MDX \
7579
-e NEXT_PUBLIC_LIBNAME \
7680
-e NEXT_PUBLIC_LIBNAME_SHORT \
81+
-e NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL \
82+
-e NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF \
7783
-e OUTPUT=export \
7884
-e HOME_REDIRECT \
7985
-e MDX_BASEURL \
@@ -99,6 +105,8 @@ jobs:
99105
MDX: ${{ inputs.mdx }}
100106
NEXT_PUBLIC_LIBNAME: ${{ inputs.libname }}
101107
NEXT_PUBLIC_LIBNAME_SHORT: ${{ inputs.libname_short }}
108+
NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL: ${{ inputs.libname_dotsuffix_label }}
109+
NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF: ${{ inputs.libname_dotsuffix_href }}
102110
HOME_REDIRECT: ${{ inputs.home_redirect }}
103111
MDX_BASEURL: 'https://github.com/${{ github.repository }}/raw/${{ github.ref_name }}/${{ inputs.mdx }}'
104112
SOURCECODE_BASEURL: 'https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}'

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
--build-env MDX=docs \
5151
--build-env NEXT_PUBLIC_LIBNAME="Poimandres" \
5252
--build-env NEXT_PUBLIC_LIBNAME_SHORT="pmndrs" \
53+
--build-env NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL="docs" \
54+
--build-env NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF="https://pmnd.rs" \
5355
--build-env BASE_PATH= \
5456
--build-env DIST_DIR= \
5557
--build-env OUTPUT= \

docs/getting-started/introduction.mdx

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,34 @@ $ npm ci
2222

2323
## Configuration
2424

25-
| var | description | example |
26-
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
27-
| `MDX`\* | Path to `*.mdx` folder<br/>NB: can be relative or absolute | `docs` or `~/code/myproject/documentation` |
28-
| `NEXT_PUBLIC_LIBNAME`\* | Library name | `React Three Fiber` |
29-
| `NEXT_PUBLIC_LIBNAME_SHORT` | Library short name | `r3f` |
30-
| `BASE_PATH` | Base path for the final URL | `/react-three-fiber` |
31-
| `DIST_DIR` | Path to the output folder ([within project](https://nextjs.org/docs/app/api-reference/next-config-js/distDir#:~:text=should%20not%20leave%20your%20project%20directory)) | `out` or `docs/out/react-three-fiber` |
32-
| `OUTPUT` | Set to `export` for static output | `export` |
33-
| `HOME_REDIRECT` | Where the home should redirect | `/getting-started/introduction` |
34-
| `MDX_BASEURL` | Base URL for inlining relative images | `http://localhost:60141`or `https://github.com/pmndrs/react-three-fiber/raw/master/docs` |
35-
| `SOURCECODE_BASEURL` | Base URL for `sourcecode:` code path | `https://github.com/pmndrs/react-three-fiber/tree/main` |
36-
| `EDIT_BASEURL` | Base URL for displaying "Edit this page" URLs | `https://github.com/pmndrs/react-three-fiber/edit/master/docs` |
37-
| `NEXT_PUBLIC_URL` | Final URL of the published website | `https://pmndrs.github.io/react-three-fiber` |
38-
| `ICON` | Emoji or image to use as (fav)icon (path local to `MDX`) | `🇨🇭` or `/icon.png` or `/favicon.ico` |
39-
| `LOGO` | Logo src/path (either FQURL or local to `MDX` path) | `/logo.png` or `https://worldvectorlogo.com/r3f.png` |
40-
| `GITHUB` | Github URL | `https://github.com/pmndrs/react-three-fiber` |
41-
| `DISCORD` | Discord URL | `https://discord.com/channels/740090768164651008/740093168770613279` |
42-
| `THEME_PRIMARY` | Primary accent color | `#323e48` |
43-
| `THEME_SCHEME` | Theme scheme | `content` or `expressive` or `fidelity` or `monochrome` or `neutral` or `tonalSpot` or `vibrant` |
44-
| `THEME_CONTRAST` | Theme contrast -- value between -1 and 1 | `0` or `-1` or `1` or `-.6` |
45-
| `THEME_NOTE` | "note" color | `#1f6feb` |
46-
| `THEME_TIP` | "tip" color | `#238636` |
47-
| `THEME_IMPORTANT` | "important" color | `#8957e5` |
48-
| `THEME_WARNING` | "warning" color | `#d29922` |
49-
| `THEME_CAUTION` | "caution" color | `#da3633` |
50-
| `CONTRIBUTORS_PAT` | GitHub token for contributors API (see: https://docs.github.com/en/rest/collaborators/collaborators?apiVersion=2022-11-28#list-repository-collaborators) | `ghp_1234567890` |
25+
| var | description | example |
26+
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
27+
| `MDX`\* | Path to `*.mdx` folder<br/>NB: can be relative or absolute | `docs` or `~/code/myproject/documentation` |
28+
| `NEXT_PUBLIC_LIBNAME`\* | Library name | `React Three Fiber` |
29+
| `NEXT_PUBLIC_LIBNAME_SHORT` | Library short name | `r3f` |
30+
| `NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL` | Text for the ".docs" suffix link inside the header | `docs` |
31+
| `NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF` | Href for the ".docs" suffix link inside the header | `https://docs.pmnd.rs` |
32+
| `BASE_PATH` | Base path for the final URL | `/react-three-fiber` |
33+
| `DIST_DIR` | Path to the output folder ([within project](https://nextjs.org/docs/app/api-reference/next-config-js/distDir#:~:text=should%20not%20leave%20your%20project%20directory)) | `out` or `docs/out/react-three-fiber` |
34+
| `OUTPUT` | Set to `export` for static output | `export` |
35+
| `HOME_REDIRECT` | Where the home should redirect | `/getting-started/introduction` |
36+
| `MDX_BASEURL` | Base URL for inlining relative images | `http://localhost:60141`or `https://github.com/pmndrs/react-three-fiber/raw/master/docs` |
37+
| `SOURCECODE_BASEURL` | Base URL for `sourcecode:` code path | `https://github.com/pmndrs/react-three-fiber/tree/main` |
38+
| `EDIT_BASEURL` | Base URL for displaying "Edit this page" URLs | `https://github.com/pmndrs/react-three-fiber/edit/master/docs` |
39+
| `NEXT_PUBLIC_URL` | Final URL of the published website | `https://pmndrs.github.io/react-three-fiber` |
40+
| `ICON` | Emoji or image to use as (fav)icon (path local to `MDX`) | `🇨🇭` or `/icon.png` or `/favicon.ico` |
41+
| `LOGO` | Logo src/path (either FQURL or local to `MDX` path) | `/logo.png` or `https://worldvectorlogo.com/r3f.png` |
42+
| `GITHUB` | Github URL | `https://github.com/pmndrs/react-three-fiber` |
43+
| `DISCORD` | Discord URL | `https://discord.com/channels/740090768164651008/740093168770613279` |
44+
| `THEME_PRIMARY` | Primary accent color | `#323e48` |
45+
| `THEME_SCHEME` | Theme scheme | `content` or `expressive` or `fidelity` or `monochrome` or `neutral` or `tonalSpot` or `vibrant` |
46+
| `THEME_CONTRAST` | Theme contrast -- value between -1 and 1 | `0` or `-1` or `1` or `-.6` |
47+
| `THEME_NOTE` | "note" color | `#1f6feb` |
48+
| `THEME_TIP` | "tip" color | `#238636` |
49+
| `THEME_IMPORTANT` | "important" color | `#8957e5` |
50+
| `THEME_WARNING` | "warning" color | `#d29922` |
51+
| `THEME_CAUTION` | "caution" color | `#da3633` |
52+
| `CONTRIBUTORS_PAT` | GitHub token for contributors API (see: https://docs.github.com/en/rest/collaborators/collaborators?apiVersion=2022-11-28#list-repository-collaborators) | `ghp_1234567890` |
5153

5254
\* Required
5355

@@ -97,6 +99,8 @@ $ (
9799
export MDX=docs
98100
export NEXT_PUBLIC_LIBNAME="Poimandres"
99101
export NEXT_PUBLIC_LIBNAME_SHORT="pmndrs"
102+
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL="docs"
103+
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF="https://docs.pmnd.rs"
100104
export BASE_PATH=
101105
export DIST_DIR=
102106
export OUTPUT=export
@@ -145,6 +149,8 @@ $ (
145149
export MDX=docs
146150
export NEXT_PUBLIC_LIBNAME="Poimandres"
147151
export NEXT_PUBLIC_LIBNAME_SHORT="pmndrs"
152+
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL="docs"
153+
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF="https://docs.pmnd.rs"
148154
export BASE_PATH=
149155
export DIST_DIR=
150156
export OUTPUT=export
@@ -195,6 +201,8 @@ $ (
195201
export MDX=docs
196202
export NEXT_PUBLIC_LIBNAME="React Three Fiber"
197203
export NEXT_PUBLIC_LIBNAME_SHORT="r3f"
204+
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL="docs"
205+
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF="https://docs.pmnd.rs"
198206
export BASE_PATH=
199207
export OUTPUT=export
200208
export HOME_REDIRECT=/getting-started/introduction
@@ -222,6 +230,9 @@ $ (
222230
-v "./$MDX":/app/docs \
223231
-e MDX \
224232
-e NEXT_PUBLIC_LIBNAME \
233+
-e NEXT_PUBLIC_LIBNAME_SHORT \
234+
-e NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL \
235+
-e NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF \
225236
-e BASE_PATH \
226237
-e DIST_DIR="$MDX/out$BASE_PATH" \
227238
-e OUTPUT \

0 commit comments

Comments
 (0)