Skip to content
This repository was archived by the owner on Aug 9, 2020. It is now read-only.

Commit df147f7

Browse files
author
Jason Maurer
committed
use theme name from config
1 parent f38f372 commit df147f7

File tree

8 files changed

+7
-16
lines changed

8 files changed

+7
-16
lines changed

src/core/compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = async (env, props) => {
1919
entry: {
2020
main: [
2121
isDev && 'webpack-hot-middleware/client',
22-
`${THEMES_DIR}/browser.js`,
22+
`${THEMES_DIR}/${props.config.theme}/index.js`,
2323
].filter(Boolean),
2424
},
2525
output: {

themes/default/application/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Header from '../header'
55
import Sidebar from '../sidebar'
66
import Page from '../page'
77
import NotFound from '../not-found'
8-
import Routes from '../../routes'
8+
import Routes from '../routes'
99
import styles from './styles'
1010

1111
export default class extends Component {

themes/browser.js renamed to themes/default/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import ReactDOM from 'react-dom'
33
import { BrowserRouter } from 'react-router-dom'
44
// import { rehydrate } from 'glamor'
5-
import App from './'
5+
import App from './application'
66

77
const render = process.env.NODE_ENV === 'production'
88
? ReactDOM.hydrate
File renamed without changes.

themes/default/page/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component } from 'react'
22
import Helmet from 'react-helmet'
3-
import Markdown from '../../markdown'
3+
import Markdown from '../markdown'
44
import Loading from '../loading'
55
import styles from './styles'
66

File renamed without changes.

themes/index.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

themes/server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import React from 'react'
22
import { StaticRouter } from 'react-router-dom'
3-
import App from './'
43

54
export default function (route, props) {
5+
const { theme } = props.config
6+
const App = require(`./${theme}/application`).default
7+
68
return (
79
<StaticRouter
810
context={{}}

0 commit comments

Comments
 (0)