Skip to content

v1.0.0

Latest

Choose a tag to compare

@AZQ1994 AZQ1994 released this 26 Oct 15:57
· 21 commits to main since this release

More than one kind of article: news, notices, events, each in its own directory, in one editor.
This changes config.json; see Upgrading from 0.x.

  • collections in config.json. A list of the site's kinds of article, each with its own dir,
    url, label, imageField and preview page, and a name for the address bar (by default the
    last part of dir). With more than one, the sidebar's label becomes a menu that switches between
    them: the list, the cover field, the Preview button and View on site all follow the one picked.
    Switching away from unsaved changes asks first. The repository, images, blocks, saving,
    publishing, deployment and action buttons are the same for all of them.
  • The address bar says which collection as well as which article (?c=notices&id=…), since an
    id is only unique within its own directory. A reload or a link comes back to both; a link from
    before 1.0 (?id=…) opens in the first collection, and one naming a collection there no longer
    is opens the first one.
  • Breaking: collection is now collections, and preview.url is each entry's preview. An
    old config.json is not silently half-used: the editor says what each of the two became and how
    to write it, and so does npx simple-git-cms install when the config.json it leaves in place is
    an old one.
  • npm run dev serves every collection's directory, and only those.
  • The automatic summary follows the body. A summary the editor generated used to be taken for
    one written by hand the next time the article was opened, and stayed as it was however the body
    changed. Now it shows as automatic and is taken from the body again on every save; one written
    by hand is kept. Summaries generated by earlier versions are recognised too.
  • Cleaner automatic summaries. HTML tags and components (<aside>, <YouTube />), code
    blocks and tables are left out, the text inside a tag is kept, snake_case keeps its
    underscore, and an English word is not cut in half at the end.
  • Alt text for images. The caption form has a second field for alt text. Left empty, the
    caption is used, instead of the empty alt that told screen readers to skip the image.
    rehype-figures does the same on the site for captioned images that have no alt text, which
    covers articles saved before this.