|
1 |
| -# create-svelte |
| 1 | +<p align="center"> |
| 2 | + <img alt="SveltePress branding" src="https://i.imgur.com/k0MgzIl.png"> |
| 3 | +</p> |
| 4 | +<h1 align="center">SveltePress</h1> |
| 5 | +<h4 align="center">Documentation for humans.</h4> |
| 6 | +<p align="center"> |
| 7 | + <br /> |
| 8 | + <a href="https://github.com/GeopJr/SveltePress/blob/main/CODE_OF_CONDUCT.md"><img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff3e00.svg?style=for-the-badge&labelColor=ffd0bf" alt="Code Of Conduct" /></a> |
| 9 | + <a href="https://github.com/GeopJr/SveltePress/blob/main/UNLICENSE"><img src="https://img.shields.io/badge/LICENSE-UNLICENSE-ff3e00.svg?style=for-the-badge&labelColor=ffd0bf" alt="UNLICENSE" /></a> |
| 10 | +</p> |
2 | 11 |
|
3 |
| -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte); |
| 12 | +# |
4 | 13 |
|
5 |
| -## Creating a project |
| 14 | +## What is SveltePress? |
6 | 15 |
|
7 |
| -If you're seeing this, you've probably already done this step. Congrats! |
| 16 | +SveltePress is a documentation tool built on top of [SvelteKit](https://kit.svelte.dev/), a "serverless-first" framework for building web applications for [Svelte](https://svelte.dev/). |
| 17 | + |
| 18 | +SvelteKit & Svelte's simplicity allow the user to modify SveltePress to fit their needs with little to no effort while taking advantage of the incredible performance of both of them. |
| 19 | + |
| 20 | +Apart from all the super powers inherited from Svelte & SvelteKit, the main point of SveltePress is to allow less knowledgeable users to create and publish content. To achieve that, SveltePress uses a filesystem-based structure. |
| 21 | + |
| 22 | +For example the following structure... |
8 | 23 |
|
9 | 24 | ```bash
|
10 |
| -# create a new project in the current directory |
11 |
| -npm init svelte@next |
| 25 | +pages |
| 26 | +└── cooking |
| 27 | + ├── allergies.md |
| 28 | + ├── main_dish |
| 29 | + │ ├── pizza.md |
| 30 | + │ └── spaghetti.md |
| 31 | + └── readme.md |
| 32 | +``` |
12 | 33 |
|
13 |
| -# create a new project in my-app |
14 |
| -npm init svelte@next my-app |
| 34 | +will generate the following sidebar: |
| 35 | + |
| 36 | +```md |
| 37 | +- Cooking |
| 38 | +- Allergies |
| 39 | + -- Main Dish |
| 40 | + --- Pizza |
| 41 | + --- Spaghetti |
15 | 42 | ```
|
16 | 43 |
|
17 |
| -> Note: the `@next` is temporary |
| 44 | +# |
18 | 45 |
|
19 |
| -## Developing |
| 46 | +## Installation |
20 | 47 |
|
21 |
| -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: |
| 48 | +The best way to install SveltePress is by using [degit](https://github.com/Rich-Harris/degit). degit works similarly to git but uses only the latest commit (plus can be configured to delete some files), you can read more about it on its repo page. |
22 | 49 |
|
23 | 50 | ```bash
|
24 |
| -npm run dev |
| 51 | +# Replace `my-sveltepress-project` with the name you desire |
| 52 | +npx degit GeopJr/SveltePress my-sveltepress-project |
| 53 | + |
| 54 | +# Change directory to the folder from the previous step |
| 55 | +cd my-sveltepress-project |
25 | 56 |
|
26 |
| -# or start the server and open the app in a new browser tab |
27 |
| -npm run dev -- --open |
| 57 | +# Install dependencies |
| 58 | +# PNPM is recommended but both YARN and NPM will do |
| 59 | +pnpm install |
28 | 60 | ```
|
29 | 61 |
|
30 |
| -## Building |
| 62 | +> For more info on how SveltePress works, how to set it up & more, visit [https://sveltepress.geopjr.dev/](https://sveltepress.geopjr.dev/) |
31 | 63 |
|
32 |
| -Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then: |
| 64 | +# |
33 | 65 |
|
34 |
| -```bash |
35 |
| -npm run build |
36 |
| -``` |
| 66 | +<p align="center"> |
| 67 | + <img alt="diagram of filesystem and the coresponding sidebar" src="https://i.imgur.com/nD87FA2.png"> |
| 68 | +</p> |
37 | 69 |
|
38 |
| -> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production. |
| 70 | +# |
39 | 71 |
|
40 |
| -structure |
| 72 | +## Contributing |
41 | 73 |
|
42 |
| -- posts |
43 |
| - -- readme.md |
44 |
| - -- guide-1 |
45 |
| - --- readme.md |
46 |
| - --- Basics |
47 |
| - ---- Getting_Started.md |
48 |
| - ---- Asking_for_help.md |
49 |
| - -- guide-2 |
50 |
| - --- readme.md |
| 74 | +1. Read the [Code of Conduct](https://github.com/GeopJr/argyle/blob/main/CODE_OF_CONDUCT.md) |
| 75 | +2. Fork it ( https://github.com/GeopJr/SveltePress/fork ) |
| 76 | +3. Create your feature branch (git checkout -b my-new-feature) |
| 77 | +4. Commit your changes (git commit -am 'Add some feature') |
| 78 | +5. Push to the branch (git push origin my-new-feature) |
| 79 | +6. Create a new Pull Request |
0 commit comments