Files
charts/website/astro.config.mjs
Boemeltrein 12cfc466fa fix(website): social-link github and more links (#37748)
**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->
Social link of git is outdated in top right. Constantly on a wrong page.
Fix also some other pages.

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [x] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code
- [ ] 📜 Documentation Changes

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made changes to the documentation
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning
- [x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or
`fix(docs):`

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
2025-07-26 18:27:43 +02:00

184 lines
5.0 KiB
JavaScript

import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
// https://starlight.astro.build/guides/css-and-tailwind/#tailwind-css
import tailwind from "@astrojs/tailwind";
// https://github.com/HiDeoo/starlight-links-validator
import starlightLinksValidator from "starlight-links-validator";
// https://github.com/HiDeoo/starlight-image-zoom
import starlightImageZoom from "starlight-image-zoom";
// https://github.com/HiDeoo/starlight-blog
import starlightBlog from "starlight-blog";
// https://docs.astro.build/en/guides/integrations-guide/sitemap/
import sitemap from "@astrojs/sitemap";
// https://github.com/alextim/astro-lib/tree/main/packages/astro-robots-txt#readme
import robotsTxt from "astro-robots-txt";
// https://github.com/giuseppelt/astro-lottie
import lottie from "astro-integration-lottie";
// https://github.com/risu729/astro-better-image-service
import betterImageService from "astro-better-image-service";
// https://github.com/Playform/Compress
import playformCompress from "@playform/compress";
// Configure global authors here
import { authors } from "./src/content/docs/news/authors";
const site = "https://truecharts.org";
// https://astro.build/config
export default defineConfig({
site: site,
base: "/",
output: "static",
outDir: "build",
cacheDir: ".astro/cache",
trailingSlash: "ignore",
compressHTML: true,
prefetch: {
prefetchAll: true,
},
build: {
output: "directory",
},
experimental: {
},
integrations: [
starlight({
title: "TrueCharts Charts",
customCss: ["./src/tailwind.css"],
tagline: "Awesome Helm Charts",
pagefind: true,
logo: {
src: "./src/assets/with-text.svg",
replacesTitle: true,
},
head: [
{
tag: "script",
attrs: {
src: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9270569596814796",
crossorigin: "anonymous",
defer: true,
},
},
{
tag: "script",
attrs: {
src: "https://www.googletagmanager.com/gtag/js?id=G-Q9NT692BZZ",
defer: true,
},
},
{
tag: "script",
content:
"window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Q9NT692BZZ');",
},
],
tableOfContents: {
maxHeadingLevel: 6,
},
social: {
github: "https://github.com/trueforge-org",
facebook: "https://www.facebook.com/truecharts",
"x.com": "https://twitter.com/useTrueCharts",
discord: "https://discord.gg/tVsPTHWTtr",
telegram: "https://t.me/s/truecharts",
openCollective: "https://opencollective.com/truecharts",
patreon: "https://patreon.com/truecharts",
},
editLink: {
baseUrl: "https://github.com/trueforge-org/truecharts/tree/master/website",
},
components: {
Header: "./src/components/CustomHeader.astro",
Hero: "./src/components/CustomHero.astro",
MarkdownContent: "./src/components/CustomMarkdownContent.astro",
},
plugins: [
starlightBlog({
prefix: "news",
title: "TrueCharts News",
postCount: 5,
recentPostCount: 10,
authors: authors,
}),
starlightImageZoom(),
starlightLinksValidator({
errorOnRelativeLinks: false,
errorOnFallbackPages: false,
errorOnLocalLinks: false,
exclude: [
"/s/charts",
"/s/discord",
"/s/fb",
"/s/ghs",
"/s/git",
"/s/oc",
"/s/patreon",
"/s/shop",
"/s/tg",
"/s/twitter",
],
}),
],
sidebar: [
{
label: "General",
collapsed: false,
autogenerate: {
directory: "general",
collapsed: true
},
},
{
label: "Common Chart Options",
collapsed: true,
autogenerate: {
directory: "common",
},
},
{
label: "Guides",
collapsed: true,
autogenerate: {
directory: "guides",
},
},
{
label: "ClusterTool",
collapsed: true,
autogenerate: {
directory: "clustertool",
},
},
{
label: "Charts",
collapsed: true,
autogenerate: {
directory: "charts",
},
},
{
label: "Development",
collapsed: true,
autogenerate: {
directory: "development",
},
},
],
}),
sitemap(),
robotsTxt(),
tailwind({
// Disable the default base styles:
applyBaseStyles: false,
}),
lottie(),
betterImageService(),
playformCompress({
HTML: false,
CSS: true,
JavaScript: true,
Image: true,
SVG: true,
}),
],
});