Publishing a news article with ak-news -------------------------------------- Along with [arching-kaos-tools](https://github.com/arching-kaos/arching-kaos-tools) comes the `ak-news` script which you can use to add *news articles* in your zchain. There are two ways of adding a news article in your zchain with `ak-news` tool. These are subcommands `create` and `add`. ## Subcommand create Opens a vi instance for you to write a text. Expected format is as follows: ``` Title with only text spaces and numbers --------------------------------------- Some text ## markdown format is supported If you want to have formatted text when viewing from arching-kaos-web-ui ``` The resulting filename is based upon the title, so if you don't want to break unexpectedly your setup, follow it. After you are ready writting and rereading your text, you can save and exit `vim`, the script will process the file and add it to your zchain. ## Subcommand add The `add` command expects a filename as an argument and the filename is expected to be in the following form: ``` 20240129_211730-the-title-of-the-article ``` so you'd run ``` ak-news add 20240129_211730-the-title-of-the-article ``` Note, the format is expected to be the same as described in the `create` subcommand: 1st line will count as title and it will be treated as a markdown document. After executing the command, you'll have a new zblock on the top your zchain. ## Bonus track After doing the above, you can read the published text using ak-news like this: ``` ak-news read $(ak-get-zlatest) ``` ## Hidden track You can also read it online like this: ``` firefox "https://news.arching-kaos.net/?from_zblock=$(ak-get-zlatest)" ```