mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 09:39:25 +01:00
update @ Sat Jan 11 23:51:24 EET 2025
Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
parent
6f83cc2874
commit
36bbc2f87b
2 changed files with 51 additions and 61 deletions
2
LICENSE
2
LICENSE
|
@ -630,7 +630,7 @@ state the exclusion of warranty; and each file should have at least
|
|||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
Project "blog.ari.lt"
|
||||
Copyright (C) 2024 Ari Archer <ari@ari.lt>
|
||||
Copyright (C) 2025 Ari Archer <ari@ari.lt>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
|
|
110
README.md
110
README.md
|
@ -1,83 +1,73 @@
|
|||
<p align="center">
|
||||
<h1><a href="https://blog.ari.lt/">ari-web blog</a></h1>
|
||||
</p>
|
||||
# [blog.ari.lt](https://blog.ari.lt/)
|
||||
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/Maintained-Yes-green?color=red&style=flat-square">
|
||||
<img src="https://img.shields.io/github/last-commit/ari-lt/blog.ari.lt?color=red&style=flat-square">
|
||||
<img src="https://img.shields.io/github/repo-size/ari-lt/blog.ari.lt?color=red&style=flat-square">
|
||||
<img src="https://img.shields.io/github/issues/ari-lt/blog.ari.lt?color=red&style=flat-square">
|
||||
<img src="https://img.shields.io/github/stars/ari-lt/blog.ari.lt?color=red&style=flat-square">
|
||||
</p>
|
||||
> The Ari-web blog.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://app.netlify.com/sites/blog-ari-lt/deploys"><img src="https://api.netlify.com/api/v1/badges/98960a64-0fed-4f2c-8446-2357769a002e/deploy-status" /></a>
|
||||
</p>
|
||||
## Installing dependencies
|
||||
|
||||
## installing dependencies
|
||||
The blog generator has two dependency files - `requirements.txt` and `requirements-extra.txt`. The normal requirements file must *always* be installed such as:
|
||||
|
||||
```sh
|
||||
$ python3 -m virtualenv venv
|
||||
$ . venv/bin/activate
|
||||
$ pip install -r requirements.txt
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
|
||||
Or
|
||||
And the `-extra` requirements file only needs to be installed when you are using commands such as `new` to write blog posts. The normal requirements file is tailored to provide a minimal dependency tree for CI/CD servers.
|
||||
|
||||
```sh
|
||||
$ python3 -m pip install --user -r requirements.txt
|
||||
```
|
||||
## Creating a new blog
|
||||
|
||||
do the same with `requirements-extra.txt` if ur using stuff like `new`
|
||||
To create a new blog (not blog post) run
|
||||
|
||||
## creating a new blog
|
||||
./scripts/blog.py blog
|
||||
|
||||
```bash
|
||||
$ ./scripts/blog.py blog
|
||||
```
|
||||
This will generate a new empty `blog.json` which you can edit and adjust to your needs
|
||||
|
||||
## building
|
||||
### Writing a new blog post
|
||||
|
||||
- generate full-on static site
|
||||
After you've set up `blog.json` you can proceed to write a new blog post using the `new` subcommand:
|
||||
|
||||
```bash
|
||||
$ CI=1 ./scripts/blog static
|
||||
```
|
||||
./scripts/blog.py new
|
||||
|
||||
- only build posts
|
||||
This will allow you to write blog posts in markdown as well as ask you for metadata.
|
||||
|
||||
```bash
|
||||
$ CI=1 ./scripts/blog build
|
||||
```
|
||||
## Building
|
||||
|
||||
`CI` environment variable is optional,
|
||||
though setting it in a build/CI environment is good
|
||||
to save time on some operations that are useless
|
||||
in that context, for example sorting blogs
|
||||
- A full-on static website (recommended): `CI=1 ./scripts/blog static`
|
||||
- Only blog posts: `CI=1 ./scripts/blog build`
|
||||
|
||||
`CI` can have any value
|
||||
The `CI` environment variable is optional, although setting it in a build/CI environment is good to save time on some operations that are useless in that context, for example sorting blog posts or massive logging.
|
||||
|
||||
`NOCLR` also disables colours
|
||||
Furthermore, if you want to disable colour support you can also set `NOCLR=1` and it will print things in plain text over a coloured output.
|
||||
|
||||
## the API
|
||||
## The API
|
||||
|
||||
- <https://blog.ari.lt/b/ari-web-blog-api-change/>
|
||||
- <https://blog.ari.lt/b/ari-web-apis--how-to-use-them/>
|
||||
`recents.json`, `blog.json`, and `media/media.json` are all APIs you can use. For caching purposes SHA256 digests of these static APIs are generated on build at `recents_json_hash.txt`, `blog_json_hash.txt`, and `media/media_json_hash.txt` which you can use to optimise your API usage.
|
||||
|
||||
## features u might wanna add
|
||||
## Help
|
||||
|
||||
- syntax highlighting : <https://github.com/lepture/mistune/issues/54> -- edit `BlogRender`
|
||||
help -- print help
|
||||
sort -- sort blog posts by creation time
|
||||
new -- create a new blog post
|
||||
ls -- list all posts
|
||||
ed -- edit posts
|
||||
med -- minor edit posts
|
||||
rm -- remove posts
|
||||
build -- build blog posts
|
||||
css -- build and minify css
|
||||
robots -- generate a robots.txt
|
||||
manifest -- generate a manifest.json
|
||||
sitemap -- generate a sitemap.xml
|
||||
rss -- generate an rss feed
|
||||
apis -- generate and hash apis
|
||||
clean -- clean up the site
|
||||
static -- generate a full static site
|
||||
serve -- simple server
|
||||
dev -- generate a full static site + serve it
|
||||
blog -- generate a new blog
|
||||
search -- search for a term
|
||||
media -- add media
|
||||
lsmedia -- list media
|
||||
rmmedia -- remove media
|
||||
purgemedia -- purge unused or unindexed media
|
||||
infomedia -- get info about media
|
||||
|
||||
## why ari-web blog manager
|
||||
Custom markdown extensions (besides the well-known ones):
|
||||
|
||||
- writer friendly -- uses markdown, keeps tracks of dates useful custom markdown extensions, support for editing, removal of posts,, and u can style ur blog the way you want it to b using css, easy build directory cleanup, support for custom fonts, locales, licenses, etc
|
||||
- reader friendly -- the blog posts are sorted from newest to oldest making it easy to get latest blog posts, they can also get a shortcut on their device as it has a `manifest.json` so they can open ur blog as an app, also support for an rss feed meaning ur users can subscribe to ur blog to get latest posts on their rss feeder app
|
||||
- writer-developer friendly -- the script is easily extensible by developers, markdown extensions, etc,, testing of each component using subcommands and a built-in testing http server
|
||||
- reader-developer friendly -- api access to latest blog posts and ur blog as a whole though `blog.json`, apis are hashed and minified
|
||||
- search engine optimization ( seo ) -- generator tries to follow best seo practices and adds a bunch of metadata not only in html but in other files too -- `robots.txt`, `manifest.json`, `sitemap.xml`, `rss.xml` and ofc the apis ( `recents.json`, `recents_json_hash.txt`, `blog_json_hash.txt` )
|
||||
- payload size -- generator generates minified content ( all apis, `rss.xml`, generated html of blog posts and home page, all css and fonts ) making it fast to load for readers
|
||||
- accessibility -- the blog generator follows best a11y practices making it easy for people with disabilities to read ur posts
|
||||
- google pagespeed optimized -- this metric shows us how accessible and fast our pages r and this generator tries to optimize for it
|
||||
- fast -- the generator uses fast libraries, data structures and threading, it doesnt import useless libraries in build time ( unless theyre pointless to exclude ), meaning its very quick to build ur blog into a full-blown static website
|
||||
- open source -- this generator and all of the content on it are licensed under gplv3 and the code and content are free to the public making it open source
|
||||
- overall pleasant experience to grow ur blog :)
|
||||
* Titlelink: <#:Your Header Title> - links to a header
|
||||
* Media embed: <@:e3b0c4429...> - embeds media
|
||||
|
|
Loading…
Add table
Reference in a new issue