Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
branches: [main]
paths:
- "website/**"
- "engdocs/**"
- "specs/**"
- ".github/workflows/deploy-website.yml"
workflow_dispatch:

Expand Down
1 change: 0 additions & 1 deletion website/.astro/content-assets.mjs

This file was deleted.

1 change: 0 additions & 1 deletion website/.astro/content-modules.mjs

This file was deleted.

199 changes: 0 additions & 199 deletions website/.astro/content.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions website/.astro/types.d.ts

This file was deleted.

8 changes: 8 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
dist
.astro
src/content/docs/*
!src/content/docs/index.mdx
!src/content/docs/.gitignore
public/mermaid.min.js
public/robots.txt
56 changes: 52 additions & 4 deletions website/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,64 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import sitemap from "@astrojs/sitemap";

const site = process.env.SITE_URL || "https://sverka.dev";
const baseInput = process.env.BASE_PATH || "/";
const base = baseInput === "/" || baseInput.endsWith("/")
? baseInput
: `${baseInput}/`;
const basePath = baseInput === "/" ? "" : baseInput.replace(/\/$/, "");
const base = basePath || undefined;

const asset = (path) => `${basePath}${path}`;

const mermaidInit = `
document.addEventListener("DOMContentLoaded", function () {
if (typeof mermaid === "undefined") return;
const blocks = document.querySelectorAll('pre[data-language="mermaid"], pre.mermaid');
if (!blocks.length) return;
blocks.forEach(function (pre) {
const code = pre.querySelector("code");
pre.className = "mermaid";
pre.textContent = (code && code.textContent) || pre.textContent || "";
});
var theme = document.documentElement.dataset.theme === "dark" ? "dark" : "default";
mermaid.initialize({ startOnLoad: false, theme: theme });
mermaid.run({ querySelector: ".mermaid" });
});
`;

export default defineConfig({
site,
base,
trailingSlash: "always",
output: "static",
integrations: [sitemap()],
integrations: [
starlight({
title: "Sverka",
description: "Define checks once. Plan locally. Run anywhere.",
favicon: "/favicon.svg",
social: [
{
icon: "github",
label: "GitHub",
href: "https://github.com/sverka-dev/sverka",
},
],
editLink: {
baseUrl: "https://github.com/sverka-dev/sverka/edit/main/",
},
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
customCss: ["./src/styles/custom.css"],
head: [
{
tag: "script",
attrs: { src: asset("/mermaid.min.js"), defer: true },
},
{
tag: "script",
content: mermaidInit,
},
],
lastUpdated: true,
}),
sitemap(),
],
compressHTML: true,
});
Loading
Loading