Skip to content

Commit cc4ccf8

Browse files
authored
add new categories and links (#964)
1 parent a46cd16 commit cc4ccf8

File tree

4 files changed

+44
-19
lines changed

4 files changed

+44
-19
lines changed

docs/welcome/overview.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ target="\_blank">Create an account →</Button>
2222

2323
## Start implementing
2424

25+
:::info New!
26+
Check out our new [Playbooks](/playbooks/overview) section for guides and best practices for implementing different monetization models.
27+
:::
28+
2529
Get started by creating a new project and connecting to a store.
2630

2731
<Button href="/docs/projects/overview">Create a project →</Button>

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const config = {
186186
{
187187
type: "docSidebar",
188188
sidebarId: "playbookSidebar",
189-
label: "Playbooks",
189+
label: "Playbooks & Guides",
190190
},
191191
],
192192
},

sidebars.ts

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,6 @@ const welcomeCategory = Category({
3939
items: [Page({ slug: "welcome/overview" })],
4040
});
4141

42-
const playbooksCategory = Category({
43-
iconName: "sparkle",
44-
label: "Playbooks",
45-
itemsPathPrefix: "playbooks/",
46-
items: [
47-
Page({ slug: "overview" }),
48-
SubCategory({
49-
label: "Guides",
50-
slug: "guides",
51-
itemsPathPrefix: "guides/",
52-
items: [Page({ slug: "hard-paywall" }), Page({ slug: "freemium" })],
53-
index: { title: "Guides", link: "playbooks/guides" },
54-
}),
55-
],
56-
});
57-
5842
const projectsCategory = Category({
5943
iconName: "hammer",
6044
label: "Projects & Apps",
@@ -1017,6 +1001,43 @@ const integrationsMoreCategory = Category({
10171001
],
10181002
});
10191003

1004+
const playbooksOverviewCategory = Category({
1005+
iconName: "sparkle",
1006+
label: "Playbooks",
1007+
itemsPathPrefix: "playbooks/",
1008+
items: [Page({ slug: "overview" })],
1009+
});
1010+
1011+
const playbooksMonetizationCategory = Category({
1012+
iconName: "currency-usd",
1013+
iconColor: "var(--ifm-color-success)",
1014+
label: "Monetization Models",
1015+
itemsPathPrefix: "playbooks/guides/",
1016+
items: [
1017+
Page({ slug: "hard-paywall" }),
1018+
Page({ slug: "freemium" }),
1019+
SubCategory({
1020+
label: "Other resources",
1021+
items: [
1022+
Link({
1023+
label: "Implementing virtual currencies and credits",
1024+
slug: "/offerings/virtual-currency",
1025+
}),
1026+
Link({
1027+
label: "Converting a paid app to subscriptions",
1028+
slug: "https://www.revenuecat.com/blog/engineering/converting-a-paid-ios-app-to-subscriptions/",
1029+
}),
1030+
],
1031+
index: {
1032+
title: "Other resources",
1033+
description:
1034+
"Other resources for implementing different monetization models.",
1035+
link: "playbooks/guides/other-monetization-resources",
1036+
},
1037+
}),
1038+
],
1039+
});
1040+
10201041
// Add the top level categories to the defaultSidebar object
10211042
// The defaultSidebar is referenced in docusaurus.config.js
10221043
const sidebars = {
@@ -1049,7 +1070,7 @@ const sidebars = {
10491070
attributionCategory,
10501071
integrationsMoreCategory,
10511072
],
1052-
playbookSidebar: [playbooksCategory],
1073+
playbookSidebar: [playbooksOverviewCategory, playbooksMonetizationCategory],
10531074
};
10541075

10551076
export default sidebars;

src/sidebars/sidebar-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const Page = ({ slug }: PageConfig): DocItem => ({
141141

142142
export const Link = ({ label, slug }: LinkConfig): LinkItem => ({
143143
type: "link",
144-
label: `${label}`,
144+
label: `${label}${slug.includes("https://") ? " " : " →"}`,
145145
href: slug,
146146
});
147147

0 commit comments

Comments
 (0)