From b24688c8108f6d598e8ae87d00757db6788665b4 Mon Sep 17 00:00:00 2001 From: trueberryless Date: Sun, 19 Jan 2025 12:06:03 +0100 Subject: [PATCH] Initial commit --- README.md | 2 +- apps/docs/astro.config.ts | 6 +-- apps/docs/package.json | 42 +++++++++---------- apps/docs/src/content/docs/guides/install.mdx | 28 ++++++------- apps/docs/src/content/docs/index.mdx | 2 +- package.json | 28 ++++++------- packages/theme/README.md | 30 +++++++------ packages/theme/index.ts | 4 +- packages/theme/package.json | 9 ++-- pnpm-lock.yaml | 6 +-- 10 files changed, 78 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index e0bb27b..907fae8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Starlight Theme Template +# Starlight Minimalistic Theme Follow these steps to create your new Starlight theme. diff --git a/apps/docs/astro.config.ts b/apps/docs/astro.config.ts index c774101..41f667c 100644 --- a/apps/docs/astro.config.ts +++ b/apps/docs/astro.config.ts @@ -1,16 +1,16 @@ import starlight from "@astrojs/starlight"; import { defineConfig } from "astro/config"; -import theme from "starlight-theme-template"; +import theme from "starlight-minimalistic-theme"; // https://astro.build/config export default defineConfig({ site: "https://starlight-theme-theme.netlify.app", integrations: [ starlight({ - title: "Starlight Theme Template", + title: "Starlight Minimalistic Theme", favicon: "/favicon.svg", social: { - github: "https://github.com/TheOtterlord/starlight-theme-template", + github: "https://github.com/TheOtterlord/starlight-minimalistic-theme", }, sidebar: [ { diff --git a/apps/docs/package.json b/apps/docs/package.json index 950d41b..1531fb1 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -1,22 +1,22 @@ { - "name": "docs", - "type": "module", - "version": "0.0.0", - "private": true, - "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro check && astro build", - "preview": "astro preview", - "astro": "astro" - }, - "dependencies": { - "@astrojs/check": "catalog:", - "@astrojs/starlight": "catalog:", - "astro": "catalog:", - "sharp": "catalog:", - "starlight-package-managers": "^0.8.0", - "starlight-theme-template": "workspace:*", - "typescript": "catalog:" - } -} \ No newline at end of file + "name": "docs", + "type": "module", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro check && astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/check": "catalog:", + "@astrojs/starlight": "catalog:", + "astro": "catalog:", + "sharp": "catalog:", + "starlight-package-managers": "^0.8.0", + "starlight-minimalistic-theme": "workspace:*", + "typescript": "catalog:" + } +} diff --git a/apps/docs/src/content/docs/guides/install.mdx b/apps/docs/src/content/docs/guides/install.mdx index 34b07a7..cf48be7 100644 --- a/apps/docs/src/content/docs/guides/install.mdx +++ b/apps/docs/src/content/docs/guides/install.mdx @@ -3,29 +3,29 @@ title: Install Theme description: Install the template theme for Starlight. --- -import { Steps } from '@astrojs/starlight/components'; -import { PackageManagers } from 'starlight-package-managers' +import { Steps } from "@astrojs/starlight/components"; +import { PackageManagers } from "starlight-package-managers"; 1. Install the theme package to your project with your preferred package manager: - + + 2. Add the theme to your Starlight config. + ```ts title="astro.config.mjs" ins={1,9} - import theme from "starlight-theme-template"; + import theme from "starlight-minimalistic-theme"; export default defineConfig({ - // ... - integrations: [ - starlight({ - // ... - plugins: [ - theme() - ] - }) - ] - }) + // ... + integrations: [ + starlight({ + // ... + plugins: [theme()], + }), + ], + }); ``` diff --git a/apps/docs/src/content/docs/index.mdx b/apps/docs/src/content/docs/index.mdx index 4aaf941..433284c 100644 --- a/apps/docs/src/content/docs/index.mdx +++ b/apps/docs/src/content/docs/index.mdx @@ -1,5 +1,5 @@ --- -title: Starlight Theme Template +title: Starlight Minimalistic Theme description: A theme plugin template Starlight template: splash hero: diff --git a/package.json b/package.json index 5b8c42f..b512fc3 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "name": "@example/starlight-theme-template", - "version": "0.0.0", - "private": true, - "scripts": { - "ci:publish": "pnpm publish -r", - "ci:version": "pnpm changeset version", - "dev": "pnpm --filter docs dev", - "build": "pnpm --filter docs build" - }, - "devDependencies": { - "@biomejs/biome": "1.9.4", - "@changesets/cli": "^2.27.11" - }, - "packageManager": "pnpm@9.15.3" + "name": "starlight-minimalistic-theme", + "version": "0.0.0", + "private": true, + "scripts": { + "ci:publish": "pnpm publish -r", + "ci:version": "pnpm changeset version", + "dev": "pnpm --filter docs dev", + "build": "pnpm --filter docs build" + }, + "devDependencies": { + "@biomejs/biome": "1.9.4", + "@changesets/cli": "^2.27.11" + }, + "packageManager": "pnpm@9.15.3" } diff --git a/packages/theme/README.md b/packages/theme/README.md index b0f729d..95be18c 100644 --- a/packages/theme/README.md +++ b/packages/theme/README.md @@ -1,33 +1,31 @@

