feat(theme): add site footer and marketing sections
- Add SiteFooter, rendered through the Layout bottom slot so it appears on every page type. themeConfig.footer is deliberately left unset: setting it would render the built-in HomeFooter as well, on the home page only. - Add a frontmatter-driven section system (advantages, contentGrid, techStack, cases and cta) with a single ordered array, so bands can be reordered or removed without touching code. - Bands render only when they have content, so an unfilled page degrades to its heading rather than showing empty boxes. - Add a SHOW_COPY_PLACEHOLDERS flag for drafting, false by default.
This commit is contained in:
14 files changed
+652
-3
No files matched your search
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Type of the project's `i18n.json`, for use with `useI18n()`.
|
||||
*
|
||||
* `useI18n<T>()` is generic over the keys *beyond* Rspress's built-in set:
|
||||
*
|
||||
* useI18n<T>(): (key: keyof (T & I18nText), params?) => string
|
||||
*
|
||||
* Without a type argument, `T` defaults to `unknown` and only the built-in keys
|
||||
* type-check — looking up one of our own keys (`footer.copyright`, say) is then
|
||||
* an error. Passing this type fixes that for every key in `i18n.json`, and stays
|
||||
* correct automatically as keys are added.
|
||||
*
|
||||
* `typeof import(...)` is a type-level import, so this costs nothing at runtime
|
||||
* and the JSON is not pulled into the client bundle.
|
||||
*/
|
||||
export type CustomI18n = typeof import("../../i18n.json")
|
||||
Reference in new issue
Block a user