create-packer 1.24.41 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/package.json +1 -1
  2. package/template/docusaurus/.gitignore +35 -0
  3. package/template/docusaurus/.prettierignore +4 -0
  4. package/template/docusaurus/.prettierrc +18 -0
  5. package/template/docusaurus/README.md +41 -0
  6. package/template/docusaurus/babel.config.js +3 -0
  7. package/template/docusaurus/blog/2019-05-28-first-blog-post.md +12 -0
  8. package/template/docusaurus/blog/2019-05-29-long-blog-post.md +44 -0
  9. package/template/docusaurus/blog/2021-08-01-mdx-blog-post.mdx +20 -0
  10. package/template/docusaurus/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
  11. package/template/docusaurus/blog/2021-08-26-welcome/index.md +25 -0
  12. package/template/docusaurus/blog/authors.yml +17 -0
  13. package/template/docusaurus/docs/intro.mdx +47 -0
  14. package/template/docusaurus/docs/tutorial-basics/_category_.json +8 -0
  15. package/template/docusaurus/docs/tutorial-basics/congratulations.md +23 -0
  16. package/template/docusaurus/docs/tutorial-basics/create-a-blog-post.md +34 -0
  17. package/template/docusaurus/docs/tutorial-basics/create-a-document.md +57 -0
  18. package/template/docusaurus/docs/tutorial-basics/create-a-page.md +43 -0
  19. package/template/docusaurus/docs/tutorial-basics/deploy-your-site.md +31 -0
  20. package/template/docusaurus/docs/tutorial-basics/markdown-features.mdx +150 -0
  21. package/template/docusaurus/docs/tutorial-extras/_category_.json +7 -0
  22. package/template/docusaurus/docs/tutorial-extras/img/docsVersionDropdown.png +0 -0
  23. package/template/docusaurus/docs/tutorial-extras/img/localeDropdown.png +0 -0
  24. package/template/docusaurus/docs/tutorial-extras/manage-docs-versions.md +55 -0
  25. package/template/docusaurus/docs/tutorial-extras/translate-your-site.md +88 -0
  26. package/template/docusaurus/docusaurus.config.js +116 -0
  27. package/template/docusaurus/package.json +52 -0
  28. package/template/docusaurus/sidebars.js +19 -0
  29. package/template/docusaurus/src/components/HomepageFeatures/index.tsx +70 -0
  30. package/template/docusaurus/src/components/HomepageFeatures/styles.module.css +11 -0
  31. package/template/docusaurus/src/css/custom.css +30 -0
  32. package/template/docusaurus/src/pages/index.module.css +23 -0
  33. package/template/docusaurus/src/pages/index.tsx +40 -0
  34. package/template/docusaurus/src/pages/markdown-page.md +7 -0
  35. package/template/docusaurus/static/.nojekyll +0 -0
  36. package/template/docusaurus/static/img/docusaurus-social-card.jpg +0 -0
  37. package/template/docusaurus/static/img/docusaurus.png +0 -0
  38. package/template/docusaurus/static/img/favicon.ico +0 -0
  39. package/template/docusaurus/static/img/logo.svg +1 -0
  40. package/template/docusaurus/static/img/undraw_docusaurus_mountain.svg +171 -0
  41. package/template/docusaurus/static/img/undraw_docusaurus_react.svg +170 -0
  42. package/template/docusaurus/static/img/undraw_docusaurus_tree.svg +40 -0
  43. package/template/docusaurus/tsconfig.json +7 -0
  44. package/template/web-app/{react-webpack/pages/layout/layout.tsx → react/domain/app/app-layout.tsx} +3 -3
  45. package/template/web-app/react/domain/app/app-loading.tsx +3 -0
  46. package/template/web-app/react/domain/app/app-not-found.tsx +3 -0
  47. package/template/web-app/react/domain/app/app.tsx +17 -0
  48. package/template/web-app/react/domain/app/index.ts +4 -0
  49. package/template/web-app/react/main.tsx +3 -3
  50. package/template/web-app/react/package.json +1 -1
  51. package/template/web-app/react/router/router.tsx +3 -3
  52. package/template/web-app/{react/pages/layout/layout.tsx → react-webpack/domain/app/app-layout.tsx} +3 -3
  53. package/template/web-app/react-webpack/domain/app/app-loading.tsx +3 -0
  54. package/template/web-app/react-webpack/domain/app/app-not-found.tsx +3 -0
  55. package/template/web-app/react-webpack/domain/app/app.tsx +17 -0
  56. package/template/web-app/react-webpack/domain/app/index.ts +3 -0
  57. package/template/web-app/react-webpack/main.tsx +3 -3
  58. package/template/web-app/react-webpack/router/router.tsx +3 -2
  59. package/template/web-app/vue/{providers → domain/app}/app.ts +1 -1
  60. package/template/web-app/vue/domain/app/app.vue +18 -0
  61. package/template/web-app/vue/{providers → domain/app}/createComponentInstance.ts +1 -1
  62. package/template/web-app/vue/domain/app/index.ts +4 -0
  63. package/template/web-app/vue/providers/index.ts +0 -2
  64. package/template/web-app/vue/router/index.ts +7 -12
  65. package/template/web-app/vue/tailwind.config.cjs +8 -1
  66. package/template/web-app/react/pages/layout/components/index.ts +0 -1
  67. package/template/web-app/react/pages/layout/components/loading.tsx +0 -3
  68. package/template/web-app/react/pages/layout/index.ts +0 -1
  69. package/template/web-app/react/pages/notFound/index.ts +0 -1
  70. package/template/web-app/react/pages/notFound/notFound.tsx +0 -3
  71. package/template/web-app/react-webpack/pages/layout/components/index.ts +0 -1
  72. package/template/web-app/react-webpack/pages/layout/components/loading.tsx +0 -3
  73. package/template/web-app/react-webpack/pages/layout/index.ts +0 -1
  74. package/template/web-app/react-webpack/pages/notFound/index.ts +0 -1
  75. package/template/web-app/react-webpack/pages/notFound/notFound.tsx +0 -3
  76. package/template/web-app/vue/app.vue +0 -7
  77. package/template/web-app/vue/pages/layout/index.ts +0 -1
  78. package/template/web-app/vue/pages/not-found/index.ts +0 -1
  79. package/template/workspace/nx/node_modules/.pnpm/minipass-fetch@3.0.3/node_modules/minipass-sized/.gitignore +0 -22
  80. package/template/workspace/nx/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/.gitignore +0 -22
  81. package/template/workspace/nx/node_modules/.pnpm/node_modules/minipass-sized/.gitignore +0 -22
  82. package/template/workspace/nx/node_modules/.pnpm/node_modules/npm-normalize-package-bin/.gitignore +0 -24
  83. package/template/workspace/nx/node_modules/.pnpm/npm-bundled@1.1.2/node_modules/npm-normalize-package-bin/.gitignore +0 -24
  84. package/template/workspace/nx/node_modules/.pnpm/npm-normalize-package-bin@1.0.1/node_modules/npm-normalize-package-bin/.gitignore +0 -24
  85. package/template/workspace/nx/node_modules/.pnpm/npm-packlist@5.1.1/node_modules/npm-normalize-package-bin/.gitignore +0 -24
  86. /package/template/web-app/vue/{pages/layout/layout.vue → domain/app/app-layout.vue} +0 -0
  87. /package/template/web-app/vue/{pages/not-found/not-found.vue → domain/app/app-not-found.vue} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.24.41",
