中文 | Task plan (Chinese): THOUGHTLITE_MIGRATION_PLAN.zh-CN.md
This document is for developers who maintain the ThoughtLite port in NotionNext: why it exists, upstream provenance, original author repository, compliance notes, and day-to-day maintenance.
- Community request: Issue #3987 proposed a new theme inspired by the open-source Astro theme ThoughtLite (timeline-style home, reading-first layout).
- Goal: Provide an optional React skin that stays compatible with NotionNext data contracts (
posts,post,customNav, comments, plugins, etc.) while approximating ThoughtLite’s look and information architecture.
| Item | Link |
|---|---|
| Upstream theme | ThoughtLite (Astro) |
| Author | tuyuritio |
| Upstream source | tuyuritio/astro-theme-thought-lite |
| Live demo | thought-lite.ttio.workers.dev |
| Upstream stack | Astro, Svelte, Tailwind CSS (see upstream README) |
| Upstream license | GPL-3.0 |
NotionNext is primarily MIT. This theme is implemented as a design-informed React rewrite, without copying upstream .astro / .svelte source wholesale. If someone later wants to vendor GPL code paths, maintainers must assess GPL/MIT compatibility (see migration plan §0).
| Item | Location |
|---|---|
| Theme folder | themes/thoughtlite/ |
| Root scope | #theme-thoughtlite |
| Config keys | THOUGHTLITE_* in themes/thoughtlite/config.js via siteConfig(..., CONFIG) |
| Baseline | Started from themes/example, then restyled toward ThoughtLite |
| Shared features | @/components/* (Notion body, comments, search, etc.) |
- Header: title, horizontal nav (incl. custom menu), search, theme toggle (
Header.js,MenuList.js,MenuItemDrop.js). - Home: optional Latest card; timeline grouped by
publishDay(HomeTimeline.js,BlogItemtimelinevariant); respects globalPOST_LIST_STYLE(page vs scroll). - Post: card header,
PostMeta,NotionPage,ShareBar, comments (dynamicwithout SSR), sidebar TOC (LayoutSluginindex.js). - Archive / category / tag / search:
TlPageHero; archive uses the same rail style; taxonomy usestl-chip(style.js). - Footer: copyright, beian,
PoweredBy, plus ThoughtLite name + upstream repo and author links (Footer.js). - Theme switcher:
conf/themeSwitch.manifest.jsentrythoughtlite; previews underpublic/images/themes-preview/thoughtlite.{png,webp}(replace placeholders before release; optionally runyarn perf:compress-theme-previews).
| Key | Purpose |
|---|---|
THOUGHTLITE_MENU_* |
Show/hide nav entries (category, tag, archive, search) |
THOUGHTLITE_HOME_TIMELINE |
Timeline on bare home routes |
THOUGHTLITE_HOME_LATEST_CARD |
Latest summary card on home |
THOUGHTLITE_SIDEBAR_ONLY_ON_POST |
Sidebar only on post detail |
THOUGHTLITE_POST_LIST_COVER |
Cover thumbnails in list mode |
THOUGHTLITE_TITLE_IMAGE |
Hero background image on non-post title bar |
THOUGHTLITE_HOME_MINIMAL_HEADER |
Minimal home title area |
THOUGHTLITE_ARTICLE_LAYOUT_VERTICAL |
Stack main + sidebar on posts |
THOUGHTLITE_ARTICLE_HIDDEN_NOTIFICATION |
Hide announcement on post |
Global LAYOUT_SIDEBAR_REVERSE still applies at site level.
NEXT_PUBLIC_THEME=thoughtliteUse yarn dev locally; ?theme=thoughtlite may work where the app exposes theme switching.
- Prefer editing
#theme-thoughtlitetokens and classes inthemes/thoughtlite/style.js. - Layout entry points:
themes/thoughtlite/index.js(Layout*); presentational pieces underthemes/thoughtlite/components/. - When matching upstream visuals, reference the public demo—avoid pasting GPL source files; document any exception in the PR.
- Timeline relies on
publishDay/publishDatefrom Notion mapping (lib/db/notion/getPageProperties.js). - Cross-theme conventions: see FUWARI.md and THEME_MIGRATION_GUIDE.
- Refresh theme previews under
public/images/themes-preview/when the UI changes materially. - Smoke test:
yarn lint --dir themes/thoughtliteand click through main routes withNEXT_PUBLIC_THEME=thoughtlite.
- Issue: notionnext-org/NotionNext#3987
- Upstream: tuyuritio/astro-theme-thought-lite
- Demo: thought-lite.ttio.workers.dev
This is an initial, merge-ready port: core flows work; further polish (tokens, spacing, motion, a11y, plugin edge cases) is expected in follow-up PRs.