mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-27 23:17:56 +02:00
fix: reload siteConfig.js automatically when locally served page is refreshed (#1509)
* fix: livereload siteConfig * fix test * nits
This commit is contained in:
parent
aa157969cf
commit
166816af40
11 changed files with 53 additions and 42 deletions
|
@ -71,6 +71,7 @@ describe('mdToHtmlify', () => {
|
|||
const siteConfig = {
|
||||
baseUrl: '/',
|
||||
docsUrl: 'docs',
|
||||
cleanUrl: true,
|
||||
};
|
||||
const mdToHtml = metadataUtils.mdToHtml(Metadata, siteConfig);
|
||||
|
||||
|
@ -79,6 +80,7 @@ describe('mdToHtmlify', () => {
|
|||
rawContent1,
|
||||
mdToHtml,
|
||||
Metadata['en-doc1'],
|
||||
siteConfig,
|
||||
);
|
||||
expect(content1).not.toContain('/docs/en/next/');
|
||||
expect(content1).toMatchSnapshot();
|
||||
|
@ -90,6 +92,7 @@ describe('mdToHtmlify', () => {
|
|||
rawContent2,
|
||||
mdToHtml,
|
||||
Metadata['en-doc2'],
|
||||
siteConfig,
|
||||
);
|
||||
expect(content2).toContain('/docs/en/next/');
|
||||
expect(content2).toMatchSnapshot();
|
||||
|
@ -111,6 +114,7 @@ describe('mdToHtmlify', () => {
|
|||
rawContent3,
|
||||
customMdToHtml,
|
||||
customMetadata['subdir-doc3'],
|
||||
siteConfig,
|
||||
);
|
||||
expect(content3).toContain('/docs/subdir/doc3');
|
||||
expect(content3).not.toContain('subdir/doc3.md');
|
||||
|
@ -123,6 +127,7 @@ describe('mdToHtmlify', () => {
|
|||
rawContentRefLinks,
|
||||
mdToHtml,
|
||||
Metadata['en-reflinks'],
|
||||
siteConfig,
|
||||
);
|
||||
expect(contentRefLinks).toContain('/docs/en/next/');
|
||||
expect(contentRefLinks).toMatchSnapshot();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue