From 361416cfffa0fa381f4eda500823eb54e8db386b Mon Sep 17 00:00:00 2001 From: James Wyndham Date: Thu, 14 Mar 2024 03:51:22 +0800 Subject: [PATCH] feature - added new documentation sections --- .../{create-a-page.md => onpage-seo.md} | 0 ...your-site.md => setup-google-analytics.md} | 0 .../{congratulations.md => setup-post-hog.md} | 0 .../{congratulations.md => logging.md} | 0 .../{deploy-your-site.md => performance.md} | 0 .../{create-a-page.md => user-issue-guide.md} | 0 .../design/{create-a-page.md => daisyui.md} | 0 .../{deploy-your-site.md => tailwind.md} | 0 .../design/{congratulations.md => theming.md} | 0 ...{create-a-document.md => digital-ocean.md} | 0 .../cloud/{deploy-your-site.md => fly.md} | 0 .../{create-a-page.md => google-cloud-run.md} | 0 .../{congratulations.md => pockethost.md} | 0 .../{create-a-blog-post.md => railway.md} | 0 ...ur-site.md => setup-records-cloudflare.md} | 0 ...ate-a-page.md => setup-records-porkbun.md} | 0 ...ratulations.md => setup-records-vercel.md} | 0 ...eploy-your-site.md => custom-templates.md} | 0 .../mail/{create-a-page.md => newsletter.md} | 0 ...ongratulations.md => smtp-server-setup.md} | 0 ...reate-a-blog-post.md => authentication.md} | 0 .../{congratulations.md => authorization.md} | 0 .../{deploy-your-site.md => hooks.md} | 0 .../{create-a-document.md => mail-testing.md} | 0 .../pocketbase/{create-a-page.md => usage.md} | 0 Documentation/docs/selling/_category_.json | 8 + .../communities.md} | 0 .../docs/{stripe => selling}/create-a-page.md | 0 .../docs/selling/markdown-features.mdx | 152 ++++++++++++++++++ Documentation/docs/selling/networking.md | 34 ++++ .../socialmedia.md} | 0 .../deploy-your-site.md => selling/work.md} | 0 .../setup-products.md} | 0 .../setup-stripe.md} | 0 .../stripe-cli.md} | 0 .../docs/web-app/SSR-SSG-CSR-Guide.md | 57 +++++++ Documentation/docs/web-app/design-guides.md | 31 ++++ Documentation/docs/web-app/inspiration.md | 43 +++++ Documentation/docs/web-app/snippets.md | 23 +++ 39 files changed, 348 insertions(+) rename Documentation/docs/analytics/{create-a-page.md => onpage-seo.md} (100%) rename Documentation/docs/analytics/{deploy-your-site.md => setup-google-analytics.md} (100%) rename Documentation/docs/analytics/{congratulations.md => setup-post-hog.md} (100%) rename Documentation/docs/debugging/{congratulations.md => logging.md} (100%) rename Documentation/docs/debugging/{deploy-your-site.md => performance.md} (100%) rename Documentation/docs/debugging/{create-a-page.md => user-issue-guide.md} (100%) rename Documentation/docs/design/{create-a-page.md => daisyui.md} (100%) rename Documentation/docs/design/{deploy-your-site.md => tailwind.md} (100%) rename Documentation/docs/design/{congratulations.md => theming.md} (100%) rename Documentation/docs/hosting/cloud/{create-a-document.md => digital-ocean.md} (100%) rename Documentation/docs/hosting/cloud/{deploy-your-site.md => fly.md} (100%) rename Documentation/docs/hosting/cloud/{create-a-page.md => google-cloud-run.md} (100%) rename Documentation/docs/hosting/cloud/{congratulations.md => pockethost.md} (100%) rename Documentation/docs/hosting/cloud/{create-a-blog-post.md => railway.md} (100%) rename Documentation/docs/hosting/dns/{deploy-your-site.md => setup-records-cloudflare.md} (100%) rename Documentation/docs/hosting/dns/{create-a-page.md => setup-records-porkbun.md} (100%) rename Documentation/docs/hosting/dns/{congratulations.md => setup-records-vercel.md} (100%) rename Documentation/docs/mail/{deploy-your-site.md => custom-templates.md} (100%) rename Documentation/docs/mail/{create-a-page.md => newsletter.md} (100%) rename Documentation/docs/mail/{congratulations.md => smtp-server-setup.md} (100%) rename Documentation/docs/pocketbase/{create-a-blog-post.md => authentication.md} (100%) rename Documentation/docs/pocketbase/{congratulations.md => authorization.md} (100%) rename Documentation/docs/pocketbase/{deploy-your-site.md => hooks.md} (100%) rename Documentation/docs/pocketbase/{create-a-document.md => mail-testing.md} (100%) rename Documentation/docs/pocketbase/{create-a-page.md => usage.md} (100%) create mode 100644 Documentation/docs/selling/_category_.json rename Documentation/docs/{stripe/congratulations.md => selling/communities.md} (100%) rename Documentation/docs/{stripe => selling}/create-a-page.md (100%) create mode 100644 Documentation/docs/selling/markdown-features.mdx create mode 100644 Documentation/docs/selling/networking.md rename Documentation/docs/{web-app/create-a-document.md => selling/socialmedia.md} (100%) rename Documentation/docs/{stripe/deploy-your-site.md => selling/work.md} (100%) rename Documentation/docs/{web-app/create-a-page.md => stripe/setup-products.md} (100%) rename Documentation/docs/{web-app/congratulations.md => stripe/setup-stripe.md} (100%) rename Documentation/docs/{web-app/deploy-your-site.md => stripe/stripe-cli.md} (100%) create mode 100644 Documentation/docs/web-app/SSR-SSG-CSR-Guide.md create mode 100644 Documentation/docs/web-app/design-guides.md create mode 100644 Documentation/docs/web-app/inspiration.md create mode 100644 Documentation/docs/web-app/snippets.md diff --git a/Documentation/docs/analytics/create-a-page.md b/Documentation/docs/analytics/onpage-seo.md similarity index 100% rename from Documentation/docs/analytics/create-a-page.md rename to Documentation/docs/analytics/onpage-seo.md diff --git a/Documentation/docs/analytics/deploy-your-site.md b/Documentation/docs/analytics/setup-google-analytics.md similarity index 100% rename from Documentation/docs/analytics/deploy-your-site.md rename to Documentation/docs/analytics/setup-google-analytics.md diff --git a/Documentation/docs/analytics/congratulations.md b/Documentation/docs/analytics/setup-post-hog.md similarity index 100% rename from Documentation/docs/analytics/congratulations.md rename to Documentation/docs/analytics/setup-post-hog.md diff --git a/Documentation/docs/debugging/congratulations.md b/Documentation/docs/debugging/logging.md similarity index 100% rename from Documentation/docs/debugging/congratulations.md rename to Documentation/docs/debugging/logging.md diff --git a/Documentation/docs/debugging/deploy-your-site.md b/Documentation/docs/debugging/performance.md similarity index 100% rename from Documentation/docs/debugging/deploy-your-site.md rename to Documentation/docs/debugging/performance.md diff --git a/Documentation/docs/debugging/create-a-page.md b/Documentation/docs/debugging/user-issue-guide.md similarity index 100% rename from Documentation/docs/debugging/create-a-page.md rename to Documentation/docs/debugging/user-issue-guide.md diff --git a/Documentation/docs/design/create-a-page.md b/Documentation/docs/design/daisyui.md similarity index 100% rename from Documentation/docs/design/create-a-page.md rename to Documentation/docs/design/daisyui.md diff --git a/Documentation/docs/design/deploy-your-site.md b/Documentation/docs/design/tailwind.md similarity index 100% rename from Documentation/docs/design/deploy-your-site.md rename to Documentation/docs/design/tailwind.md diff --git a/Documentation/docs/design/congratulations.md b/Documentation/docs/design/theming.md similarity index 100% rename from Documentation/docs/design/congratulations.md rename to Documentation/docs/design/theming.md diff --git a/Documentation/docs/hosting/cloud/create-a-document.md b/Documentation/docs/hosting/cloud/digital-ocean.md similarity index 100% rename from Documentation/docs/hosting/cloud/create-a-document.md rename to Documentation/docs/hosting/cloud/digital-ocean.md diff --git a/Documentation/docs/hosting/cloud/deploy-your-site.md b/Documentation/docs/hosting/cloud/fly.md similarity index 100% rename from Documentation/docs/hosting/cloud/deploy-your-site.md rename to Documentation/docs/hosting/cloud/fly.md diff --git a/Documentation/docs/hosting/cloud/create-a-page.md b/Documentation/docs/hosting/cloud/google-cloud-run.md similarity index 100% rename from Documentation/docs/hosting/cloud/create-a-page.md rename to Documentation/docs/hosting/cloud/google-cloud-run.md diff --git a/Documentation/docs/hosting/cloud/congratulations.md b/Documentation/docs/hosting/cloud/pockethost.md similarity index 100% rename from Documentation/docs/hosting/cloud/congratulations.md rename to Documentation/docs/hosting/cloud/pockethost.md diff --git a/Documentation/docs/hosting/cloud/create-a-blog-post.md b/Documentation/docs/hosting/cloud/railway.md similarity index 100% rename from Documentation/docs/hosting/cloud/create-a-blog-post.md rename to Documentation/docs/hosting/cloud/railway.md diff --git a/Documentation/docs/hosting/dns/deploy-your-site.md b/Documentation/docs/hosting/dns/setup-records-cloudflare.md similarity index 100% rename from Documentation/docs/hosting/dns/deploy-your-site.md rename to Documentation/docs/hosting/dns/setup-records-cloudflare.md diff --git a/Documentation/docs/hosting/dns/create-a-page.md b/Documentation/docs/hosting/dns/setup-records-porkbun.md similarity index 100% rename from Documentation/docs/hosting/dns/create-a-page.md rename to Documentation/docs/hosting/dns/setup-records-porkbun.md diff --git a/Documentation/docs/hosting/dns/congratulations.md b/Documentation/docs/hosting/dns/setup-records-vercel.md similarity index 100% rename from Documentation/docs/hosting/dns/congratulations.md rename to Documentation/docs/hosting/dns/setup-records-vercel.md diff --git a/Documentation/docs/mail/deploy-your-site.md b/Documentation/docs/mail/custom-templates.md similarity index 100% rename from Documentation/docs/mail/deploy-your-site.md rename to Documentation/docs/mail/custom-templates.md diff --git a/Documentation/docs/mail/create-a-page.md b/Documentation/docs/mail/newsletter.md similarity index 100% rename from Documentation/docs/mail/create-a-page.md rename to Documentation/docs/mail/newsletter.md diff --git a/Documentation/docs/mail/congratulations.md b/Documentation/docs/mail/smtp-server-setup.md similarity index 100% rename from Documentation/docs/mail/congratulations.md rename to Documentation/docs/mail/smtp-server-setup.md diff --git a/Documentation/docs/pocketbase/create-a-blog-post.md b/Documentation/docs/pocketbase/authentication.md similarity index 100% rename from Documentation/docs/pocketbase/create-a-blog-post.md rename to Documentation/docs/pocketbase/authentication.md diff --git a/Documentation/docs/pocketbase/congratulations.md b/Documentation/docs/pocketbase/authorization.md similarity index 100% rename from Documentation/docs/pocketbase/congratulations.md rename to Documentation/docs/pocketbase/authorization.md diff --git a/Documentation/docs/pocketbase/deploy-your-site.md b/Documentation/docs/pocketbase/hooks.md similarity index 100% rename from Documentation/docs/pocketbase/deploy-your-site.md rename to Documentation/docs/pocketbase/hooks.md diff --git a/Documentation/docs/pocketbase/create-a-document.md b/Documentation/docs/pocketbase/mail-testing.md similarity index 100% rename from Documentation/docs/pocketbase/create-a-document.md rename to Documentation/docs/pocketbase/mail-testing.md diff --git a/Documentation/docs/pocketbase/create-a-page.md b/Documentation/docs/pocketbase/usage.md similarity index 100% rename from Documentation/docs/pocketbase/create-a-page.md rename to Documentation/docs/pocketbase/usage.md diff --git a/Documentation/docs/selling/_category_.json b/Documentation/docs/selling/_category_.json new file mode 100644 index 0000000..a1ae9df --- /dev/null +++ b/Documentation/docs/selling/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Debugging", + "position": 5, + "link": { + "type": "generated-index", + "description": "5 minutes to learn the most important Docusaurus concepts." + } +} diff --git a/Documentation/docs/stripe/congratulations.md b/Documentation/docs/selling/communities.md similarity index 100% rename from Documentation/docs/stripe/congratulations.md rename to Documentation/docs/selling/communities.md diff --git a/Documentation/docs/stripe/create-a-page.md b/Documentation/docs/selling/create-a-page.md similarity index 100% rename from Documentation/docs/stripe/create-a-page.md rename to Documentation/docs/selling/create-a-page.md diff --git a/Documentation/docs/selling/markdown-features.mdx b/Documentation/docs/selling/markdown-features.mdx new file mode 100644 index 0000000..35e0082 --- /dev/null +++ b/Documentation/docs/selling/markdown-features.mdx @@ -0,0 +1,152 @@ +--- +sidebar_position: 4 +--- + +# Markdown Features + +Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/syntax)** and a few **additional features**. + +## Front Matter + +Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/): + +```text title="my-doc.md" +// highlight-start +--- +id: my-doc-id +title: My document title +description: My document description +slug: /my-custom-url +--- +// highlight-end + +## Markdown heading + +Markdown text with [links](./hello.md) +``` + +## Links + +Regular Markdown links are supported, using url paths or relative file paths. + +```md +Let's see how to [Create a page](/create-a-page). +``` + +```md +Let's see how to [Create a page](./create-a-page.md). +``` + +**Result:** Let's see how to [Create a page](./create-a-page.md). + +## Images + +Regular Markdown images are supported. + +You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`): + +```md +![Docusaurus logo](/img/docusaurus.png) +``` + +![Docusaurus logo](/img/docusaurus.png) + +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: + +```md +![Docusaurus logo](./img/docusaurus.png) +``` + +## Code Blocks + +Markdown code blocks are supported with Syntax highlighting. + +````md +```jsx title="src/components/HelloDocusaurus.js" +function HelloDocusaurus() { + return

