Skip to content

Add a page post type for undated pages such as /about and /now #954

Description

@rmdes

Indiekit’s post types are all dated entries. There is no way to publish a page — /about, /now, /uses, /colophon, the “slash pages” people keep on IndieWeb sites — through Micropub or the posts UI: the closest fit is an article, which lands in the articles collection at a dated URL.

I have run a page post type as a separate plug-in for a while (@rmdes/indiekit-post-type-page) and would like to bring it in as @indiekit/post-type-page, shaped like the other post-type packages.

The package: name: "Page", h: "page", fields name (required), content (required), summary, category, post-status, visibility. No paths in the package; those are the presets’ job.

Recognition: a client sends h=page. #951 makes the Micropub endpoint identify a post type by its vocabulary, so with that merged a page needs no discovery property (there is none it could use: a page is exactly a name and content).

Paths in the presets: the presets give every type a dated collection path, which is wrong for a page. Each gets a page case with no date and no collection, written where the generator serves it at /{slug} without configuration:

Preset post.path post.url
Eleventy {slug}.md {slug}
Hugo content/{slug}.md {slug}
Jekyll {slug}/index.md {slug}

Media goes under media/pages/ (Hugo: static/pages/).

Not in scope: any template or layout; a page is rendered like any other file the generator finds. It is not added to the default post types, so nothing changes for existing sites unless they install it.

PR to follow, stacked on #951.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions