diff --git a/Makefile b/Makefile index 31f29fc..13fc949 100644 --- a/Makefile +++ b/Makefile @@ -9,14 +9,13 @@ site: rm -rf build mkdir -p build/spec build/dtd cd site && uv run pelican content - cp site/output/index.html site/output/check.html build/ + cp site/output/*.html build/ cp site/output/mews-0.1.css build/mews-0.1.css cp spec/mews-0.1.css build/spec/mews-0.1.css cp spec/mews-0.1.dtd spec/xhtml-mobile12.dtd build/dtd/ uv run --script quickstart/md2mews.py spec/SPEC.md -o build/spec/0.1.html \ --lang en --variant mews-cool --description "$(SPEC_DESCRIPTION)" - uv run mewslint --quiet build/index.html build/check.html \ - build/spec/0.1.html + uv run mewslint --quiet build/*.html build/spec/0.1.html @echo "site built in build/" test: diff --git a/flake.nix b/flake.nix index 1821d45..425ad01 100644 --- a/flake.nix +++ b/flake.nix @@ -137,7 +137,7 @@ chmod -R u+w site-src ${siteBuilder}/bin/pelican site-src/content -o pelican-output \ -s site-src/pelicanconf.py - cp pelican-output/index.html pelican-output/check.html $out/ + cp pelican-output/*.html $out/ cp pelican-output/mews-0.1.css $out/mews-0.1.css cp pelican-output/mews-0.1.css $out/spec/mews-0.1.css @@ -149,8 +149,7 @@ -o $out/spec/0.1.html --lang en --variant mews-cool \ --description ${lib.escapeShellArg specDescription} - ${app}/bin/mewslint --quiet \ - $out/index.html $out/check.html $out/spec/0.1.html + ${app}/bin/mewslint --quiet $out/*.html $out/spec/0.1.html ''; } ); diff --git a/site/content/pages/check.md b/site/content/pages/check.md index 3c3e0b1..688f9b5 100644 --- a/site/content/pages/check.md +++ b/site/content/pages/check.md @@ -4,6 +4,8 @@ Description: Check a page against Mews Profile 0.1, and add your site to the dir # Check a page +[The Mews](/) · [Directory](/directory) · [Get started](/quickstart) · [Specification](/spec/0.1) + Paste an address. The checker validates the page against the [Mews DTD](/dtd/mews-0.1.dtd), reads your stylesheet and up to twenty images, and lists every rule it breaks with the section of the spec that explains it.
-**Check page** reports and keeps nothing. **Check and list** also puts your site in the directory if the page passes. Either way it takes up to a minute, with no progress bar, because that would want JavaScript. Leave this page open and put the kettle on. +- **Check page** just returns the validator's report. -## Doing it yourself +- **Check and list** also puts your site in the directory if the page passes. -The same checks run on the command line, which is quicker while you are still fixing things: - -uvx --from git+https://code.randogoth.com/randogoth/mews.page.git#subdirectory=validator \ - mewslint https://example.com/- -It reads local files too, so you can check a page before publishing it. This site's own build refuses to produce mews.page if any of its pages stops conforming. That seemed only fair. - -## What gets listed - -One page per site, the one you submit, and nobody reviews it: it passes or it doesn't. Listed sites are rechecked every week, and there is no address to warn you at. No account, no password to forget, and no warning either. +Either way it takes up to a minute, with no progress bar, because that would want JavaScript. Leave this page open and put the kettle on.
uvx --from git+https://code.randogoth.com/randogoth/mews.page.git#subdirectory=quickstart \ - mews-quickstart mysite -cd mysite -uv run pelican content- -The pages land in `output/` as plain HTML that any web server will serve as valid *mews* pages. +A quickstart guide on how to create content can be found on our [Get started](/quickstart) page. ## Get in touch diff --git a/site/content/pages/start.md b/site/content/pages/start.md new file mode 100644 index 0000000..0b0ed65 --- /dev/null +++ b/site/content/pages/start.md @@ -0,0 +1,45 @@ +Title: Getting Started +Slug: quickstart +Description: Check pages on your own machine and create Mews content with Markdown or Pelican. + +# Get started + +[The Mews](/) · [Directory](/directory) · [Specification](/spec/0.1) + +Check this [sample page](https://code.randogoth.com/randogoth/mews.page/src/branch/main/sample/sample.html) with one of every element a mews page can hold and the [validator](/check) that tells you for any address exactly what it breaks and why. + +## Validate locally + +The same checks run on the command line, which is quicker while you are still fixing things: + +
uvx --from git+https://code.randogoth.com/randogoth/mews.page.git#subdirectory=validator \ + mewslint https://example.com/+ +Without [uv](https://github.com/astral-sh/uv), install it with pip (Python 3.12 or later): + +
+pip install "git+https://code.randogoth.com/randogoth/mews.page.git#subdirectory=validator" +mewslint https://example.com/+ +It reads local files too, so you can check a page before publishing it. + +## Create content + +For a simple way to create compatible content there's a [Python script](https://code.randogoth.com/randogoth/mews.page/src/branch/main/quickstart/md2mews.py) that converts from a Markdown file. If you want a real blog engine, here's a [uv](https://github.com/astral-sh/uv) powered quickstart script that writes a project folder, installs the [Pelican](https://getpelican.com/) static site generator together with our [pelican-mews](https://code.randogoth.com/randogoth/mews.page/src/branch/main/pelican-mews) plugin, and leaves you a first post to edit: + +
uvx --from git+https://code.randogoth.com/randogoth/mews.page.git#subdirectory=quickstart \ + mews-quickstart mysite +cd mysite +uv run pelican content+ +Without [uv](https://github.com/astral-sh/uv), the same with pip: + +
+pip install "git+https://code.randogoth.com/randogoth/mews.page.git#subdirectory=quickstart" +mews-quickstart --no-install mysite +cd mysite +pip install pelican markdown \ + "pelican-mews @ git+https://code.randogoth.com/randogoth/mews.page.git#subdirectory=pelican-mews" +pelican content+ +The pages land in `output/` as plain HTML that any web server will serve as valid *mews* pages. \ No newline at end of file