With this feature, you can share content only with those who know the exact URL, without having to delete the post or leave it in a Draft state.
Key Features: What is Unlisted?
Posts with the unlisted: true setting applied are excluded from all automatic exposure paths within the blog. However, the page itself is still generated, making it accessible via a direct link.
The post will be hidden from the following lists:
- Home page: Main post list
- Archive page: Full archive list
- Tag & Category: Tag and category classification pages
- Search results: Built-in search engine (Pagefind) results
- RSS feed: Subscription service feed
Key Changes
The main logic modified to implement this feature is as follows:
1. Update Content Configuration (src/content/config.ts)
Added the schema to the post Frontmatter so that it can recognize the unlisted property (boolean).
2. Modify Filtering Logic (src/utils/content-utils.ts)
Improved the filtering logic to exclude posts in the unlisted state by default when fetching the post list.
3. Dynamic Path Generation and Search Blocking (src/pages/posts/[...slug].astro)
- Path Generation: Since the detailed page must be generated even if it’s not visible in lists,
getStaticPathswas modified to include hidden posts. - Search Engine Exclusion: Added the
data-pagefind-ignoreattribute dynamically to preventPagefindfrom indexing the content of the post.
5. Multilingual Support (README Update)
For global users, related descriptions were added to README files in a total of 8 languages, including Korean, English, Spanish, Japanese, and Chinese. (Refined through AI translation for natural context.)
How to Use
Simply add unlisted: true to the Frontmatter at the top of your post’s Markdown file.
---title: A secret post I only want to share with somepublished: 2024-05-20description: This post does not appear in the main list.image: "./cover.jpg"tags: [Secret]category: Journaldraft: falseunlisted: true # <--- Add this line!---Related Links and Contribution
I have submitted a Pull Request to the original repository and am currently awaiting its acceptance. If you would like to try this feature in advance, please use my forked repository!
- Official Pull Request: saicaca/fuwari #714
- Unofficial Repo (Feature included): HAMSU-5/fuwari_with_unlisted
Note: Some errors that occur when running
pnpm check(related to Navbar and Archive) are pre-existing type errors in the original theme and are unrelated to the addition of this Unlisted feature. The feature functions normally.
Closing
When running a blog, there are bound to be posts that you feel a bit shy about making fully public or cannot disclose due to regulations, but still want to share with someone via a link. I hope this feature proves useful to Fuwari users! Detailed Feature Explanation