Skip to content

Commit 325e62b

Browse files
authored
Merge pull request #31 from rdela/docs-init
Docs: lume init command
2 parents fe1d310 + dc0a2b0 commit 325e62b

File tree

2 files changed

+61
-21
lines changed

2 files changed

+61
-21
lines changed

README.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,38 @@
22

33
[Lume](https://lume.land) theme to create a simple blog.
44

5-
- It supports tags and post authors.
6-
- RSS (Atom and JSON).
7-
- Sitemap and SEO features.
8-
- Instant search engine.
5+
- Supports tags and post authors
6+
- Atom and JSON feeds
7+
- Sitemap and SEO features
8+
- Instant search engine
9+
10+
## Set up a new site
11+
12+
The **fastest and easiest** way to configure this theme is the
13+
[Lume init command](https://deno.land/x/lume_init), which one can also copy
14+
easily from the [Simple Blog theme page](https://lume.land/theme/simple-blog/).
15+
Running:
16+
17+
```bash
18+
deno run -A https://lume.land/init.ts --theme=simple-blog
19+
```
20+
21+
will create a new project with Simple Blog configured. Edit the
22+
[`_data.yml`](./src/_data.yml) file in your blog root folder with your data to
23+
customize the site title, description, and metadata.
24+
25+
Posts must be saved in the `posts` folder. For example,
26+
`posts/my-first-posts.md`.
927

1028
## Install as a remote theme
1129

12-
The **fastest and easiest** way to use this theme is by importing it as a remote
13-
module. It allows to create a blog in seconds and update it at any time just by
14-
changing the version number in the import URL. Just add the following code to
15-
your `_config.ts` file:
30+
To add the theme to an existing Lume project, import it in your `_config.ts`
31+
file as a remote module. Update it by changing the version number in the import
32+
URL:
1633

1734
```ts
1835
import lume from "lume/mod.ts";
19-
import blog from "https://deno.land/x/lume_theme_simple_blog@v0.10.2/mod.ts";
36+
import blog from "https://deno.land/x/lume_theme_simple_blog@v0.15.6/mod.ts";
2037

2138
const site = lume();
2239

@@ -25,13 +42,11 @@ site.use(blog());
2542
export default site;
2643
```
2744

28-
You can see an example in the [demo](./demo) folder. To customize it copy the
29-
[`_data.yml`](./src/_data.yml) file in your blog root folder and edit it with
30-
your data. The posts must be saved in the `posts` folder. For example
31-
`posts/`my-first-posts.md`.
45+
Copy the [`_data.yml`](./src/_data.yml) file to your blog root folder and edit
46+
it with your data.
3247

3348
## Use it as a base template
3449

3550
To use this theme as a base template for a more customized blog, clone this repo
36-
and edit the [_config.ts](./_config.ts) file. The source files are in the
37-
[src](./src/) folder. And you can remove the `/demo` folder.
51+
and edit the [\_config.ts](./_config.ts) file. The source files are in the
52+
[src](./src/) folder.

src/posts/instructions.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,48 @@ tags:
77
---
88

99
**Simple blog** is a clean and minimal blog theme for Lume, with support for
10-
tags and authors. It allows to build your own blog **in seconds**, providing
11-
also support for RSS.
10+
tags and authors. It allows you to build your own blog **in seconds**, and
11+
provides Atom and JSON feeds for your subscribers.
1212

1313
<!--more-->
1414

15-
To use it, just import the theme in your `_config.ts` file:
15+
The **fastest and easiest** way to configure this theme is the
16+
[Lume init command](https://deno.land/x/lume_init), which you can also copy
17+
easily from the [Simple Blog theme page](https://lume.land/theme/simple-blog/).
18+
Running:
1619

17-
```js
18-
import lume from "lume";
19-
import blog from "https://deno.land/x/lume_theme_simple_blog/mod.ts";
20+
```bash
21+
deno run -A https://lume.land/init.ts --theme=simple-blog
22+
```
23+
24+
will create a new project with Simple Blog configured. Edit the `_data.yml` file
25+
in your blog root folder with your data to customize the site title,
26+
description, and metadata.
27+
28+
Posts must be saved in the `posts` folder. For example,
29+
`posts/my-first-posts.md`.
30+
31+
## Install as a remote theme
32+
33+
To add the theme to an existing Lume project, import it in your `_config.ts`
34+
file as a remote module. Update it by changing the version number in the import
35+
URL:
36+
37+
```ts
38+
import lume from "lume/mod.ts";
39+
import blog from "https://deno.land/x/[email protected]/mod.ts";
2040

2141
const site = lume();
42+
2243
site.use(blog());
2344

2445
export default site;
2546
```
2647

48+
Copy the
49+
[`_data.yml`](https://github.com/lumeland/theme-simple-blog/blob/main/src/_data.yml)
50+
file to your blog root folder and edit it with your data.
51+
2752
## Customization
2853

2954
> [!tip]

0 commit comments

Comments
 (0)