Hello, Docusaurus!

; +} +``` +```` + +```jsx title="src/components/HelloDocusaurus.js" +function HelloDocusaurus() { + return

Hello, Docusaurus!

; +} +``` + +## Admonitions + +Docusaurus has a special syntax to create admonitions and callouts: + +```md +:::tip My tip + +Use this awesome feature option + +::: + +:::danger Take care + +This action is dangerous + +::: +``` + +:::tip My tip + +Use this awesome feature option + +::: + +:::danger Take care + +This action is dangerous + +::: + +## MDX and React Components + +[MDX](https://mdxjs.com/) can make your documentation more **interactive** and allows using any **React components inside Markdown**: + +```jsx +export const Highlight = ({children, color}) => ( + { + alert(`You clicked the color ${color} with label ${children}`) + }}> + {children} + +); + +This is Docusaurus green ! + +This is Facebook blue ! +``` + +export const Highlight = ({children, color}) => ( + { + alert(`You clicked the color ${color} with label ${children}`); + }}> + {children} + +); + +This is Docusaurus green ! + +This is Facebook blue ! diff --git a/Documentation/docs/selling/networking.md b/Documentation/docs/selling/networking.md new file mode 100644 index 0000000..550ae17 --- /dev/null +++ b/Documentation/docs/selling/networking.md @@ -0,0 +1,34 @@ +--- +sidebar_position: 3 +--- + +# Create a Blog Post + +Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed... + +## Create your first Post + +Create a file at `blog/2021-02-28-greetings.md`: + +```md title="blog/2021-02-28-greetings.md" +--- +slug: greetings +title: Greetings! +authors: + - name: Joel Marcey + title: Co-creator of Docusaurus 1 + url: https://github.com/JoelMarcey + image_url: https://github.com/JoelMarcey.png + - name: Sébastien Lorber + title: Docusaurus maintainer + url: https://sebastienlorber.com + image_url: https://github.com/slorber.png +tags: [greetings] +--- + +Congratulations, you have made your first post! + +Feel free to play around and edit this post as much as you like. +``` + +A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings). diff --git a/Documentation/docs/web-app/create-a-document.md b/Documentation/docs/selling/socialmedia.md similarity index 100% rename from Documentation/docs/web-app/create-a-document.md rename to Documentation/docs/selling/socialmedia.md diff --git a/Documentation/docs/stripe/deploy-your-site.md b/Documentation/docs/selling/work.md similarity index 100% rename from Documentation/docs/stripe/deploy-your-site.md rename to Documentation/docs/selling/work.md diff --git a/Documentation/docs/web-app/create-a-page.md b/Documentation/docs/stripe/setup-products.md similarity index 100% rename from Documentation/docs/web-app/create-a-page.md rename to Documentation/docs/stripe/setup-products.md diff --git a/Documentation/docs/web-app/congratulations.md b/Documentation/docs/stripe/setup-stripe.md similarity index 100% rename from Documentation/docs/web-app/congratulations.md rename to Documentation/docs/stripe/setup-stripe.md diff --git a/Documentation/docs/web-app/deploy-your-site.md b/Documentation/docs/stripe/stripe-cli.md similarity index 100% rename from Documentation/docs/web-app/deploy-your-site.md rename to Documentation/docs/stripe/stripe-cli.md diff --git a/Documentation/docs/web-app/SSR-SSG-CSR-Guide.md b/Documentation/docs/web-app/SSR-SSG-CSR-Guide.md new file mode 100644 index 0000000..c22fe29 --- /dev/null +++ b/Documentation/docs/web-app/SSR-SSG-CSR-Guide.md @@ -0,0 +1,57 @@ +--- +sidebar_position: 2 +--- + +# Create a Document + +Documents are **groups of pages** connected through: + +- a **sidebar** +- **previous/next navigation** +- **versioning** + +## Create your first Doc + +Create a Markdown file at `docs/hello.md`: + +```md title="docs/hello.md" +# Hello + +This is my **first Docusaurus document**! +``` + +A new document is now available at [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello). + +## Configure the Sidebar + +Docusaurus automatically **creates a sidebar** from the `docs` folder. + +Add metadata to customize the sidebar label and position: + +```md title="docs/hello.md" {1-4} +--- +sidebar_label: 'Hi!' +sidebar_position: 3 +--- + +# Hello + +This is my **first Docusaurus document**! +``` + +It is also possible to create your sidebar explicitly in `sidebars.js`: + +```js title="sidebars.js" +export default { + tutorialSidebar: [ + 'intro', + // highlight-next-line + 'hello', + { + type: 'category', + label: 'Tutorial', + items: ['tutorial-basics/create-a-document'], + }, + ], +}; +``` diff --git a/Documentation/docs/web-app/design-guides.md b/Documentation/docs/web-app/design-guides.md new file mode 100644 index 0000000..1c50ee0 --- /dev/null +++ b/Documentation/docs/web-app/design-guides.md @@ -0,0 +1,31 @@ +--- +sidebar_position: 5 +--- + +# Deploy your site + +Docusaurus is a **static-site-generator** (also called **[Jamstack](https://jamstack.org/)**). + +It builds your site as simple **static HTML, JavaScript and CSS files**. + +## Build your site + +Build your site **for production**: + +```bash +npm run build +``` + +The static files are generated in the `build` folder. + +## Deploy your site + +Test your production build locally: + +```bash +npm run serve +``` + +The `build` folder is now served at [http://localhost:3000/](http://localhost:3000/). + +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)**). diff --git a/Documentation/docs/web-app/inspiration.md b/Documentation/docs/web-app/inspiration.md new file mode 100644 index 0000000..20e2ac3 --- /dev/null +++ b/Documentation/docs/web-app/inspiration.md @@ -0,0 +1,43 @@ +--- +sidebar_position: 1 +--- + +# Create a Page + +Add **Markdown or React** files to `src/pages` to create a **standalone page**: + +- `src/pages/index.js` → `localhost:3000/` +- `src/pages/foo.md` → `localhost:3000/foo` +- `src/pages/foo/bar.js` → `localhost:3000/foo/bar` + +## Create your first React Page + +Create a file at `src/pages/my-react-page.js`: + +```jsx title="src/pages/my-react-page.js" +import React from 'react'; +import Layout from '@theme/Layout'; + +export default function MyReactPage() { + return ( + +

My React page

+

This is a React page

+
+ ); +} +``` + +A new page is now available at [http://localhost:3000/my-react-page](http://localhost:3000/my-react-page). + +## Create your first Markdown Page + +Create a file at `src/pages/my-markdown-page.md`: + +```mdx title="src/pages/my-markdown-page.md" +# My Markdown page + +This is a Markdown page +``` + +A new page is now available at [http://localhost:3000/my-markdown-page](http://localhost:3000/my-markdown-page). diff --git a/Documentation/docs/web-app/snippets.md b/Documentation/docs/web-app/snippets.md new file mode 100644 index 0000000..04771a0 --- /dev/null +++ b/Documentation/docs/web-app/snippets.md @@ -0,0 +1,23 @@ +--- +sidebar_position: 6 +--- + +# Congratulations! + +You have just learned the **basics of Docusaurus** and made some changes to the **initial template**. + +Docusaurus has **much more to offer**! + +Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**. + +Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610) + +## What's next? + +- Read the [official documentation](https://docusaurus.io/) +- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config) +- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration) +- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout) +- Add a [search bar](https://docusaurus.io/docs/search) +- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase) +- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)