From e216374857cd8d64cea910577f6cf14b27450697 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 4 Dec 2023 09:01:46 +0800 Subject: [PATCH] Remove cloud from navbar. --- docusaurus.config.js | 10 ++++------ .../current/tutorial/srs-stack.md | 2 +- .../current/tutorial/srs-stack.md | 6 ++++++ src/pages/index.js | 6 +++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index f2b3ef00..78f00312 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -96,11 +96,6 @@ const config = { position: 'left', label: 'Docs', }, - { - to: '/cloud', - label: 'Cloud', - position: 'left', - }, { type: 'doc', docId: 'tutorial/srs-server', @@ -261,7 +256,10 @@ const config = { './config/docusaurus-rewrite-siteconfig-plugin', { rewriteSiteConfig: (context) => { - if ('zh-cn' === context.i18n.currentLocale) { + const enLanguage = context.i18n.currentLocale === 'en-us'; + + // For zh-cn, replace the Discord with Wechat. + if (!enLanguage) { context.siteConfig.themeConfig.footer.links.forEach(function ({ items }) { items.forEach(function (item) { if (item.label === 'Discord') { diff --git a/i18n/en-us/docusaurus-plugin-content-docs/current/tutorial/srs-stack.md b/i18n/en-us/docusaurus-plugin-content-docs/current/tutorial/srs-stack.md index 95292719..eb1f1f60 100644 --- a/i18n/en-us/docusaurus-plugin-content-docs/current/tutorial/srs-stack.md +++ b/i18n/en-us/docusaurus-plugin-content-docs/current/tutorial/srs-stack.md @@ -19,7 +19,7 @@ Discover how to effortlessly stream your camera to YouTube 24/7 using DDNS and V tutorial. Say goodbye to the need for a PC or OBS, and enjoy a more stable and seamless live streaming experience. -## How to Do Virtual Live Streaming by SRS Stack +## Ultimate Unmanned Live Streaming Solution: Easy, Affordable & No PC Required! Perfect for Slow Media, Sleep Music, ASMR, Movie Streaming & More! https://youtu.be/68PIGFDGihU diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/current/tutorial/srs-stack.md b/i18n/zh-cn/docusaurus-plugin-content-docs/current/tutorial/srs-stack.md index 2df91cc8..fce5790b 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/current/tutorial/srs-stack.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/current/tutorial/srs-stack.md @@ -20,6 +20,12 @@ https://youtu.be/JMz68_wuVvM 在本逐步教程中,探索如何使用DDNS和VPS轻松地将您的摄像头24/7实时流式传输到YouTube。告别使用PC或OBS的需求,享受更稳定、 无缝的直播体验。 +## Ultimate Unmanned Live Streaming Solution: Easy, Affordable & No PC Required! Perfect for Slow Media, Sleep Music, ASMR, Movie Streaming & More! + +https://youtu.be/CjXkRmNRtHA + +无人直播终极方案,简单、便宜、不占用电脑,自媒体慢直播、无人直播带货、睡眠音乐直播、ASMR直播、电影直播等必备方案 + ## SRS Stack:起步、购买和入门 * 地址: https://www.bilibili.com/video/BV1844y1L7dL * 说明: 如何购买SRS Stack?如何使用云厂商的镜像一键部署SRS Stack?如何在宝塔或aaPanel中安装SRS Stack?如何设置防火墙和安全组? diff --git a/src/pages/index.js b/src/pages/index.js index 88014a53..d33e4577 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -11,14 +11,14 @@ import hldSdImage from "../../static/img/SRS-SingleNode-4.0-sd.png"; import useIsBrowser from "@docusaurus/core/lib/client/exports/useIsBrowser"; function HomepageHeader() { - const {siteConfig, i18n} = useDocusaurusContext(); + const context = useDocusaurusContext(); const isBrowser = useIsBrowser(); const shanghaiTimezone = function () { return [ 'Asia/Shanghai', 'Asia/Harbin', 'Asia/Chongqing', 'Asia/Kashgar', 'Asia/Urumqi' ].includes(Intl.DateTimeFormat().resolvedOptions().timeZone); } (); - const enLanguage = i18n.currentLocale === 'en-us'; + const enLanguage = context.i18n.currentLocale === 'en-us'; const alwaysShowCloudService = function() { if (!isBrowser) return false; return window.location.hostname === 'localhost' || window.location.href.indexOf('cloud=1') > 0; @@ -31,7 +31,7 @@ function HomepageHeader() { return (<>
-

{siteConfig.title}

+

{context.siteConfig.title}