- Starlight Theme Template + Starlight Minimalistic Theme

-![Starlight theme preview](https://raw.githubusercontent.com/TheOtterlord/starlight-theme-template/refs/heads/main/assets/preview.png) +![Starlight theme preview](https://raw.githubusercontent.com/TheOtterlord/starlight-minimalistic-theme/refs/heads/main/assets/preview.png) ## Usage 1. Install the theme package to your project with your preferred package manager: ```sh -npm install starlight-theme-template -pnpm add starlight-theme-template -yarn add starlight-theme-template +npm install starlight-minimalistic-theme +pnpm add starlight-minimalistic-theme +yarn add starlight-minimalistic-theme ``` 2. Add the theme to your Starlight config. ```ts -import theme from "starlight-theme-template"; +import theme from "starlight-minimalistic-theme"; export default defineConfig({ - // ... - integrations: [ - starlight({ - // ... - plugins: [ - theme() - ] - }) - ] -}) + // ... + integrations: [ + starlight({ + // ... + plugins: [theme()], + }), + ], +}); ``` diff --git a/packages/theme/index.ts b/packages/theme/index.ts index 6fd141a..14417d4 100644 --- a/packages/theme/index.ts +++ b/packages/theme/index.ts @@ -2,13 +2,13 @@ import type { StarlightPlugin } from "@astrojs/starlight/types"; export default function createPlugin(): StarlightPlugin { return { - name: "starlight-theme-template", + name: "starlight-minimalistic-theme", hooks: { setup: ({ config, updateConfig }) => { // Update the Starlight config to inject your custom css updateConfig({ customCss: [ - "starlight-theme-template/styles/theme.css", + "starlight-minimalistic-theme/styles/theme.css", ...(config.customCss ?? []), ], }); diff --git a/packages/theme/package.json b/packages/theme/package.json index 6b4a8fd..4b4dd22 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -1,6 +1,5 @@ { - "name": "starlight-theme-template", - "private": true, + "name": "starlight-minimalistic-theme", "version": "0.0.0", "type": "module", "license": "MIT", @@ -8,7 +7,7 @@ ".": "./index.ts", "./styles/*": "./styles/*" }, - "homepage": "https://starlight-theme-template.otterlord.dev/", + "homepage": "https://starlight-minimalistic-theme.trueberryless.org/", "author": "Reuben Tier ", "files": [ "index.ts", @@ -16,7 +15,9 @@ ], "keywords": [ "withastro", - "starlight" + "starlight", + "minimalistic", + "theme" ], "devDependencies": { "astro": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb4ffac..3ca9e58 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,12 +47,12 @@ importers: sharp: specifier: 'catalog:' version: 0.33.5 + starlight-minimalistic-theme: + specifier: workspace:* + version: link:../../packages/theme starlight-package-managers: specifier: ^0.8.0 version: 0.8.0(@astrojs/starlight@0.30.0(astro@5.0.5(rollup@4.28.1)(typescript@5.5.4)(yaml@2.5.1)))(astro@5.0.5(rollup@4.28.1)(typescript@5.5.4)(yaml@2.5.1)) - starlight-theme-template: - specifier: workspace:* - version: link:../../packages/theme typescript: specifier: 'catalog:' version: 5.5.4