docs: Add initial version of installation guide

This commit is contained in:
Faruk AYDIN
2022-02-05 02:27:55 +03:00
committed by Ali BARIN
parent dfc95cafe0
commit a1a9692b31
2 changed files with 34 additions and 29 deletions

View File

@@ -4,40 +4,45 @@ sidebar_position: 1
# Installation # Installation
Add **Markdown or React** files to `src/pages` to create a **standalone page**: <!-- TODO: Add instructions to install PostgreSQL and specify supported node versions -->
- `src/pages/index.js` -> `localhost:3000/` Automatisch supports both npm and docker installation.
- `src/pages/foo.md` -> `localhost:3000/foo`
- `src/pages/foo/bar.js` -> `localhost:3000/foo/bar`
## Create your first React Page ### npm
Create a file at `src/pages/my-react-page.js`: You can try Automatisch without installing by using [npx](https://docs.npmjs.com/cli/v8/commands/npx).
```jsx title="src/pages/my-react-page.js" ```bash
import React from 'react'; npx automatisch
import Layout from '@theme/Layout';
export default function MyReactPage() {
return (
<Layout>
<h1>My React page</h1>
<p>This is a React page</p>
</Layout>
);
}
``` ```
A new page is now available at `http://localhost:3000/my-react-page`. Or you can install Automatisch globally via [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
## Create your first Markdown Page ```bash
npm install automatisch -g
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`. You need to run the start command after the installation.
```bash
automatisch start
```
### docker
You can also use [docker](https://docs.docker.com/get-docker/) to install Automatisch.
```bash
docker run -it \
--name automatisch \
-p 3000:3000 \
automatisch start
```
<!-- TODO: Check requirements of https usage and revise the document accordingly -->
## Let's discover!
✌️ That's it; you have Automatisch running. Let's check it out by browsing [http://localhost:3000](http://localhost:3000)
If you see any problem while installing Automatisch, let us know via [github issues](https://github.com/automatisch/automatisch/issues) or our [discord server](https://discord.gg/dJSah9CVrC).

View File

@@ -119,7 +119,7 @@ const config = {
copyright: `© 2021 Automatisch. All rights reserved.`, copyright: `© 2021 Automatisch. All rights reserved.`,
}, },
prism: { prism: {
theme: lightCodeTheme, theme: require('prism-react-renderer/themes/dracula'),
darkTheme: darkCodeTheme, darkTheme: darkCodeTheme,
}, },
colorMode: { colorMode: {