Run it locally
Install Cow locally in your project. Copy
node_modules/@cowlang/cow/examples/mininews/site/news.cow into your own site/ directory. Keep the editable page and its database outside node_modules.npm exec --offline -- cow site --port 8001Visit
http://127.0.0.1:8001/news. On the first visit, MiniNews creates a private setup-key file beside the page. Read site/_news.setup-key and enter it to create your editor account.Write and publish
Create a story, preview it, and save it as a draft or publish it. The dashboard shows recent stories and publication counts. Titles, short stories, and full stories can be edited later.
The page also works as an include, so you can show published stories elsewhere on your site:
<?js await include('./news.cow', {
mode: 'feed',
url: '/news',
limit: 5
}) ?>Read the source
Open your copied
site/news.cow. It contains the routes, database queries, forms, and markup. The README in node_modules/@cowlang/cow/examples/mininews/ covers setup, backups, and embedding.MiniNews stores its database beside the page, under a private underscore-prefixed name. Keep that database when updating the page. Use HTTPS before accepting real logins.