Skip to content
This repository was archived by the owner on Mar 26, 2023. It is now read-only.

Commit f5cd404

Browse files
committed
feat: readme
1 parent 8988e9f commit f5cd404

File tree

2 files changed

+59
-31
lines changed

2 files changed

+59
-31
lines changed

Diff for: README.md

+59-30
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,79 @@
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>
211

3-
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
12+
#
413

5-
## Creating a project
14+
## What is SveltePress?
615

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...
823

924
```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+
```
1233

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
1542
```
1643

17-
> Note: the `@next` is temporary
44+
#
1845

19-
## Developing
46+
## Installation
2047

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.
2249

2350
```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
2556

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
2860
```
2961

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/)
3163
32-
Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then:
64+
#
3365

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>
3769

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+
#
3971

40-
structure
72+
## Contributing
4173

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

Diff for: src/lib/SveltePress/MD2HTML.js

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export function md2html(post) {
6666
const frontmatter = md2fm(md);
6767
// Here you can change the default markdown
6868
const content = marked(frontmatter.body);
69-
console.log(content);
7069
// Sanitize it
7170
// meta includes ALL fm attributes
7271
return {

0 commit comments

Comments
 (0)