readme init
This commit is contained in:
parent
30969e1cee
commit
36331c1182
1 changed files with 63 additions and 0 deletions
63
README.md
Normal file
63
README.md
Normal file
|
@ -0,0 +1,63 @@
|
|||
# Litelog
|
||||
|
||||
## Philosophy
|
||||
|
||||
With the first iteration of this project, I've learned a lot and realized, it would take a lot of work to get to where I want to be. Instead, I want to rebuild it with an elegant architecture, feature-testing-first philosophy and some leaner frameworks.
|
||||
|
||||
### Features included
|
||||
|
||||
- Aiming for 80% test coverage
|
||||
- Server side rendered posts using fast templating engine
|
||||
- Single user session management using CSRF tokens
|
||||
- Admin panel for post CRUD unlocked via submit token
|
||||
- Input sanitization
|
||||
- Post-title based URLs instead of using count-up IDs
|
||||
- Static file hosting
|
||||
- Configuration via Environment variables
|
||||
- Container support
|
||||
- Request logging
|
||||
- Minimal CSS for accessibility
|
||||
- Run profiles for development
|
||||
|
||||
### Features deliberately omitted
|
||||
|
||||
- External stylesheets and fonts
|
||||
- Multi User / RBAC System
|
||||
- Any JavaScript
|
||||
|
||||
## Development
|
||||
|
||||
1. Clone this repository
|
||||
2. Install diesel and create a database
|
||||
```bash
|
||||
cd ./site
|
||||
#cargo install diesel_cli --no-default-features --features "sqlite"
|
||||
#diesel setup --database-url content/test-db.sqlite3
|
||||
#diesel migration run --database-url content/test-db.sqlite3
|
||||
cargo test
|
||||
```
|
||||
3. Set up your configuration .env (see below)
|
||||
|
||||
## Configuration environment file
|
||||
|
||||
All configuration options are defined in .env which should be placed in the path where crablog is run. An example configuration is provided:
|
||||
|
||||
`.env`
|
||||
```
|
||||
CL_USERNAME=yourusername # required
|
||||
CL_EMAIL=me@mydomain.tld # optional
|
||||
CL_BIND_PORT=8000 # optional
|
||||
CL_SUBMIT_TOKEN=Submit!123 # required
|
||||
CL_GITHUB_ACCOUNT=yourusername # optional
|
||||
CL_TWITTER_ACCOUNT=yourusername # optional
|
||||
CL_MASTODON_ACCOUNT=yourusername@mastodon.social # optional
|
||||
CL_REDDIT_ACCOUNT=yourusername # optional
|
||||
CL_DISCORD_ACCOUNT=yourusername # optional
|
||||
|
||||
# only needed when not using a docker container
|
||||
CL_ROOT_PATH=/path/to/template/and/sqliteDB/directory
|
||||
```
|
||||
|
||||
## Regenerate Migrations from Schema:
|
||||
|
||||
`diesel migration generate --diff-schema=./src/db/schema.rs create_posts`
|
Loading…
Add table
Add a link
Reference in a new issue