From 358b029a035458f997b0b53266a41bb2fc32371f Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Sat, 9 Mar 2019 18:34:20 -0500 Subject: [PATCH] Update template --- README.md | 21 +++++++-------------- package.json | 1 + packages/mdx-deck/package.json | 2 ++ templates/basic/README.md | 13 ------------- templates/basic/deck.mdx | 10 +++++----- templates/basic/package.json | 6 +++--- templates/basic/theme.js | 7 +------ 7 files changed, 19 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 8153dc1..ae4e741 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ MDX can use Markdown syntax and render React components with JSX. ### Imports -To import components, use ES import syntax separated with empty lines from any markdown or JSX syntax. +To import components, use ES import syntax separated with empty lines between any markdown or JSX syntax. ```mdx import { Box } from 'grid-styled' @@ -112,7 +112,7 @@ Read more about MDX syntax in the [MDX Docs][mdx]. ## Theming -mdx-deck uses [styled-components][] for styling, making practically any part of the presentation themeable. +mdx-deck uses [emotion][] for styling, making practically any part of the presentation themeable. ### Built-in Themes @@ -200,7 +200,8 @@ export default ({ children }) => ( width: '100vw', height: '100vw', backgroundColor: 'tomato', - }}> + }} + > {children} ) @@ -335,22 +336,14 @@ See more exporting options in the [Exporting Documentation](docs/exporting.md) ### Related - [MDX][] -- [mdx-go][] -- [ok-mdx][] -- [Compositor x0][] -- [styled-components][] -- [styled-system][] +- [emotion][] - [Spectacle][] [MIT License](LICENSE.md) -[mdx]: https://github.com/mdx-js/mdx -[ok-mdx]: https://github.com/jxnblk/ok-mdx -[compositor x0]: https://github.com/c8r/x0 -[styled-system]: https://github.com/jxnblk/styled-system -[styled-components]: https://github.com/styled-components/styled-components +[mdx]: https://mdxjs.com/ [spectacle]: https://github.com/FormidableLabs/spectacle -[mdx-go]: https://github.com/jxnblk/mdx-go +[emotion]: https://emotion.sh diff --git a/package.json b/package.json index 4c2a86e..5b91996 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "2.0.0-0", "workspaces": [ "packages/*", + "templates/*", "docs" ], "scripts": { diff --git a/packages/mdx-deck/package.json b/packages/mdx-deck/package.json index 0127e64..2fa83a0 100644 --- a/packages/mdx-deck/package.json +++ b/packages/mdx-deck/package.json @@ -27,7 +27,9 @@ "@emotion/core": "^10.0.7", "@emotion/styled": "^10.0.7", "@mdx-deck/components": "^2.0.0-0", + "@mdx-deck/layouts": "^2.0.0-0", "@mdx-deck/loader": "^2.0.0-0", + "@mdx-deck/themes": "^2.0.0-0", "@mdx-deck/webpack-html-plugin": "^2.0.0-0", "@mdx-js/mdx": "^1.0.0-alpha.5", "@mdx-js/tag": "^1.0.0-alpha.5", diff --git a/templates/basic/README.md b/templates/basic/README.md index 037ab86..c0ecae1 100644 --- a/templates/basic/README.md +++ b/templates/basic/README.md @@ -1,4 +1,3 @@ - # mdx-deck basic template This was generated with [mdx-deck][]'s `npm init deck` command. @@ -21,18 +20,6 @@ To build the presentation deck as static HTML: npm run build ``` -To export a PDF: - -```sh -npm run pdf -``` - -To export an image of the title slide: - -```sh -npm run image -``` - For more documentation see the [mdx-deck][] repo. [mdx-deck]: https://github.com/jxnblk/mdx-deck diff --git a/templates/basic/deck.mdx b/templates/basic/deck.mdx index 0f5638d..cce7f23 100644 --- a/templates/basic/deck.mdx +++ b/templates/basic/deck.mdx @@ -1,6 +1,6 @@ -import { Head } from 'mdx-deck' +import { Head, Notes } from 'mdx-deck' -export { default as theme } from './theme' +export { theme } from './theme' Presentation Title @@ -14,9 +14,9 @@ export { default as theme } from './theme' To create your presentation -```notes -- Create speaker notes in fenced code blocks -``` + +Create speaker notes with the Notes component + --- diff --git a/templates/basic/package.json b/templates/basic/package.json index f9d3ae6..4d046b4 100644 --- a/templates/basic/package.json +++ b/templates/basic/package.json @@ -1,13 +1,13 @@ { "private": true, + "name": "@mdx-deck/basic-template", + "version": "2.0.0-0", "scripts": { "start": "mdx-deck deck.mdx", "build": "mdx-deck build deck.mdx", - "pdf": "mdx-deck pdf deck.mdx", - "image": "mdx-deck screenshot deck.mdx", "help": "mdx-deck" }, "devDependencies": { - "mdx-deck": "^1.6.7" + "mdx-deck": "^2.0.0-0" } } diff --git a/templates/basic/theme.js b/templates/basic/theme.js index 780eb4e..f68522f 100644 --- a/templates/basic/theme.js +++ b/templates/basic/theme.js @@ -1,12 +1,7 @@ -import theme from 'mdx-deck/themes' - -export default { - ...theme, - +export const theme = { // Customize your presentation theme here. // // Read the docs for more info: // https://github.com/jxnblk/mdx-deck/blob/master/docs/theming.md // https://github.com/jxnblk/mdx-deck/blob/master/docs/themes.md - }