mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-15 17:22:35 +02:00
feat(v2): absolute slugs and slug resolution system (#3084)
* rework slug to allow absolute slugs and slug resolution * add slug metadata tests * refactor docs metadata test + fix slug bugs * fix tests * fix docs tests failing due to randomness + update snapshot * add test for addLeadingSlash
This commit is contained in:
parent
6730590c1e
commit
f4434b2e42
39 changed files with 791 additions and 255 deletions
|
@ -436,7 +436,10 @@ Available document ids=
|
|||
// to be by version and pick only needed base metadata.
|
||||
if (versioning.enabled) {
|
||||
const docsMetadataByVersion = groupBy(
|
||||
Object.values(content.docsMetadata),
|
||||
// sort to ensure consistent output for tests
|
||||
Object.values(content.docsMetadata).sort((a, b) =>
|
||||
a.id.localeCompare(b.id),
|
||||
),
|
||||
'version',
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue