feat(v2): implement blog (#1062)

* feat(v2): implement blog

* expect flat blog structure

* \n

* blogpage can import many posts
This commit is contained in:
Endilie Yacop Sucipto 2018-10-25 14:23:29 +08:00 committed by GitHub
parent a2d3f26722
commit 12fd204840
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 736 additions and 16 deletions

View file

@ -7,7 +7,15 @@ module.exports = function loadConfig(siteDir) {
? customThemePath
: path.resolve(__dirname, '../theme');
const themeComponents = ['Doc', 'Pages', 'Loading', 'NotFound', 'Markdown'];
const themeComponents = [
'Doc',
'BlogPost',
'BlogPage',
'Pages',
'Loading',
'NotFound',
'Markdown',
];
themeComponents.forEach(component => {
if (!require.resolve(path.join(themePath, component))) {
throw new Error(