mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 19:32:35 +02:00
feat(v2): shorter chunk naming for pages (#1688)
* refactor(v2): dont show absolute path for pages chunk/source naming * test n changelog
This commit is contained in:
parent
f1a504e813
commit
6287739bec
3 changed files with 10 additions and 5 deletions
|
@ -22,15 +22,15 @@ describe('docusaurus-plugin-content-pages', () => {
|
|||
siteConfig,
|
||||
});
|
||||
const pagesMetadatas = await plugin.loadContent();
|
||||
const pagesDir = plugin.contentPath;
|
||||
const pagesPath = path.relative(siteDir, plugin.contentPath);
|
||||
expect(pagesMetadatas).toEqual([
|
||||
{
|
||||
permalink: '/',
|
||||
source: path.join(pagesDir, 'index.js'),
|
||||
source: path.join('@site', pagesPath, 'index.js'),
|
||||
},
|
||||
{
|
||||
permalink: '/hello/world',
|
||||
source: path.join(pagesDir, 'hello', 'world.js'),
|
||||
source: path.join('@site', pagesPath, 'hello', 'world.js'),
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue