mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-21 21:16:59 +02:00
Allow separate css files that don't get added to Docusaurus's
This commit is contained in:
parent
35e0a83817
commit
1edd160ceb
3 changed files with 8 additions and 2 deletions
|
@ -255,7 +255,10 @@ function execute() {
|
|||
/* copy all static files from user */
|
||||
files = glob.sync(CWD + "/static/**");
|
||||
files.forEach(file => {
|
||||
if (file.match(/\.css$/)) {
|
||||
if (
|
||||
file.match(/\.css$/) &&
|
||||
siteConfig.separateCss.indexOf(path.basename(file)) == -1
|
||||
) {
|
||||
const mainCss =
|
||||
__dirname +
|
||||
"/../../build" +
|
||||
|
|
|
@ -354,6 +354,9 @@ function execute(port) {
|
|||
let files = glob.sync(CWD + "/static/**/*.css");
|
||||
|
||||
files.forEach(file => {
|
||||
if (siteConfig.separateCss.indexOf(path.basename(file)) != -1) {
|
||||
return;
|
||||
}
|
||||
cssContent =
|
||||
cssContent + "\n" + fs.readFileSync(file, { encoding: "utf8" });
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue