2025-02-05 12:42:36 +01:00
blog-software(config, template, content) = blog website
2025-01-19 10:15:42 +01:00
## Usage
2025-02-10 16:26:08 +01:00
1. [Download the program from here ](/Minecon724/blog-software-java/releases )
2025-02-12 16:23:26 +01:00
2. Run the program:
2025-01-19 10:15:42 +01:00
```shell
2025-02-12 16:23:26 +01:00
java -jar blog-0.0.1-shaded.jar -s example_workdir
2025-01-19 10:15:42 +01:00
```
2025-02-12 16:23:26 +01:00
For tips on how to create your own project (workdir), see [Project format ](#Project format ) below.
2025-01-19 10:15:42 +01:00
## Important caveats
Generated site must be the root of a subdomain, like `https://example.com/` . \
2025-02-08 13:59:52 +01:00
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. \
2025-02-10 16:26:08 +01:00
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
2025-02-12 16:23:26 +01:00
- `posts/` - contains posts. Post format:
- Header / metadata:
- `title A title` - post title
- `summary This is a post with a title` - post summary
- `live` - is the post live (not draft), doesn't need an argument
- Custom properties, which are Strings
- ` ` - Empty line separates header from content
- Post content in HTML. Generally not sanitized, but depends on template.
2025-02-10 16:26:08 +01:00
- `template/` - contains the template, see [Template format ](#Template format ) below
2025-02-12 16:23:26 +01:00
- `site-config.yml` - 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, which can be anything as they are Objects
2025-02-10 16:26:08 +01:00
## Template format
https://pebbletemplates.io is used
- `static/` - contains static assets
- `article_template.html` - post template
- `index_template.html` - index.html template