Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/syhily/yufan.me/llms.txt

Use this file to discover all available pages before exploring further.

Posts are the primary content type in yufan.me. Each post is served at /posts/:slug and shares the global slug namespace with pages — a slug used by any post cannot be reused by a page, and vice versa. Posts support categories, tags, cover images, a rich Tiptap editor body, and fine-grained visibility controls.

Creating a post

1

Open the post list

Navigate to Admin → Posts in the sidebar. Click New Post in the top-right corner.
2

Fill in the post title

Enter a title. The slug field is pre-filled automatically — see the tip below about slug derivation.
3

Select a category

Choose a single category from the dropdown. Categories must be created in Admin → Categories before they appear here.
4

Add tags

Type or select one or more tags. Tags must exist in Admin → Tags first.
5

Set a cover image

Pick an image from the image library. The library requires S3 storage to be enabled. If no cover is set, the post falls back to /images/open-graph.png on the public site.
6

Write the body

Use the Tiptap editor to write your content. See Using the Tiptap content editor for a full reference of supported block types and toolbar controls.
7

Publish or save as draft

Toggle Published on and click Save to publish. Leave the toggle off to save as a draft.

Draft vs published

A post is treated as a draft — and therefore invisible to the public — under either of the following conditions:
  • The Published toggle is false, or
  • The post has no published revision (i.e. the body has never been saved to the published revision slot).
Both conditions must be false for a post to appear in public listings, feeds, and the sitemap. A post with published=true but no published revision will not appear on the home page or in any public listing. Draft posts do not appear on the home page, in tag and category feeds, in RSS/Atom, or in the sitemap. They remain accessible in /archives and in the admin console.

Scheduling

Set a future date in the Publish date field to schedule a post. The post is promoted to the published revision slot immediately, but the catalog filter (publishedAt <= now()) keeps it hidden from public listings, feeds, and the sitemap until the scheduled time arrives. No cron job or manual action is needed — the post becomes visible automatically when the publish date is reached.

Post fields

FieldDescription
TitleDisplay title (max 200 characters). Required.
SlugURL identifier for the post. Auto-derived from the title; editable. Must be unique across all posts and pages.
CategorySingle category assignment. Optional.
TagsOne or more tag assignments. Optional.
Cover imageImage from the library used as the post thumbnail and OG image. Defaults to /images/open-graph.png when empty.
SummaryShort excerpt (max 500 characters) used in listings and meta description.
BodyFull post content, authored in the Tiptap editor and stored as PortableText JSON.
PublishedWhen true and a published revision exists, the post is visible to the public.
Publish dateControls public visibility timing. Future dates keep the post hidden until the time arrives.
FeaturedMarks the post for special treatment on the home page (see below).
VisibleWhen false, hides the post from the home page and random-post widgets (see below).
Show ToCRenders a table of contents sidebar from heading anchors.
Show updated dateDisplays the last-updated timestamp on the post page.
Comments enabledAllows readers to post comments on this post.
PinnedPin the post to the top of listings. Set a pin date to control pin order.
AliasesAdditional slug aliases that redirect to this post’s canonical URL.
OG imageCustom Open Graph image URL. Falls back to the cover image when empty.
Setting Featured to true marks a post for home page promotion. Whether featured posts receive special visual treatment depends on the featureEnabled toggle in Admin → Settings → Content. When that setting is off, featured posts render identically to non-featured posts.

Visibility

Setting Visible to false hides a post from:
  • The public home page
  • The random-post widget in the sidebar
The post remains accessible in:
  • /archives
  • Tag and category listing pages
  • /search
  • sitemap.xml
  • RSS and Atom feeds
Use visible=false for posts you want indexed and linked but not surfaced prominently.
Slugs are derived automatically from the post title using the deriveSlug pipeline: pinyin-pro converts CJK characters to their pinyin romanization, then github-slugger normalizes the result to lowercase kebab-case ASCII. For example, the title “你好世界” produces the slug ni-hao-shi-jie. You can override the generated slug manually in the Slug field, but the value must be unique across all posts and all pages — the two types share one global slug namespace.
Deleting a category or tag that still has posts assigned to it is blocked at the database level. You must reassign or remove the taxonomy from every post that references it before the deletion is allowed.

Build docs developers (and LLMs) love