blog-software-java/README.md

40 lines
1.5 KiB
Markdown
Raw Normal View History

blog-software(config, template, content) = blog website
2025-01-19 10:15:42 +01:00
## Usage
1. [Download the program from here](/Minecon724/blog-software-java/releases)
2. Get a working directory. See [Project format](#Project format) below.
2025-01-19 10:15:42 +01:00
Don't forget to `git init`!
3. Run the program:
```shell
java -jar blog-0.0.1-shaded.jar
2025-01-19 10:15:42 +01:00
```
## Important caveats
Generated site must be the root of a subdomain, like `https://example.com/`. \
You can't put it in a directory, like `https://example.com/blog/`
## API
There's no "API," but it's possible to integrate this into your Java project.
See [Main.java](/Minecon724/blog-software-java/src/branch/master/src/main/java/eu/m724/blog/Main.java) for an example. \
If you need a Maven dependency, [see here](/Minecon724/-/packages/maven/eu.m724-blog)
## Project format
There's an ["Example workdir"](/Minecon724/blog-software-java/src/branch/master/example_workdir) which you can take inspiration from.
Basically:
- `assets/` - contains static assets
- `posts/` - contains posts
- `template/` - contains the template, see [Template format](#Template format) below
- `site-config.json` - the site configuration
- `name: "my blog"` property - site name
- `baseUrl: "https://example.com"` property - URL of the site. It must be a root URL - folders are currently not supported. This is used only for the RSS feed.
- custom properties
## Template format
https://pebbletemplates.io is used
- `static/` - contains static assets
- `article_template.html` - post template
- `index_template.html` - index.html template