blob: dcd98b0e5a3f1367037dfccfeefbeea231af621f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
---
title: Crocc
description: Crocc is a simple and fast static-site generator based on Markdown.
keywords:
- crocc
- markdown
- html
- go
- golang
- static
- site
- generator
- ssg
- website
- simple
publication_time: 2023-04-26T19:05:00Z
author: Nicolas Paul <n@nc0.fr>
---
# Crocc
Crocc is a simple static-site generator based on Markdown.
The main goal of Crocc is to offer simplicity, as opposed to other static-site
generation tools such as Hugo or Jekyll.
Indeed, you only need Markdown to write content in a productive manner, and
everything else is standard scripts (JavaScript, CSS, images, etc.).

## Installation
To install Crocc from sources, you need to have Go installed on your system.
Then, run the following command:
```bash
$ go install go.nc0.fr/crocc@latest
```
> Note: You can replace `latest` with a specific Git commit.
## Usage
Let's say you have a directory containing the following files:
```
src/
├── .crocc.html
├── index.md
├── about.md
├── bar.png
└── contact.md
```
The `.crocc.html` file is the template used to generate the HTML pages.
The `index.md`, `about.md` and `contact.md` files are Markdown documents.
The `bar.png` file is a static file.
To generate the HTML files, run the following command:
```bash
$ crocc -out=dst -url="http://example.com" src
```
The `dst` directory will contain the following files:
```
dst/
├── index.html
├── about.html
├── bar.png
└── contact.html
```
You can now upload the `dst` directory to your web server and you're done!
## Documentation
See the [documentation](/doc) for more information.
## License
The project is governed by a BSD-style license that can be found in the
[LICENSE](https://github.com/n1c00o/crocc/blob/master/LICENSE) file.
The banner image is a [photo](https://unsplash.com/photos/R3sgrDvXz3I) from
[Unsplash](https://unsplash.com/) by
[Thomas Couillard](https://unsplash.com/@thomascouillard).
Favicons are Noto emojis and are licensed under the
[Apache License 2.0](https://github.com/googlefonts/noto-emoji/blob/main/LICENSE)
license.
|