Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISCOVERY-335: Setup IndexPage for docs #525

Merged
merged 10 commits into from
Sep 19, 2022
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ If there are variations, how best to place indents-welcome:)

[refs-contributing]: CONTRIBUTING.md

[refs-docs]: https://feature-sliced.design/docs/intro
[refs-docs]: https://feature-sliced.design/docs

[refs-motivation]: https://feature-sliced.design/docs/about/motivation
[refs-motivation-why]: https://feature-sliced.design/docs/about/motivation#-почему-не-хватает-существующих-решений
Expand Down
65 changes: 18 additions & 47 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require("dotenv").config();
const path = require("path");
const { REDIRECTS, SECTIONS, LEGACY_ROUTES } = require("./routes.config");
const { REDIRECTS, LEGACY_ROUTES } = require("./routes.config");

const DOMAIN = "https://feature-sliced.design/";
const GITHUB_ORG = "https://github.com/feature-sliced";
Expand Down Expand Up @@ -32,60 +32,23 @@ const navbar = {
items: [
// left
{
type: "dropdown",
label: "📖 Docs",
to: "/docs",
position: "left",
items: [
{
label: "🔎 Intro",
to: SECTIONS.INTRO.fullPath,
activeBasePath: SECTIONS.INTRO.fullPath,
},
{
label: "🚀 Get Started",
to: SECTIONS.GET_STARTED.shortPath,
activeBasePath: SECTIONS.GET_STARTED.shortPath,
},
{
label: "🎯 Guides",
to: SECTIONS.GUIDES.shortPath,
activeBasePath: SECTIONS.GUIDES.shortPath,
},
{
label: "🧩 Concepts",
to: SECTIONS.CONCEPTS.shortPath,
activeBasePath: SECTIONS.CONCEPTS.shortPath,
},
{
label: "📚 Reference",
to: SECTIONS.REFERENCE.shortPath,
activeBasePath: SECTIONS.REFERENCE.shortPath,
},
{
label: "🍰 About",
to: SECTIONS.ABOUT.shortPath,
activeBasePath: SECTIONS.ABOUT.shortPath,
},
{
label: "💫 Community",
to: SECTIONS.COMMUNITY.fullPath,
activeBasePath: SECTIONS.COMMUNITY.fullPath,
},
],
},
{
label: "🛠 Examples",
to: SECTIONS.EXAMPLES.fullPath,
label: "💫 Community",
to: "/community",
position: "left",
},
{
label: "❔ Help",
to: "/nav",
label: "📝 Blog",
to: "/blog",
position: "left",
},
{
label: "📝 Blog",
to: "/blog",
label: "🛠 Examples",
to: "/examples",
position: "left",
},
// right
Expand Down Expand Up @@ -145,7 +108,9 @@ const footer = {
{
title: "Specs",
items: [
{ label: "Documentation", to: "/docs/intro" },
{ label: "Documentation", to: "/docs" },
{ label: "Community", to: "/community" },
{ label: "Help", to: "/nav" },
{ label: "Discussions", to: `${GITHUB_DOCS}/discussions` },
],
},
Expand Down Expand Up @@ -297,6 +262,8 @@ const algolia = {
// contextualSearch: true,
};

const NBSP = " ";

/** @type {Config["themeConfig"]["announcementBar"]} */
const announcementBar = {
id: "bar", // Any value that will identify this message.
Expand All @@ -307,7 +274,11 @@ const announcementBar = {
// content: `📚 Documentation refinements are in progress. <a href="https://github.com/feature-sliced/documentation/issues/263" target="_blank" rel="noreferrer noopener">Stay tuned for updates</a> and <a href="https://forms.gle/nsYua6bMMG5iBB3v7" target="_blank" rel="noreferrer noopener">share your feedback</a>`,
// backgroundColor: "#5c9cb5", // As primary theme
// backgroundColor: "#0367d2",
content: `🍰 We're <a href="/blog/rebranding-stable">rebranding!</a>&nbsp;&nbsp;|&nbsp;&nbsp;☮️ Stop the war in Ukraine! #NoWar`, // #nowar
content: [
`🍰 We're <a href="/blog/rebranding-stable">rebranding!</a>`,
`❔<a href="/nav">Help</a>`,
`☮️ Stop the war in Ukraine! #NoWar`, // #nowar
].join(`${NBSP + NBSP}|${NBSP + NBSP}`),
backgroundColor: "#000000", // #nowar
textColor: "#fff", // Defaults to `#000`.
isCloseable: false, // Defaults to `true`.
Expand Down
10 changes: 5 additions & 5 deletions i18n/en/docusaurus-plugin-content-docs/community/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ Community resources, additional materials

## Main

import Row from "@site/src/shared/ui/row/tmpl.mdx"
import NavCard from "@site/src/shared/ui/nav-card/tmpl.mdx"
import { StarOutlined, SearchOutlined, TeamOutlined, VerifiedOutlined } from "@ant-design/icons";

<Row
<NavCard
title="Awesome Resources"
description="A curated list of awesome FSD videos, articles, packages"
to="https://github.com/feature-sliced/awesome"
Icon={StarOutlined}
/>
<Row
<NavCard
title="Team"
description="Core-team, Champions, Contributors, Companies"
to="/community/team"
Icon={TeamOutlined}
/>
<Row
<NavCard
title="Brandbook"
description="Recommendations for FSD's branding usage"
to="/docs/branding"
Icon={VerifiedOutlined}
/>
<Row
<NavCard
title="Contributing"
description="HowTo, Workflow, Support"
to="#"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ General information about methodology, team, community and development history

## Main

import Row from "@site/src/shared/ui/row/tmpl.mdx"
import NavCard from "@site/src/shared/ui/nav-card/tmpl.mdx"
import { StarOutlined, TrophyOutlined } from "@ant-design/icons";

<Row
<NavCard
title="Mission"
description="Goals and limitations of the methodology"
to="/docs/about/mission"
Icon={TrophyOutlined}
/>
<Row
<NavCard
title="Motivation"
description="Reasons for the creation and development of the methodology"
to="/docs/about/motivation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ First 5 minutes (RU):
## Also

**Advantages**:
- [Overview](/docs/intro#overview)
- [Overview](/docs/get-started/overview)
- CodeReview
- Onboarding

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@ This section includes methodology's key concepts, that will help you dive deeper

## Main

import Row from "@site/src/shared/ui/row/tmpl.mdx"
import NavCard from "@site/src/shared/ui/nav-card/tmpl.mdx"
import { BlockOutlined, ApiOutlined, ApartmentOutlined, PartitionOutlined, NodeIndexOutlined } from "@ant-design/icons";

<Row
<NavCard
title="App splitting"
description="Logical decomposition using layered-sliced structure"
to="/docs/concepts/app-splitting"
Icon={BlockOutlined}
/>
<Row
<NavCard
title="Public API"
description="Practices for designing scalable and easy-to-integrate modules"
to="/docs/concepts/public-api"
Icon={ApiOutlined}
/>
<Row
<NavCard
title="Cross-communication"
description="Rules for scalable and efficient module interactions"
to="/docs/concepts/cross-communication"
Icon={ApartmentOutlined}
/>
<Row
<NavCard
title="Decouple entities"
description="Logical decomposition with extraction of business entities"
to="/docs/concepts/decouple-entities"
Icon={PartitionOutlined}
/>
<Row
<NavCard
title="Desegmentation"
description="The problem of excessive fragmentation of logic"
to="/docs/concepts/issues/desegmented"
Expand Down
142 changes: 0 additions & 142 deletions i18n/en/docusaurus-plugin-content-docs/current/get-started/basics.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ Otherwise , there is a risk of complicating the project's code base

> *"Today, the feature can only be used on one page. Next week - on three. And in a month - it may be removed at all. We cannot predict the future, and we need to refrain from premature optimizations every time"*

*See also the example from [quick-start](/docs/get-started/quick-start#normal-approach)*
*See also the example from [tutorial](/docs/get-started/tutorial#normal-approach)*
Loading