3
+ "version": "1.25.0",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -0,0 +1,35 @@
1
+
2
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
3
+
4
+ # dependencies
5
+ /node_modules
6
+ /.pnp
7
+ .pnp.js
8
+
9
+ # testing
10
+ coverage/
11
+ __test__
12
+
13
+ # Generated files
14
+ .docusaurus
15
+ .cache-loader
16
+
17
+ # production
18
+ build/
19
+ dist/
20
+ .vscode/*
21
+ !.vscode/extensions.json
22
+ .idea
23
+ .history
24
+
25
+ # misc
26
+ .DS_Store
27
+ .env.local
28
+ .env.development.local
29
+ .env.test.local
30
+ .env.production.local
31
+
32
+ npm-debug.log*
33
+ yarn-debug.log*
34
+ yarn-error.log*
35
+ /pnpm-lock.yaml
@@ -0,0 +1,4 @@
1
+ **/*.md
2
+ **/*.svg
3
+ **/*.ejs
4
+ **/*.html
@@ -0,0 +1,18 @@
1
+ {
2
+ "overrides": [
3
+ {
4
+ "files": ".prettierrc",
5
+ "options": { "parser": "json" }
6
+ }
7
+ ],
8
+ "printWidth": 100,
9
+ "tabWidth": 4,
10
+ "useTabs": false,
11
+ "semi": false,
12
+ "singleQuote": true,
13
+ "trailingComma": "none",
14
+ "bracketSpacing": true,
15
+ "bracketSameLine": false,
16
+ "arrowParens": "avoid",
17
+ "rangeStart": 0
18
+ }
@@ -0,0 +1,41 @@
1
+ # Website
2
+
3
+ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4
+
5
+ ### Installation
6
+
7
+ ```
8
+ $ yarn
9
+ ```
10
+
11
+ ### Local Development
12
+
13
+ ```
14
+ $ yarn start
15
+ ```
16
+
17
+ This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18
+
19
+ ### Build
20
+
21
+ ```
22
+ $ yarn build
23
+ ```
24
+
25
+ This command generates static content into the `build` directory and can be served using any static contents hosting service.
26
+
27
+ ### Deployment
28
+
29
+ Using SSH:
30
+
31
+ ```
32
+ $ USE_SSH=true yarn deploy
33
+ ```
34
+
35
+ Not using SSH:
36
+
37
+ ```
38
+ $ GIT_USER=<Your GitHub username> yarn deploy
39
+ ```
40
+
41
+ If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3
+ };
@@ -0,0 +1,12 @@
1
+ ---
2
+ slug: first-blog-post
3
+ title: First Blog Post
4
+ authors:
5
+ name: Gao Wei
6
+ title: Docusaurus Core Team
7
+ url: https://github.com/wgao19
8
+ image_url: https://github.com/wgao19.png
9
+ tags: [hola, docusaurus]
10
+ ---
11
+
12
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
@@ -0,0 +1,44 @@
1
+ ---
2
+ slug: long-blog-post
3
+ title: Long Blog Post
4
+ authors: endi
5
+ tags: [hello, docusaurus]
6
+ ---
7
+
8
+ This is the summary of a very long blog post,
9
+
10
+ Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
11
+
12
+ <!--truncate-->
13
+
14
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
15
+
16
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
17
+
18
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
19
+
20
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
21
+
22
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
23
+
24
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
25
+
26
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
27
+
28
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
29
+
30
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
31
+
32
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
33
+
34
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
35
+
36
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
37
+
38
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
39
+
40
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
41
+
42
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
43
+
44
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
@@ -0,0 +1,20 @@
1
+ ---
2
+ slug: mdx-blog-post
3
+ title: MDX Blog Post
4
+ authors: [slorber]
5
+ tags: [docusaurus]
6
+ ---
7
+
8
+ Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
9
+
10
+ :::tip
11
+
12
+ Use the power of React to create interactive blog posts.
13
+
14
+ ```js
15
+ <button onClick={() => alert('button clicked!')}>Click me!</button>
16
+ ```
17
+
18
+ <button onClick={() => alert('button clicked!')}>Click me!</button>
19
+
20
+ :::
@@ -0,0 +1,25 @@
1
+ ---
2
+ slug: welcome
3
+ title: Welcome
4
+ authors: [slorber, yangshun]
5
+ tags: [facebook, hello, docusaurus]
6
+ ---
7
+
8
+ [Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
9
+
10
+ Simply add Markdown files (or folders) to the `blog` directory.
11
+
12
+ Regular blog authors can be added to `authors.yml`.
13
+
14
+ The blog post date can be extracted from filenames, such as:
15
+
16
+ - `2019-05-30-welcome.md`
17
+ - `2019-05-30-welcome/index.md`
18
+
19
+ A blog post folder can be convenient to co-locate blog post images:
20
+
21
+ ![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)
22
+
23
+ The blog supports tags as well!
24
+
25
+ **And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
@@ -0,0 +1,17 @@
1
+ endi:
2
+ name: Endilie Yacop Sucipto
3
+ title: Maintainer of Docusaurus
4
+ url: https://github.com/endiliey
5
+ image_url: https://github.com/endiliey.png
6
+
7
+ yangshun:
8
+ name: Yangshun Tay
9
+ title: Front End Engineer @ Facebook
10
+ url: https://github.com/yangshun
11
+ image_url: https://github.com/yangshun.png
12
+
13
+ slorber:
14
+ name: Sébastien Lorber
15
+ title: Docusaurus maintainer
16
+ url: https://sebastienlorber.com
17
+ image_url: https://github.com/slorber.png
@@ -0,0 +1,47 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ # Tutorial Intro
6
+
7
+ Let's discover **Docusaurus in less than 5 minutes**.
8
+
9
+ ## Getting Started
10
+
11
+ Get started by **creating a new site**.
12
+
13
+ Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
14
+
15
+ ### What you'll need
16
+
17
+ - [Node.js](https://nodejs.org/en/download/) version 16.14 or above:
18
+ - When installing Node.js, you are recommended to check all checkboxes related to dependencies.
19
+
20
+ ## Generate a new site
21
+
22
+ Generate a new Docusaurus site using the **classic template**.
23
+
24
+ The classic template will automatically be added to your project after you run the command:
25
+
26
+ ```bash
27
+ npm init docusaurus@latest my-website classic
28
+ ```
29
+
30
+ You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
31
+
32
+ The command also installs all necessary dependencies you need to run Docusaurus.
33
+
34
+ ## Start your site
35
+
36
+ Run the development server:
37
+
38
+ ```bash
39
+ cd my-website
40
+ npm run start
41
+ ```
42
+
43
+ The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
44
+
45
+ The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
46
+
47
+ Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
@@ -0,0 +1,8 @@
1
+ {
2
+ "label": "Tutorial - Basics",
3
+ "position": 2,
4
+ "link": {
5
+ "type": "generated-index",
6
+ "description": "5 minutes to learn the most important Docusaurus concepts."
7
+ }
8
+ }
@@ -0,0 +1,23 @@
1
+ ---
2
+ sidebar_position: 6
3
+ ---
4
+
5
+ # Congratulations!
6
+
7
+ You have just learned the **basics of Docusaurus** and made some changes to the **initial template**.
8
+
9
+ Docusaurus has **much more to offer**!
10
+
11
+ Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**.
12
+
13
+ Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610)
14
+
15
+ ## What's next?
16
+
17
+ - Read the [official documentation](https://docusaurus.io/)
18
+ - Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
19
+ - Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
20
+ - Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
21
+ - Add a [search bar](https://docusaurus.io/docs/search)
22
+ - Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
23
+ - Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)
@@ -0,0 +1,34 @@
1
+ ---
2
+ sidebar_position: 3
3
+ ---
4
+
5
+ # Create a Blog Post
6
+
7
+ Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed...
8
+
9
+ ## Create your first Post
10
+
11
+ Create a file at `blog/2021-02-28-greetings.md`:
12
+
13
+ ```md title="blog/2021-02-28-greetings.md"
14
+ ---
15
+ slug: greetings
16
+ title: Greetings!
17
+ authors:
18
+ - name: Joel Marcey
19
+ title: Co-creator of Docusaurus 1
20
+ url: https://github.com/JoelMarcey
21
+ image_url: https://github.com/JoelMarcey.png
22
+ - name: Sébastien Lorber
23
+ title: Docusaurus maintainer
24
+ url: https://sebastienlorber.com
25
+ image_url: https://github.com/slorber.png
26
+ tags: [greetings]
27
+ ---
28
+
29
+ Congratulations, you have made your first post!
30
+
31
+ Feel free to play around and edit this post as much you like.
32
+ ```
33
+
34
+ A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings).
@@ -0,0 +1,57 @@
1
+ ---
2
+ sidebar_position: 2
3
+ ---
4
+
5
+ # Create a Document
6
+
7
+ Documents are **groups of pages** connected through:
8
+
9
+ - a **sidebar**
10
+ - **previous/next navigation**
11
+ - **versioning**
12
+
13
+ ## Create your first Doc
14
+
15
+ Create a Markdown file at `docs/hello.md`:
16
+
17
+ ```md title="docs/hello.md"
18
+ # Hello
19
+
20
+ This is my **first Docusaurus document**!
21
+ ```
22
+
23
+ A new document is now available at [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello).
24
+
25
+ ## Configure the Sidebar
26
+
27
+ Docusaurus automatically **creates a sidebar** from the `docs` folder.
28
+
29
+ Add metadata to customize the sidebar label and position:
30
+
31
+ ```md title="docs/hello.md" {1-4}
32
+ ---
33
+ sidebar_label: 'Hi!'
34
+ sidebar_position: 3
35
+ ---
36
+
37
+ # Hello
38
+
39
+ This is my **first Docusaurus document**!
40
+ ```
41
+
42
+ It is also possible to create your sidebar explicitly in `sidebars.js`:
43
+
44
+ ```js title="sidebars.js"
45
+ module.exports = {
46
+ tutorialSidebar: [
47
+ 'intro',
48
+ // highlight-next-line
49
+ 'hello',
50
+ {
51
+ type: 'category',
52
+ label: 'Tutorial',
53
+ items: ['tutorial-basics/create-a-document'],
54
+ },
55
+ ],
56
+ };
57
+ ```
@@ -0,0 +1,43 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ # Create a Page
6
+
7
+ Add **Markdown or React** files to `src/pages` to create a **standalone page**:
8
+
9
+ - `src/pages/index.js` → `localhost:3000/`
10
+ - `src/pages/foo.md` → `localhost:3000/foo`
11
+ - `src/pages/foo/bar.js` → `localhost:3000/foo/bar`
12
+
13
+ ## Create your first React Page
14
+
15
+ Create a file at `src/pages/my-react-page.js`:
16
+
17
+ ```jsx title="src/pages/my-react-page.js"
18
+ import React from 'react';
19
+ import Layout from '@theme/Layout';
20
+
21
+ export default function MyReactPage() {
22
+ return (
23
+ <Layout>
24
+ <h1>My React page</h1>
25
+ <p>This is a React page</p>
26
+ </Layout>
27
+ );
28
+ }
29
+ ```
30
+
31
+ A new page is now available at [http://localhost:3000/my-react-page](http://localhost:3000/my-react-page).
32
+
33
+ ## Create your first Markdown Page
34
+
35
+ Create a file at `src/pages/my-markdown-page.md`:
36
+
37
+ ```mdx title="src/pages/my-markdown-page.md"
38
+ # My Markdown page
39
+
40
+ This is a Markdown page
41
+ ```
42
+
43
+ A new page is now available at [http://localhost:3000/my-markdown-page](http://localhost:3000/my-markdown-page).
@@ -0,0 +1,31 @@
1
+ ---
2
+ sidebar_position: 5
3
+ ---
4
+
5
+ # Deploy your site
6
+
7
+ Docusaurus is a **static-site-generator** (also called **[Jamstack](https://jamstack.org/)**).
8
+
9
+ It builds your site as simple **static HTML, JavaScript and CSS files**.
10
+
11
+ ## Build your site
12
+
13
+ Build your site **for production**:
14
+
15
+ ```bash
16
+ npm run build
17
+ ```
18
+
19
+ The static files are generated in the `build` folder.
20
+
21
+ ## Deploy your site
22
+
23
+ Test your production build locally:
24
+
25
+ ```bash
26
+ npm run serve
27
+ ```
28
+
29
+ The `build` folder is now served at [http://localhost:3000/](http://localhost:3000/).
30
+
31
+ You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://docusaurus.io/docs/deployment)**).
@@ -0,0 +1,150 @@
1
+ ---
2
+ sidebar_position: 4
3
+ ---
4
+
5
+ # Markdown Features
6
+
7
+ Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/syntax)** and a few **additional features**.
8
+
9
+ ## Front Matter
10
+
11
+ Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/):
12
+
13
+ ```text title="my-doc.md"
14
+ // highlight-start
15
+ ---
16
+ id: my-doc-id
17
+ title: My document title
18
+ description: My document description
19
+ slug: /my-custom-url
20
+ ---
21
+ // highlight-end
22
+
23
+ ## Markdown heading
24
+
25
+ Markdown text with [links](./hello.md)
26
+ ```
27
+
28
+ ## Links
29
+
30
+ Regular Markdown links are supported, using url paths or relative file paths.
31
+
32
+ ```md
33
+ Let's see how to [Create a page](/create-a-page).
34
+ ```
35
+
36
+ ```md
37
+ Let's see how to [Create a page](./create-a-page.md).
38
+ ```
39
+
40
+ **Result:** Let's see how to [Create a page](./create-a-page.md).
41
+
42
+ ## Images
43
+
44
+ Regular Markdown images are supported.
45
+
46
+ You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`):
47
+
48
+ ```md
49
+ ![Docusaurus logo](/img/docusaurus.png)
50
+ ```
51
+
52
+ ![Docusaurus logo](/img/docusaurus.png)
53
+
54
+ You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
55
+
56
+ ```md
57
+ ![Docusaurus logo](./img/docusaurus.png)
58
+ ```
59
+
60
+ ## Code Blocks
61
+
62
+ Markdown code blocks are supported with Syntax highlighting.
63
+
64
+ ```jsx title="src/components/HelloDocusaurus.js"
65
+ function HelloDocusaurus() {
66
+ return (
67
+ <h1>Hello, Docusaurus!</h1>
68
+ )
69
+ }
70
+ ```
71
+
72
+ ```jsx title="src/components/HelloDocusaurus.js"
73
+ function HelloDocusaurus() {
74
+ return <h1>Hello, Docusaurus!</h1>;
75
+ }
76
+ ```
77
+
78
+ ## Admonitions
79
+
80
+ Docusaurus has a special syntax to create admonitions and callouts:
81
+
82
+ :::tip My tip
83
+
84
+ Use this awesome feature option
85
+
86
+ :::
87
+
88
+ :::danger Take care
89
+
90
+ This action is dangerous
91
+
92
+ :::
93
+
94
+ :::tip My tip
95
+
96
+ Use this awesome feature option
97
+
98
+ :::
99
+
100
+ :::danger Take care
101
+
102
+ This action is dangerous
103
+
104
+ :::
105
+
106
+ ## MDX and React Components
107
+
108
+ [MDX](https://mdxjs.com/) can make your documentation more **interactive** and allows using any **React components inside Markdown**:
109
+
110
+ ```jsx
111
+ export const Highlight = ({children, color}) => (
112
+ <span
113
+ style={{
114
+ backgroundColor: color,
115
+ borderRadius: '20px',
116
+ color: '#fff',
117
+ padding: '10px',
118
+ cursor: 'pointer',
119
+ }}
120
+ onClick={() => {
121
+ alert(`You clicked the color ${color} with label ${children}`)
122
+ }}>
123
+ {children}
124
+ </span>
125
+ );
126
+
127
+ This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !
128
+
129
+ This is <Highlight color="#1877F2">Facebook blue</Highlight> !
130
+ ```
131
+
132
+ export const Highlight = ({children, color}) => (
133
+ <span
134
+ style={{
135
+ backgroundColor: color,
136
+ borderRadius: '20px',
137
+ color: '#fff',
138
+ padding: '10px',
139
+ cursor: 'pointer',
140
+ }}
141
+ onClick={() => {
142
+ alert(`You clicked the color ${color} with label ${children}`);
143
+ }}>
144
+ {children}
145
+ </span>
146
+ );
147
+
148
+ This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !
149
+
150
+ This is <Highlight color="#1877F2">Facebook blue</Highlight> !
@@ -0,0 +1,7 @@
1
+ {
2
+ "label": "Tutorial - Extras",
3
+ "position": 3,
4
+ "link": {
5
+ "type": "generated-index"
6
+ }
7
+ }