Skip to content

Commit afc3c22

Browse files
JimMadgeflpmlwasserallcontributors[bot]dependabot[bot]
authored
docs: add docs on using Lychee and fix lychee's build (#939)
* docs: remove Docusaurus website and docs * docs: remove netlify.toml * docs: add astro config * docs: add astro / starlight docs source * docs: add public all-contrib static files * docs: dependencies, update package.json * docs: added favicons and related images * docs update node version in .nvmrc; remove .astro; fix .gitignore * docs: small updates to github CI * docs: update .gitignore with more astro related files * docs: small updates to clarify config * chore(link checker): Move to Lychee for link checking (#889) * chore(package.json): add angular commit helper deps and script * test(link checking): add lychee configuration re #852 * test(link check): add script to check links in Markdown source * fix: correct link to eslint commit convention * fix: correct bot usage image path * test: add mdx to fallback extentions * fix: remove broken link * test: check links internal to a page * test: add root dir to link checking This ensures links to an absolute path (starting with '/') are directed to the public directory. fix 852 * ci: add markdownlint dep and script * style: fix linting errors * ci: install deps for lint workflow * ci: add offline link check for PRs and push to main This workflow will only check links to local files and not make network requests. There should therefore be no false negatives and it is safer to use as a required CI item. * docs(readme): sync readme file in docs upgrade branch with main (#895) * chore(branch rename): rename master --> main throughout so ci runs and docs are correct (#890) chore(rename master to main branch): we renamed the master branch; this updates all actions & docs * docs: add JimMadge as a contributor for review (#892) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Leah Wasser <[email protected]> * docs: add JHWelch as a contributor for doc (#894) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * docs: add landing page to astro documentation (#887) docs: make index dynamic and add images docs: lint all docs and add markdown lint dep docs: lint Correct image path * docs:remove placeholder index page (#899) docs:remove placeholder index page * docs: style landing page, add branded fonts and colors & tailwind (#901) * docs(style): source gfonts poppins * docs(style): add custom style/ setup tailwind * docs(img): add and update images * docs(img): add and update images * docs(config): cleanup landing and config * chore(deps): update to support tailwind * chore(css): setup tailwind css * docs: add graphics for home page and style buttons * docs: add buttons * docs: missed a few more image updates * chore(deps): correct dependency location in package.lock * chore(clean): clean old files * chore: add poppins font license --------- Co-authored-by: Jim Madge <[email protected]> * docs: add documentation for mdx pages and update images for the overview section (#915) * docs: update images and document how to add content to our docs docs: update images and edit text for all intro pages docs: clean up all pages in the general overview section docs: add description for Ideas, projectManagement and promotion (#829) docs: ✏️ Add dark mode README logo (#741) Co-authored-by: Leah Wasser <[email protected]> Co-authored-by: Jim Madge <[email protected]> * enh(image): bring in dark mode compatible logo * docs: tidy adding images section Move path alias section up and adjust Apply suggestions from code review Co-authored-by: Jim Madge <[email protected]> * style: linting fixes for emoji table and other content --------- Co-authored-by: Jim Madge <[email protected]> Co-authored-by: Jim Madge <[email protected]> * chore(ci for docs): Get docs online via github pages (#914) * docs: get docs online via github pages new branch * chore: set site and base according to astro docs Astro docs: https://docs.astro.build/en/guides/deploy/github/#how-to-deploy suggest how to specifiy the site url and base for GitHub pages. --------- Co-authored-by: Jim Madge <[email protected]> * docs(fix basurl): update baseurl to support github pages (#924) * chore(ci): Fix offline link check (#923) * ci: correct workflow file format 🤦 * ci: add root directory to offline link check This ensures that the link checkers knows where to look for absolute links. * docs: update images and breakout links for the "bot" section of the documentation (#919) * docs: update images and document how to add content to our docs docs: update images and edit text for all intro pages docs: clean up all pages in the general overview section docs: add description for Ideas, projectManagement and promotion (#829) docs: ✏️ Add dark mode README logo (#741) Co-authored-by: Leah Wasser <[email protected]> Co-authored-by: Jim Madge <[email protected]> * enh(image): bring in dark mode compatible logo * docs: tidy adding images section Move path alias section up and adjust Apply suggestions from code review Co-authored-by: Jim Madge <[email protected]> * style: linting fixes for emoji table and other content * docs: fix links and breakouts in bot section * Apply suggestions from code review Co-authored-by: Jim Madge <[email protected]> --------- Co-authored-by: Jim Madge <[email protected]> Co-authored-by: Jim Madge <[email protected]> * docs: add Netlify badge to home page (#927) docs: add netlify badge for open source plan * docs: import styles globally rather than inline in a file (#933) docs(styles): apply stylesheets globally docs: document custom styles * Docs: Fix images and links in the last sections of the docs (#931) docs: fix links and images on last sections * chore: add merge commit to handle merge conflicts when we merge into main (#929) * chore(ci): add dependabot config for actions (#865) * chore(ci): bump actions/checkout from 3 to 5 (#883) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(ci): bump actions/setup-node from 3 to 4 (#882) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(ci): bump actions/upload-pages-artifact from 3 to 4 (#881) * chore(ci): bump actions/upload-pages-artifact from 3 to 4 Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-pages-artifact/releases) - [Commits](actions/upload-pages-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-pages-artifact dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Update .github/workflows/build-website.yml * chore(ci): update actions --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leah Wasser <[email protected]> * chore(branch rename): rename master --> main throughout so ci runs and docs are correct (#890) chore(rename master to main branch): we renamed the master branch; this updates all actions & docs * docs: ✏️ fix links to doc site and small bug in footer.js (#871) * docs: ✏️ fix links to doc site and small bug in footer.js This change fixes an error in the footer and also updates some broken links. ✅ Closes: 870 * Update website/static/index.html Co-authored-by: Leah Wasser <[email protected]> * Update docs/overview.md --------- Co-authored-by: Jim Madge <[email protected]> * docs: add JimMadge as a contributor for review (#892) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Leah Wasser <[email protected]> * docs: add JHWelch as a contributor for doc (#894) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * docs: add lwasser as a contributor for review (#897) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * docs: add JimMadge as a contributor for infra (#896) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Jim Madge <[email protected]> * docs: ✏️ Add dark mode README logo (#741) Co-authored-by: Leah Wasser <[email protected]> Co-authored-by: Jim Madge <[email protected]> * docs: add RichLewis007 as a contributor for bug, and doc (#906) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * docs: add parthamk as a contributor for doc (#909) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * docs: add rebeccaringuette as a contributor for ideas (#910) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * Change build branch from 'master' to 'docs-upgrade' * docs: add description for Ideas, projectManagement and promotion (#829) * docs: add KhushiPandey8 as a contributor for doc (#918) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * docs: add lwasser as a contributor for doc (#921) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * docs: add JimMadge as a contributor for doc (#922) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * docs: linting fix * docs: remove last docusaurus files * docs: update * chore: fix linting step to handle mdx * chore: lint * fix: links --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jim Madge <[email protected]> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Jim Madge <[email protected]> Co-authored-by: Jordan Welch <[email protected]> Co-authored-by: Reshama Shaikh <[email protected]> * docs: remove bold around code block * docs: remove some formatting * test: add mdx files to link check scripts * docs: add docs for using Lychee * test: exclude astro aliases from link check * ci: check mdx files for links * WIP: fix links in mdx files * Revert "WIP: fix links in mdx files" This reverts commit 92aa7b5. * test: run link check on HTML * Update links * docs: add automatic links to headings * test: correct link check scripts * docs: fix links to fragments * docs: correct and exclude links to fragments The server redirects these correctly, however they don't match file paths so the link checker fails * docs: update link check docs * ci: build site before link check * ci: remove remap from workflow command This seems to create a recursion * Update src/content/docs/project/contribute.mdx Co-authored-by: Leah Wasser <[email protected]> * Update src/content/docs/project/contribute.mdx Co-authored-by: Leah Wasser <[email protected]> * Update src/content/docs/project/contribute.mdx Co-authored-by: Leah Wasser <[email protected]> * Update src/content/docs/project/contribute.mdx Co-authored-by: Leah Wasser <[email protected]> * Update src/content/docs/project/contribute.mdx Co-authored-by: Leah Wasser <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Felipe Moreno <[email protected]> Co-authored-by: Leah Wasser <[email protected]> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jordan Welch <[email protected]> Co-authored-by: Reshama Shaikh <[email protected]>
1 parent 4a838f9 commit afc3c22

22 files changed

+121
-131
lines changed

.github/workflows/offline-link-check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v5
14+
- run: npm ci
15+
- run: npm run build
1416
- uses: lycheeverse/lychee-action@v2
1517
with:
1618
# Only check local files, no network requests
17-
args: --config './lychee.toml' --no-progress --offline --root-dir "$GITHUB_WORKSPACE/public/" 'src/content/docs/**/*.md'
19+
args: --config './lychee.toml' --no-progress --offline --root-dir "$GITHUB_WORKSPACE/dist/" dist/**/*.html
1820
# Fail job when lychee returns a non-zero exit code
1921
fail: true

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ dist
3535
# Astro generated types
3636
.astro/
3737

38-
3938
.lycheecache
4039
dist/
4140

astro.config.mjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
3+
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
4+
import rehypeSlug from 'rehype-slug';
35
import starlight from '@astrojs/starlight';
46
import sitemap from '@astrojs/sitemap';
57
import tailwindcss from '@tailwindcss/vite';
68

79
export default defineConfig({
810
site: 'https://all-contributors.github.io',
911
base: '',
12+
markdown: {
13+
rehypePlugins: [rehypeSlug, [rehypeAutolinkHeadings, { behavior: 'append' }]],
14+
},
1015
output: 'static',
1116

1217
redirects: {
1318
// Later we can put redirects here if needed
1419
},
15-
1620
integrations: [
1721
starlight({
1822
customCss: [
@@ -65,8 +69,9 @@ export default defineConfig({
6569
],
6670
},
6771
],
68-
}), sitemap()],
69-
72+
}),
73+
sitemap()
74+
],
7075
vite: {
7176
plugins: [tailwindcss()],
7277
resolve: {

lychee.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ require_https = true
3838

3939
# Fallback extensions to apply when a URL does not specify one.
4040
# This is common in documentation tools that cross-reference files without extensions.
41-
fallback_extensions = ["md", "mdx", "html"]
41+
fallback_extensions = ["html"]
4242

4343
############################# Exclusions ##########################
4444

4545
# Exclude URLs and mail addresses from checking. The values are treated as regular expressions
46-
exclude = []
46+
exclude = [
47+
"^file://.*#"
48+
]
4749

4850
# Check fragments - internal links in pages
4951
include_fragments = true

package-lock.json

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"build": "astro build",
1515
"preview": "astro preview",
1616
"astro": "astro",
17-
"link-check-md": "lychee src/content/docs/**/*.md --root-dir $(pwd)/public",
18-
"link-check-md-offline": "lychee src/content/docs/**/*.md --root-dir $(pwd)/public --offline",
17+
"link-check-offline": "lychee --config ./lychee.toml --offline --root-dir \"$(pwd)/dist/\" --remap \"all-contributors.github.io $(pwd)/dist/\" 'dist/**/*.html'",
18+
"link-check": "lychee --config ./lychee.toml --root-dir \"$(pwd)/dist/\" --remap \"all-contributors.github.io $(pwd)/dist/\" 'dist/**/*.html'",
1919
"lint": "markdownlint **/*.{md,mdx} --ignore node_modules",
2020
"lint-fix": "markdownlint **/*.{md,mdx} --ignore node_modules --fix"
2121
},
@@ -25,10 +25,12 @@
2525
"@astrojs/starlight-tailwind": "^4.0.1",
2626
"@tailwindcss/vite": "^4.1.13",
2727
"astro": "^5.6.1",
28-
"sharp": "^0.34.2",
29-
"autoprefixer": "^10.4.21",
28+
"autoprefixer": "^10.4.21",
3029
"postcss": "^8.5.6",
30+
"rehype-autolink-headings": "^7.1.0",
31+
"rehype-slug": "^6.0.0",
3132
"sass-embedded": "^1.92.1",
33+
"sharp": "^0.34.2",
3234
"tailwindcss": "^4.1.13"
3335
},
3436
"devDependencies": {

src/content/docs/bot/configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You can configure the all-contributors bot behaviour by updating the `.all-contr
88
The data used to generate the contributors list will be stored there, and you
99
can configure how you want `@all-contributors` to generate the list.
1010

11-
> You are viewing the 🤖Bot Configuration, which is similar to the [CLI Configuration](../cli/configuration)
11+
> You are viewing the 🤖Bot Configuration, which is similar to the [CLI Configuration](/cli/configuration)
1212
1313
These are the keys you can specify:
1414

@@ -30,7 +30,7 @@ These are the keys you can specify:
3030
| `types` | Specify custom symbols or link templates for contribution types. Can override the documented types. | |
3131
| `linkToUsage` | Adds a footer with link to usage (either `true` or `false`) | Default: `true` |
3232
| `skipCi` | Makes the CI ignore the commit. (either `true` or `false`) | Default: `true` |
33-
| `contributors` | List of contributors for this project, this is updated by [@all-contributors add](usage#all-contributors-add) | |
33+
| `contributors` | List of contributors for this project, this is updated by [@all-contributors add](/bot/usage#all-contributors-add) | |
3434

3535
```json
3636
{
@@ -65,10 +65,10 @@ As you know, the default file for the contributors table is `README.md`. But if
6565

6666
Here are the steps that may help you in achieving that. For the sake of this tutorial, the different file that we'll use is going to be named `CONTRIBUTORS.md`.
6767

68-
1. Install the bot. See the [Installation](installation) page for instructions.
69-
2. Add your first contributor. See the [Bot Usage](usage) page for instructions.
68+
1. Install the bot. See the [Installation](/bot/installation) page for instructions.
69+
2. Add your first contributor. See the [Bot Usage](/bot/usage) page for instructions.
7070
3. Create the `CONTRIBUTORS.md` file.
71-
4. Copy the code which can be found in [this guide](installation#3-create-a-readmemd).
71+
4. Copy the code which can be found in [this guide](/bot/installation#3-create-a-readmemd).
7272
5. Modify the `files` key in the `.all-contributorsrc` JSON file to match your new file name.
7373

7474
```json

src/content/docs/bot/installation.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import configureRepo from '@assets/configure-repositories.png';
2424
Ensure you have a `README.md` file at the root of the project (it can be empty).
2525

2626
If you prefer your contributors table in a place other than the `README.md`; After merging your first bot PR, you can move your contributors table,
27-
see `files` in the [bot configuration](configuration)
27+
see `files` in the [bot configuration](/bot/configuration)
2828

2929
Make sure to add this in the markdown:
3030

@@ -65,4 +65,4 @@ Style, color, and other parameters can be customized to your liking — visit [s
6565
6666
## 4. Update your Contributing documentation
6767
68-
Consider updating your `CONTRIBUTING.md` or similar with steps on how contributors can add themselves. You can even link to the [bot usage documentation](usage).
68+
Consider updating your `CONTRIBUTING.md` or similar with steps on how contributors can add themselves. You can even link to the [bot usage documentation](/bot/usage).

src/content/docs/bot/usage.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Picture } from "astro:assets";
77
import {Aside} from '@astrojs/starlight/components';
88
import botUsage from '@assets/bot-usage.png';
99

10-
<Aside type="tip"> This usage documentation assumes you have already followed the [bot installation steps](installation).</Aside>
10+
<Aside type="tip"> This usage documentation assumes you have already followed the [bot installation steps](/bot/installation).</Aside>
1111

1212
## Bot Commands
1313

src/content/docs/cli/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ title: CLI Configuration
44
sidebar_label: Configuration
55
---
66

7-
Please refer to the [bot documentation for CLI configuration information](../bot/configuration).
7+
Please refer to the [bot documentation for CLI configuration information](/bot/configuration).

0 commit comments

Comments
 (0)