Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
trueberryless committed Jan 19, 2025
1 parent 2d8d4b7 commit b24688c
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 79 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Starlight Theme Template
# Starlight Minimalistic Theme

Follow these steps to create your new Starlight theme.

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/astro.config.ts
Original file line number Diff line number Diff line change
@@ -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: [
{
Expand Down
42 changes: 21 additions & 21 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -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:"
}
}
"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:"
}
}
28 changes: 14 additions & 14 deletions apps/docs/src/content/docs/guides/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

<Steps>

1. Install the theme package to your project with your preferred package manager:
<PackageManagers pkg="starlight-theme-template"/>

<PackageManagers pkg="starlight-minimalistic-theme" />

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()],
}),
],
});
```

</Steps>
2 changes: 1 addition & 1 deletion apps/docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Starlight Theme Template
title: Starlight Minimalistic Theme
description: A theme plugin template Starlight
template: splash
hero:
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]"
"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": "[email protected]"
}
30 changes: 14 additions & 16 deletions packages/theme/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
<h1 align="center">
Starlight Theme Template
Starlight Minimalistic Theme
</h1>

![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()],
}),
],
});
```
4 changes: 2 additions & 2 deletions packages/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? []),
],
});
Expand Down
9 changes: 5 additions & 4 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "starlight-theme-template",
"private": true,
"name": "starlight-minimalistic-theme",
"version": "0.0.0",
"type": "module",
"license": "MIT",
"exports": {
".": "./index.ts",
"./styles/*": "./styles/*"
},
"homepage": "https://starlight-theme-template.otterlord.dev/",
"homepage": "https://starlight-minimalistic-theme.trueberryless.org/",
"author": "Reuben Tier <[email protected]>",
"files": [
"index.ts",
"styles"
],
"keywords": [
"withastro",
"starlight"
"starlight",
"minimalistic",
"theme"
],
"devDependencies": {
"astro": "catalog:",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b24688c

Please sign in to comment.