b6396cdaac
**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 images on blog sites cannot be zoomed I think there is a problem with Images on Blog Pages (I have not found any, but if there is one, it would not be possible to zoom the image...). This is because the MarkdownContent.astro cannot be overridden by the Image plugin because the Blog already overrid it... This is also probably the reason, why there is a comment in your code, which says, that the Image Zoom plugin should not be before the Blog plugin, because otherwise, the blog page would be scuffed, because the author and all other metadata cannot be overriden anymore, because the Image Zoom plugin already overrid the MarkdownContent.astro I hope this helps. Have a nice day, bye! **⚙️ Type of change** - [x] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 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 --> On my own project (https://blog.trueberryless.org) **📃 Notes:** <!-- Please enter any other relevant information here --> I have created around 10 PRs in different repositories where all of them have the same issue, my own repo from one week ago included... **✔️ 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 corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 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 - [ ] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` - [x] I have edited all files on GitHub web performed no tests and didn't even try to run the code :) I'm just here to help and give a hint how it could work. **➕ 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._ --------- Signed-off-by: trueberryless <99918022+trueberryless@users.noreply.github.com>
193 lines
5.2 KiB
JavaScript
193 lines
5.2 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: {
|
|
directRenderScript: false,
|
|
clientPrerender: false
|
|
},
|
|
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/truecharts",
|
|
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/truecharts/public/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",
|
|
},
|
|
},
|
|
{
|
|
label: "Deprecated",
|
|
collapsed: true,
|
|
autogenerate: {
|
|
directory: "deprecated",
|
|
},
|
|
},
|
|
],
|
|
}),
|
|
sitemap(),
|
|
robotsTxt(),
|
|
tailwind({
|
|
// Disable the default base styles:
|
|
applyBaseStyles: false,
|
|
}),
|
|
lottie(),
|
|
betterImageService(),
|
|
playformCompress({
|
|
HTML: false,
|
|
CSS: true,
|
|
JavaScript: true,
|
|
Image: true,
|
|
SVG: true,
|
|
}),
|
|
],
|
|
});
|