Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
help-beta: Add footer to the new help center.
Shubham Padiade472a09f9f7
diff --git a/help-beta/astro.config.mjs b/help-beta/astro.config.mjsindex 1efb588b482..e06099e4413 100644--- a/help-beta/astro.config.mjs+++ b/help-beta/astro.config.mjs@@ -51,11 +51,20 @@ export default defineConfig({optional: true,default: true,}),+ SUPPORT_EMAIL: envField.string({+ context: "client",+ access: "public",+ optional: true,+ default: "[email protected]",+ }),},},integrations: [starlight({title: "Zulip help center",+ components: {+ Footer: "./src/components/Footer.astro",+ },pagination: false,customCss: ["./src/styles/main.css", "./src/styles/steps.css"],sidebar: [diff --git a/help-beta/src/components/Footer.astro b/help-beta/src/components/Footer.astronew file mode 100644index 00000000000..daf823742ad--- /dev/null+++ b/help-beta/src/components/Footer.astro@@ -0,0 +1,22 @@+---+import {CORPORATE_ENABLED, SUPPORT_EMAIL} from "astro:env/client";++let footer_html = `<p>Don't see an answer to your question? <a href="mailto:{{ ${SUPPORT_EMAIL} }}">Contact this Zulip server's administrators</a> for support.</p>`;+if (CORPORATE_ENABLED) {+ footer_html = `<p>Your feedback helps us make Zulip better for everyone! Please <a href="/help-beta/contact-support">contact us</a> with questions, suggestions, and feature requests.</p>`;+}+---++<footer class="sl-flex">+ <hr />+ <Fragment set:html={footer_html} />+</footer>++<style>+ @layer starlight.core {+ footer {+ flex-direction: column;+ gap: 1.5rem;+ }+ }+</style>diff --git a/tools/build-help-center b/tools/build-help-centerindex bbd74a2384c..e61b247ca76 100755--- a/tools/build-help-center+++ b/tools/build-help-center@@ -3,6 +3,7 @@import osimport subprocessimport sys+from email.utils import parseaddrsys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))@@ -21,6 +22,7 @@ from django.conf import settingsdef run() -> None:subprocess.check_call(["./tools/convert-help-center-docs-to-mdx"])env = os.environ.copy()+ env["SUPPORT_EMAIL"] = parseaddr(settings.ZULIP_ADMINISTRATOR)[1]env["CORPORATE_ENABLED"] = str(settings.CORPORATE_ENABLED).lower()subprocess.check_call(["/usr/local/bin/corepack", "pnpm", "build"],