diff --git a/.github/scripts/get-contributing.sh b/.github/scripts/get-contributing.sh index 2ee6f77ff2..48e541dd75 100755 --- a/.github/scripts/get-contributing.sh +++ b/.github/scripts/get-contributing.sh @@ -79,9 +79,14 @@ while IFS= read -r line; do echo "fetching $repo/$path..." >&2 RAW=$(curl -s "https://raw.githubusercontent.com/${repo}/HEAD/${path}") - # Convert relative links to absolute GitHub URLs + # Convert relative links to absolute GitHub URLs, resolved from the source file's directory BASEURL="https://github.com/${repo}/blob/HEAD" - RAW=$(echo "$RAW" | sed -E "s|\]\(([^)#/][^):]*)\)|](${BASEURL}/\1)|g") + if [[ "$path" == */* ]]; then + linkprefix="${path%/*}/" + else + linkprefix="" + fi + RAW=$(echo "$RAW" | sed -E "s|\]\(([^)#/][^):]*)\)|](${BASEURL}/${linkprefix}\1)|g") TRANSFORMED=$(transform_content "$RAW" "$level") echo "$TRANSFORMED" diff --git a/src/content/pages/en/resources/contributing.mdx b/src/content/pages/en/resources/contributing.mdx index 57461bb2dc..c6eaf272db 100644 --- a/src/content/pages/en/resources/contributing.mdx +++ b/src/content/pages/en/resources/contributing.mdx @@ -76,7 +76,7 @@ compromise among committers be the default resolution mechanism. ### Becoming a Triager Anyone can become a triager! Read more about the process of being a triager in -[the triage process document](https://github.com/expressjs/discussions/blob/HEAD/contributing/triager-guide.md). +[the triage process document](https://github.com/expressjs/discussions/blob/HEAD/docs/contributing/triager-guide.md). Currently, any existing [organization member](https://github.com/orgs/expressjs/people) can nominate a new triager. If you are interested in becoming a triager, our best advice is to actively participate