Conversation
A post type whose h value isn’t entry is identified by that vocabulary, so a plug-in such as a page type no longer needs a discovery property to avoid being filed as an article. Fixes #950
A page is an undated post at the root of a website, such as /about or /now. The package follows the other post-type packages; the presets give a page an undated root path where each generator serves it. Fixes #954
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #954. Stacked on #951 (the first commit here is that PR’s): a page is recognised by its
h=pagevocabulary, so this only works once that lands.The package
packages/post-type-pagefollows the other post-type packages:name: "Page",h: "page", fieldsnameandcontent(required),summary,category,post-status,visibility; an icon; README; docs page and sidebar entry under Post types → Official plug-ins. Not added to the default post types.Presets
Each preset gets a
pagecase with no date and no collection, at a path each generator serves at/{slug}without configuration:post.pathpost.url{slug}.md{slug}content/{slug}.md{slug}{slug}/index.md{slug}Media under
media/pages/(Hugo:static/pages/, served atpages/).Tests
pageentry in each fixture with the paths above (all three fail onmainwith the dated collection path).endpoint-micropubintegration: with@indiekit/post-type-pageand@indiekit/preset-eleventyinstalled,h=page&name=About&content=…answers 202 withLocation: https://website.example/about.One thing I noticed while writing that test:
Indiekit.postTypesis a single Map that a preset walks in its owninit(), so a post type listed after the preset inpluginsgets no paths (501 “No configuration provided for page post type”). The test lists the page type first. That affects every add-on post type, not only this one; I can open a separate issue if you’d like it addressed.Verified locally: preset-eleventy 9/9, preset-jekyll 9/9, preset-hugo 12/12, endpoint-micropub 151/151; eslint and prettier clean.