Add enabling configuration item for RSS portal
This commit is contained in:
@@ -29,9 +29,11 @@ export const Footer = () => {
|
|||||||
<Link href="/friends" title="My friend links.">
|
<Link href="/friends" title="My friend links.">
|
||||||
{"Friends"}
|
{"Friends"}
|
||||||
</Link>
|
</Link>
|
||||||
<DialogTrigger asChild>
|
{Config.RSSFeed?.enabled && (
|
||||||
<button title="Subscribe the RSS Feed.">{"Feed"}</button>
|
<DialogTrigger asChild>
|
||||||
</DialogTrigger>
|
<button title="Subscribe the RSS Feed.">{"Feed"}</button>
|
||||||
|
</DialogTrigger>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<DialogContent className="sm:max-w-md">
|
<DialogContent className="sm:max-w-md">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ export const Config: TConfig = {
|
|||||||
categoryId: "DIC_kwDOK44zm84Cb94g",
|
categoryId: "DIC_kwDOK44zm84Cb94g",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Enable the RSS Feed? If not, the feed file will not be generated and the feed entrance will be closed.
|
||||||
|
RSSFeed: {
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
|
||||||
// The supported sponsor ways are wechat-pay, alipay and paypal.
|
// The supported sponsor ways are wechat-pay, alipay and paypal.
|
||||||
SponsorLink: {
|
SponsorLink: {
|
||||||
// Your WechatPay QRCode Content.
|
// Your WechatPay QRCode Content.
|
||||||
|
|||||||
@@ -76,7 +76,9 @@ export const getStaticProps: GetStaticProps<HomePageProps> = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await generateRSSFeed();
|
if (Config.RSSFeed?.enabled) {
|
||||||
|
await generateRSSFeed();
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ export type TConfig = {
|
|||||||
email: string;
|
email: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
RSSFeed?: {
|
||||||
|
enabled: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
Giscus?: {
|
Giscus?: {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
repo: string;
|
repo: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user