all repos — min @ 1870b7482e551f224d67f5a543161dfc61fa9e98

A small but practical concatenative programming language.

Implemented news section.
h3rald h3rald@h3rald.com
Sat, 03 Feb 2024 21:33:54 +0100
commit

1870b7482e551f224d67f5a543161dfc61fa9e98

parent

dafd5a85c2e686495d60050775a2069c3c45c4e0

D site/contents/news.md

@@ -1,10 +0,0 @@

------ -content-type: "page" -title: "News" ------ -{@ _defs_.md || 0 @} - -## 2024-02-04 — News section available! - -TBD -
A site/contents/news/v0.43.0.md

@@ -0,0 +1,21 @@

+----- +content-type: "post" +title: "Version 0.43.0 released" +date: 2024-02-04 +----- +{@ _defs_.md || 0 @} + +## BREAKING CHANGES + +- Renamed `ROOT` symbol to `global`. Also the built-in `lang` module is now called `global`. + +## New Features + +- Upgraded OpenSSL to v3.2.0 +- mmm: It is now possible to install, uninstall, and update modules by specifying them via `<name>@<version>`. +- mmm: The version is now optional when installing, uninstalling, and updating modules (the name of the HEAD branch will be used, e.g. "master" or "main", typically). + +## Fixes and Improvements + +- Added check to prevent installing local managed modules in the HOME directory or $HOME/mmm. +- Changed `tokenize` symbol so that it returns the full token, including delimiters (for strings and comments).
M site/rules.minsite/rules.min

@@ -143,6 +143,14 @@ (download-latest-min-exes)

when "Processing contents..." notice! + +; Get news +contents + (:content ((content 'content-type dhas?) (content /content-type "post" ==)) &&) +filter + (:a :b a /date b /date >) +sort :posts + contents ( (dict) expect -> :meta (

@@ -186,5 +194,17 @@ "page" %content-type

modules %modules dup "mmm" swap mustache %contents output-fwrite + +"Generating news page..." notice! +{} + "news/index" %id + "news.html" %path + ".html" %ext + "News" %title + "min language" %site + "page" %content-type + posts %posts +dup +"news" swap mustache %contents output-fwrite
A site/templates/news.mustache

@@ -0,0 +1,19 @@

+<!doctype html> +<html lang="en"> + {{> _head}} + <body> + {{> _menu}} + <main class="pure-g"> + <article class="pure-u-5-5"> + <h1>News</h1> + <p>This page lists the latest news about the min programming language.</p> + <ul> + {{#posts}} + <li><a href="/{{id}}">{{date}} &mdash; {{title}}</a></li> + {{/posts}} + </ul> + </article> + </main> + {{> _footer}} + </body> +</html>
A site/templates/post.mustache

@@ -0,0 +1,15 @@

+<!doctype html> +<html lang="en"> + {{> _head}} + <body> + {{> _menu}} + <main class="pure-g"> + <article class="pure-u-5-5"> + <h1>{{title}}</h1> + <p>Published on: <time datetime="{{date}}">{{date}}</time></p> + {{{contents}}} + </article> + </main> + {{> _footer}} + </body> +</html>