-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from charliewilco/now
Now v2
- Loading branch information
Showing
12 changed files
with
124 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Prism from 'react-prism'; | ||
import 'prismjs'; | ||
import 'prism-themes/themes/prism-base16-ateliersulphurpool.light.css'; | ||
import { | ||
ModuleTable, | ||
ModuleSubHeading, | ||
ModuleHeading, | ||
ModuleContent, | ||
ModuleList, | ||
ModuleNumberedList, | ||
ModuleListItem, | ||
ModuleElements | ||
} from './module'; | ||
|
||
export const h3: React.SFC<ModuleElements> = props => <ModuleHeading {...props} />; | ||
export const h4: React.SFC<ModuleElements> = props => <ModuleSubHeading {...props} />; | ||
export const code: React.SFC<ModuleElements> = props => <Prism {...props} />; | ||
export const p: React.SFC<ModuleElements> = props => <ModuleContent {...props} />; | ||
export const table: React.SFC<ModuleElements> = props => <ModuleTable {...props} />; | ||
export const ul: React.SFC<ModuleElements> = props => <ModuleList {...props} />; | ||
export const ol: React.SFC<ModuleElements> = props => <ModuleNumberedList {...props} />; | ||
export const li: React.SFC<ModuleElements> = props => <ModuleListItem {...props} />; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,43 @@ | ||
const withTypescript = require('@zeit/next-typescript'); | ||
const withMDX = require('@zeit/next-mdx')({ | ||
extension: /\.mdx?$/ | ||
}); | ||
|
||
const withCSS = require('@zeit/next-css'); | ||
const { PHASE_PRODUCTION_SERVER } = | ||
process.env.NODE_ENV === 'development' | ||
? {} | ||
: !process.env.NOW_REGION | ||
? require('next/constants') | ||
: require('next-server/constants'); | ||
|
||
const raw = { | ||
test: /\.txt$/, | ||
use: 'raw-loader' | ||
}; | ||
|
||
module.exports = withTypescript( | ||
withCSS( | ||
withMDX({ | ||
const webpack = config => { | ||
config.module.rules.push(raw); | ||
return config; | ||
}; | ||
|
||
module.exports = (phase, { defaultConfig }) => { | ||
if (phase === PHASE_PRODUCTION_SERVER) { | ||
// Config used to run in production. | ||
|
||
return { | ||
pageExtensions: ['js', 'jsx', 'mdx'], | ||
webpack(config) { | ||
config.module.rules.push(raw); | ||
webpack | ||
}; | ||
} | ||
// ✅ Put the require call here. | ||
|
||
const withCSS = require('@zeit/next-css'); | ||
const withTypescript = require('@zeit/next-typescript'); | ||
const withMDX = require('@zeit/next-mdx')({ | ||
extension: /\.mdx?$/ | ||
}); | ||
|
||
return config; | ||
} | ||
}) | ||
) | ||
); | ||
return withTypescript( | ||
withCSS( | ||
withMDX({ | ||
pageExtensions: ['js', 'jsx', 'mdx'], | ||
webpack | ||
}) | ||
) | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version": 2, | ||
"name": "obsidian-documentation", | ||
"alias": "obsidian.charlespeters.net", | ||
"builds": [{ "src": "documentation/next.config.js", "use": "@now/next" }], | ||
"routes": [{ "src": "/(.*)", "dest": "/documentation/$1" }] | ||
} |
ad4768c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully aliased the URL https://obsidian-documentation-b002uybod.now.sh to the following alias.