Skip to content

Commit a1e36d2

Browse files
Muntermontogeek
authored andcommitted
fix(site) More link fixes and anchors links (#2017)
* Fix broken fragment links to node documentation * Don't resolve external README internal fragment identifier hrefs to raw.githubusercontent.com
1 parent b076237 commit a1e36d2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/content/configuration/output.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ The prefix length of the hash digest to use, defaults to `20`.
250250

251251
`string|function`
252252

253-
The hashing algorithm to use, defaults to `'md5'`. All functions from Node.JS' [`crypto.createHash`](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm) are supported. Since `4.0.0-alpha2`, the `hashFunction` can now be a constructor to a custom hash function. You can provide a non-crypto hash function for performance reasons.
253+
The hashing algorithm to use, defaults to `'md5'`. All functions from Node.JS' [`crypto.createHash`](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options) are supported. Since `4.0.0-alpha2`, the `hashFunction` can now be a constructor to a custom hash function. You can provide a non-crypto hash function for performance reasons.
254254

255255
``` js
256256
hashFunction: require('metrohash').MetroHash64
@@ -260,7 +260,7 @@ Make sure that the hashing function will have `update` and `digest` methods avai
260260

261261
## `output.hashSalt`
262262

263-
An optional salt to update the hash via Node.JS' [`hash.update`](https://nodejs.org/api/crypto.html#crypto_hash_update_data_input_encoding).
263+
An optional salt to update the hash via Node.JS' [`hash.update`](https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding).
264264

265265

266266
## `output.hotUpdateChunkFilename`

src/scripts/fetch_package_files.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ function fetchPackageFiles(options, finalCb) {
8787
// Examples:
8888
// - [click here](LICENSE) --> [click here](https://raw.githubusercontent.com/user/repository/branch/LICENSE)
8989
// - [click here](./LICENSE) --> [click here](https://raw.githubusercontent.com/user/repository/branch/LICENSE)
90-
// - [click here](#LICENSE) --> [click here](https://raw.githubusercontent.com/user/repository/branch#LICENSE)
91-
.replace(/\[([^[\]]*)\]\(([^)]+)\)/g, (match, textContent, href) => `[${textContent}](${urlModule.resolve(url, href)})`)
90+
// - [click here](#LICENSE) --> [click here](#LICENSE)
91+
.replace(/\[([^[\]]*)\]\(([^)#]+)\)/g, (match, textContent, href) => `[${textContent}](${urlModule.resolve(url, href)})`)
9292
// Modify links to keep them within the site
9393
.replace(/https?:\/\/github.com\/(webpack|webpack-contrib)\/([-A-za-z0-9]+-loader\/?)([)"])/g, '/loaders/$2/$3')
9494
.replace(/https?:\/\/github.com\/(webpack|webpack-contrib)\/([-A-za-z0-9]+-plugin\/?)([)"])/g, '/plugins/$2/$3')

0 commit comments

Comments
 (0)