Skip to content
This repository was archived by the owner on Oct 15, 2021. It is now read-only.

Commit 5e533ba

Browse files
committed
fix: Make it possible to use nested pages
1 parent a94d678 commit 5e533ba

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

build/handlebars.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ metalsmith(__dirname)
4545
.use(layouts({
4646
directory: path.join(__dirname, '../', settings.sources.handlebars, 'layouts'),
4747
default: 'default.hbs',
48-
pattern: '*.hbs'
48+
pattern: '**/*.hbs'
4949
}))
5050

5151
// Render handlebars content pages
@@ -57,7 +57,7 @@ metalsmith(__dirname)
5757
}))
5858

5959
// Only build HTML files
60-
.use(filter('*.html'))
60+
.use(filter(['**/*.html', 'handlebars']))
6161

6262
// Finally build files
6363
.build(err => {

build/webpack/config.output.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ const configFile = require('../../baumeister.json');
77
export const output = {
88
path: isDevMode() ? path.join(__dirname, '../', mainDirectories.dev) : path.join(__dirname, '../', mainDirectories.prod),
99
filename: configFile.cacheBusting ? 'app/[name].[chunkhash].bundle.js' : 'app/[name].bundle.js',
10-
chunkFilename: configFile.cacheBusting ? 'app/[name].[chunkhash].bundle.js' : 'app/[name].bundle.js'
10+
chunkFilename: configFile.cacheBusting ? 'app/[name].[chunkhash].bundle.js' : 'app/[name].bundle.js',
11+
publicPath: '/'
1112
};

build/webpack/config.plugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const generalPlugins = [
5353
if (!($1 in manifest.assets)) {
5454
return `<!-- No ${$1} to be bundled -->`;
5555
}
56-
return /\.css/g.test($1) ? `<link href="${manifest.assets[$1]}" rel="stylesheet">` : `<script src="${manifest.assets[$1]}"></script>`;
56+
return /\.css/g.test($1) ? `<link href="/${manifest.assets[$1]}" rel="stylesheet">` : `<script src="/${manifest.assets[$1]}"></script>`;
5757
});
5858
}
5959
},

0 commit comments

Comments
 (0)