Skip to content

Commit 9f3ef4d

Browse files
authored
feat: add Astro landing page home UI (#905)
* feat: add Astro landing page home UI * docs: add AI Skills content to the LLMs documentation * fix: modify the static-image folder path * fix: astro.config build error * chore: pnpm-lock update * fix: branding static-image path issue * fix: lint issue * refactor: rename _home to _pages for FSD consistency, use PascalCase for Astro components - Rename src/pages/_home → src/pages/_pages for FSD layer naming consistency - Rename Astro component files from kebab-case to PascalCase (hero-banner.astro → HeroBanner.astro, etc.) Made-with: Cursor * fix: move ThemeProvider out of static-image, rename static-image components to PascalCase - Move ThemeProvider.astro from static-image/ to shared/ui/ (was placed there accidentally) - Rename static-image.astro → StaticImage.astro - Rename static-image-download.astro → StaticImageDownload.astro Made-with: Cursor * chore: update config and content paths after refactoring - Update astro.config.mjs and tsconfig.astro.json for _pages path - Update import paths in content docs (branding, layers, public-api, slices-segments across all locales) Made-with: Cursor * fix: astro.config lint error * fix: use relative imports in docs index to avoid alias resolution error * fix: replace forced line break with responsive wrapping in HeroBanner * fix: make HeroBanner summary wrap naturally * fix: HeroBanner lint issue * fix: use relative imports for static image components in docs
1 parent 8302ee2 commit 9f3ef4d

54 files changed

Lines changed: 4645 additions & 3451 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Dependencies
88
node_modules
9-
9+
.pnpm-store
1010
# Production
1111
build
1212

astro.config.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,16 @@ import starlightLinksValidator from "starlight-links-validator";
88
// https://astro.build/config
99
export default defineConfig({
1010
outDir: "./build",
11+
publicDir: "./static",
1112
site: "https://fsd.how",
13+
vite: {
14+
resolve: {
15+
alias: {
16+
"@": new URL("./src", import.meta.url).pathname,
17+
},
18+
},
19+
},
1220
redirects: {
13-
"/": "/docs/get-started/overview",
1421
"/ru": "/ru/docs/get-started/overview",
1522
"/uz": "/uz/docs/get-started/overview",
1623
"/kr": "/kr/docs/get-started/overview",
@@ -29,7 +36,7 @@ export default defineConfig({
2936
defaultLocale: "root",
3037
customCss: ["./src/styles/custom.css"],
3138
components: {
32-
ThemeProvider: "./src/components/ThemeProvider.astro",
39+
ThemeProvider: "./src/shared/ui/ThemeProvider.astro",
3340
},
3441
head: [
3542
{

pnpm-lock.yaml

Lines changed: 3940 additions & 3408 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/content/docs/docs/branding.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Branding Guidelines
44

55
import { Aside } from '@astrojs/starlight/components';
66

7-
import StaticImageDownload from '../../../components/StaticImageDownload.astro';
7+
import StaticImageDownload from '../../../shared/ui/static-image/StaticImageDownload.astro';
88

99
FSD's visual identity is based on its core-concepts: `Layered`, `Sliced self-contained parts`, `Parts & Compose`, `Segmented`.
1010
But also we tend to design simple, pretty identity, which should convey the FSD philisophy and be easy to recognize.

src/content/docs/docs/get-started/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
---
66

77
import { FileTree, LinkCard, Aside } from '@astrojs/starlight/components';
8-
import StaticImage from '../../../../components/StaticImage.astro';
8+
import StaticImage from '../../../../shared/ui/static-image/StaticImage.astro';
99

1010
**Feature-Sliced Design** (FSD) is an architectural methodology for scaffolding front-end applications. Simply put, it's a compilation of rules and conventions on organizing code. The main purpose of this methodology is to make the project more understandable and stable in the face of ever-changing business requirements.
1111

src/content/docs/docs/llms.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,15 @@ This page provides links and guidance for LLM crawlers.
1616

1717
- Files are served from the site root, regardless of the current page path.
1818
- In deployments with a non-root base URL (e.g., `/documentation/`), the links above are automatically prefixed.
19+
20+
### AI Skills
21+
22+
[Skills](https://vercel.com/docs/agent-resources/skills) are reusable instruction packages for AI coding agents. Unlike the static llms.txt files above, a Skill can be installed in your project and used when relevant.
23+
24+
- [Feature-Sliced Design Skill](https://skills.sh/feature-sliced/skills/feature-sliced-design) — A community-maintained Skill based on the official FSD documentation, available for agents that support the Skills standard.
25+
26+
```bash
27+
npx skills add https://github.com/feature-sliced/skills --skill feature-sliced-design
28+
```
29+
30+
These resources can help AI systems apply FSD concepts more effectively, but final architectural and design decisions should still be made by your team in the context of your project.

src/content/docs/docs/reference/layers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
---
66

77
import { Aside } from '@astrojs/starlight/components';
8-
import StaticImage from '../../../../components/StaticImage.astro';
8+
import StaticImage from '../../../../shared/ui/static-image/StaticImage.astro';
99

1010
Layers are the first level of organisational hierarchy in Feature-Sliced Design. Their purpose is to separate code based on how much responsibility it needs and how many other modules in the app it depends on. Every layer carries special semantic meaning to help you determine how much responsibility you should allocate to your code.
1111

src/content/docs/docs/reference/public-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
---
66

77
import { FileTree, Aside } from '@astrojs/starlight/components';
8-
import StaticImage from '../../../../components/StaticImage.astro';
8+
import StaticImage from '../../../../shared/ui/static-image/StaticImage.astro';
99

1010
A public API is a _contract_ between a group of modules, like a slice, and the code that uses it. It also acts as a gate, only allowing access to certain objects, and only through that public API.
1111

src/content/docs/docs/reference/slices-segments.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar:
44
order: 2
55
---
66

7-
import StaticImage from '../../../../components/StaticImage.astro';
7+
import StaticImage from '../../../../shared/ui/static-image/StaticImage.astro';
88

99
## Slices
1010

src/content/docs/index.mdx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
title: Feature-Sliced Design
33
template: splash
44
hero:
5-
tagline:
6-
Architectural methodology for frontend projects
7-
actions:
8-
- text: Get started
9-
link: /docs/get-started/overview
10-
icon: right-arrow
11-
variant: primary
5+
tagline: ""
126
---
7+
8+
import HeroBanner from "../../pages/_pages/ui/HeroBanner.astro";
9+
import Products from "../../pages/_pages/ui/Products.astro";
10+
import PopularGuides from "../../pages/_pages/ui/PopularGuides.astro";
11+
import "../../pages/_pages/ui/index.css";
12+
13+
<div class="HomePage__container">
14+
<HeroBanner />
15+
<Products />
16+
<PopularGuides />
17+
</div>

0 commit comments

Comments
 (0)