diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..7ac1ee3
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,37 @@
+name: Deploy to GitHub Pages
+
+on:
+ # Trigger the workflow every time you push to the `main` branch
+ # Using a different branch name? Replace `main` with your branch’s name
+ push:
+ branches: [main]
+ # Allows you to run this workflow manually from the Actions tab on GitHub.
+ workflow_dispatch:
+
+# Allow this job to clone the repo and create a page deployment
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout your repository using git
+ uses: actions/checkout@v4
+ - name: Install, build, and upload your site
+ uses: withastro/action@v2
+ with:
+ path: ./docs # The root location of Astro inside the repository
+
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ steps:
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v4
diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs
index 7f89474..7bdd0ec 100644
--- a/docs/astro.config.mjs
+++ b/docs/astro.config.mjs
@@ -2,6 +2,8 @@ import { defineConfig } from "astro/config";
// https://astro.build/config
export default defineConfig({
+ site: "https://wicky.nillia.ms",
+ base: "/cally",
trailingSlash: "always",
devToolbar: {
enabled: false,
diff --git a/docs/src/components/Link.astro b/docs/src/components/Link.astro
new file mode 100644
index 0000000..6997c1f
--- /dev/null
+++ b/docs/src/components/Link.astro
@@ -0,0 +1,22 @@
+---
+import type { HTMLAttributes } from "astro/types";
+
+interface Props extends HTMLAttributes<"a"> {
+ href: `/${string}`;
+}
+
+const { href, ...rest } = Astro.props;
+const base = import.meta.env.BASE_URL;
+
+if (href.startsWith(base)) {
+ throw new Error(
+ `href should not include BASE_URL. href: "${href}", BASE_URL: "${base}"`
+ );
+}
+
+const url = href === "/" ? base : base + href.slice(1);
+---
+
+
+
This component, combined with
- {`
, is
- used to select a single date. It can display one or more months at a time.
+ {`
,
+ is used to select a single date. It can display one or more months at a
+ time.
- See the guide on theming for a walkthrough of how to - style this component. + See the guide on theming for a walkthrough of how + to style this component.