-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fa35655
Showing
22 changed files
with
4,919 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# build output | ||
dist/ | ||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"cwd": "${workspaceFolder}/docs", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024-present, trueberryless | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# `starlight-sidebar-swipe` | ||
|
||
Make sidebar swipeable on mobile devices like Discord Mobile. | ||
|
||
## Package | ||
|
||
If you are looking for the Starlight plugin package, you can find it in the [`packages/starlight-sidebar-swipe/`](/packages/starlight-sidebar-swipe/) directory. | ||
|
||
## Project structure | ||
|
||
This project uses pnpm workspaces to develop a single Starlight plugin from the `packages/starlight-sidebar-swipe/` directory. A Starlight documentation site is also available in the `docs/` directory that is also used for testing and demonstrating the Starlight plugin. | ||
|
||
## License | ||
|
||
Licensed under the MIT License, Copyright © trueberryless. | ||
|
||
See [LICENSE](/LICENSE) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# `starlight-sidebar-swipe` | ||
|
||
Make sidebar swipeable on mobile devices like Discord Mobile. | ||
|
||
## Documentation | ||
|
||
Run the documentation locally by running the following command in your terminal: | ||
|
||
```shell | ||
pnpm run dev | ||
``` | ||
|
||
Content can be found in the [`src/content/docs/`](./src/content/docs/) directory. | ||
|
||
## License | ||
|
||
Licensed under the MIT License, Copyright © trueberryless. | ||
|
||
See [LICENSE](/LICENSE) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import starlight from "@astrojs/starlight"; | ||
import { defineConfig } from "astro/config"; | ||
import starlightSidebarSwipe from "starlight-sidebar-swipe"; | ||
import starlightPluginsDocsComponents from "@trueberryless-org/starlight-plugins-docs-components"; | ||
|
||
export default defineConfig({ | ||
integrations: [ | ||
starlight({ | ||
editLink: { | ||
baseUrl: "https://github.com/trueberryless-org/starlight-sidebar-swipe/edit/main/docs/", | ||
}, | ||
plugins: [ | ||
starlightSidebarSwipe(), | ||
starlightPluginsDocsComponents({ | ||
pluginName: "starlight-sidebar-swipe", | ||
showcaseProps: { | ||
entries: [], | ||
}, | ||
}), | ||
], | ||
sidebar: [ | ||
{ | ||
label: "Start Here", | ||
items: [{ slug: "getting-started" }], | ||
}, | ||
], | ||
social: { | ||
github: "https://github.com/trueberryless-org/starlight-sidebar-swipe", | ||
}, | ||
title: "Starlight Sidebar Swipe", | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "starlight-sidebar-swipe-docs", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"description": "Make sidebar swipeable on mobile devices like Discord Mobile.", | ||
"author": "trueberryless", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro build", | ||
"preview": "astro preview", | ||
"astro": "astro" | ||
}, | ||
"dependencies": { | ||
"@astrojs/starlight": "^0.30.3", | ||
"@trueberryless-org/starlight-plugins-docs-components": "^0.3.0", | ||
"astro": "^5.1.1", | ||
"sharp": "^0.33.5", | ||
"starlight-sidebar-swipe": "workspace:*" | ||
}, | ||
"engines": { | ||
"node": "^18.17.1 || ^20.3.0 || >=21.0.0" | ||
}, | ||
"private": true, | ||
"homepage": "https://github.com/trueberryless-org/starlight-sidebar-swipe", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/trueberryless-org/starlight-sidebar-swipe.git", | ||
"directory": "docs" | ||
}, | ||
"bugs": "https://github.com/trueberryless-org/starlight-sidebar-swipe/issues" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineCollection } from 'astro:content' | ||
import { docsLoader } from '@astrojs/starlight/loaders'; | ||
import { docsSchema } from '@astrojs/starlight/schema' | ||
|
||
export const collections = { | ||
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Getting Started | ||
--- | ||
|
||
Make sidebar swipeable on mobile devices like Discord Mobile. | ||
|
||
## Prerequisites | ||
|
||
You will need to have a Starlight website set up. | ||
If you don't have one yet, you can follow the ["Getting Started"](https://starlight.astro.build/getting-started) guide in the Starlight docs to create one. | ||
|
||
## Installation | ||
|
||
import { Steps, Tabs, TabItem } from "@astrojs/starlight/components"; | ||
|
||
<Steps> | ||
|
||
1. `starlight-sidebar-swipe` is a Starlight [plugin](https://starlight.astro.build/reference/plugins/). Install it by running the following command in your terminal: | ||
|
||
<Tabs syncKey="pkg"> | ||
|
||
<TabItem label="npm"> | ||
|
||
```sh | ||
npm install starlight-sidebar-swipe | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem label="pnpm"> | ||
|
||
```sh | ||
pnpm add starlight-sidebar-swipe | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem label="Yarn"> | ||
|
||
```sh | ||
yarn add starlight-sidebar-swipe | ||
``` | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
2. Configure the plugin in your Starlight [configuration](https://starlight.astro.build/reference/configuration/#plugins) in the `astro.config.mjs` file. | ||
|
||
```diff lang="js" | ||
// astro.config.mjs | ||
import starlight from '@astrojs/starlight' | ||
import { defineConfig } from 'astro/config' | ||
+import starlightSidebarSwipe from 'starlight-sidebar-swipe' | ||
|
||
export default defineConfig({ | ||
integrations: [ | ||
starlight({ | ||
+ plugins: [starlightSidebarSwipe()], | ||
title: 'My Docs', | ||
}), | ||
], | ||
}) | ||
``` | ||
|
||
3. [Start the development server](https://starlight.astro.build/getting-started/#start-the-development-server) to preview the plugin in action. | ||
|
||
</Steps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Starlight Sidebar Swipe | ||
description: Make sidebar swipeable on mobile devices like Discord Mobile. | ||
head: | ||
- tag: title | ||
content: Starlight Sidebar Swipe | ||
template: splash | ||
editUrl: false | ||
hero: | ||
tagline: Make sidebar swipeable on mobile devices like Discord Mobile. | ||
image: | ||
file: ../../assets/houston.webp | ||
actions: | ||
- text: Get Started | ||
link: /getting-started/ | ||
icon: right-arrow | ||
--- | ||
|
||
import { Card, CardGrid } from "@astrojs/starlight/components"; | ||
|
||
## Next steps | ||
|
||
<CardGrid stagger> | ||
<Card title="Install the plugin" icon="puzzle"> | ||
Check the [getting started guide](/getting-started/) for installation instructions. | ||
</Card> | ||
<Card title="Configure the plugin" icon="setting"> | ||
Edit your config in the `astro.config.mjs` file. | ||
</Card> | ||
</CardGrid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "astro/tsconfigs/strictest" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "starlight-sidebar-swipe-monorepo", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"description": "Make sidebar swipeable on mobile devices like Discord Mobile.", | ||
"author": "trueberryless", | ||
"type": "module", | ||
"engines": { | ||
"node": "^18.17.1 || ^20.3.0 || >=21.0.0" | ||
}, | ||
"packageManager": "pnpm@9.6.0", | ||
"private": true, | ||
"homepage": "https://github.com/trueberryless-org/starlight-sidebar-swipe", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/trueberryless-org/starlight-sidebar-swipe.git" | ||
}, | ||
"bugs": "https://github.com/trueberryless-org/starlight-sidebar-swipe/issues" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# `starlight-sidebar-swipe` | ||
|
||
Make sidebar swipeable on mobile devices like Discord Mobile. | ||
|
||
## Documentation | ||
|
||
Want to get started immediately? | ||
|
||
Check out the `starlight-sidebar-swipe` getting started guide. | ||
|
||
## License | ||
|
||
Licensed under the MIT License, Copyright © trueberryless. | ||
|
||
See [LICENSE](https://github.com/trueberryless-org/starlight-sidebar-swipe/blob/main/LICENSE) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { StarlightPlugin } from '@astrojs/starlight/types' | ||
|
||
export default function starlightSidebarSwipe(): StarlightPlugin { | ||
return { | ||
name: 'starlight-sidebar-swipe', | ||
hooks: { | ||
setup({ logger }) { | ||
/** | ||
* This is the entry point of your Starlight plugin. | ||
* The `setup` hook is called when Starlight is initialized (during the Astro `astro:config:setup` integration | ||
* hook). | ||
* To learn more about the Starlight plugin API and all available options in this hook, check the Starlight | ||
* plugins reference. | ||
* | ||
* @see https://starlight.astro.build/reference/plugins/ | ||
*/ | ||
logger.info('Hello from the starlight-sidebar-swipe plugin!') | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "starlight-sidebar-swipe", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"description": "Make sidebar swipeable on mobile devices like Discord Mobile.", | ||
"author": "trueberryless", | ||
"type": "module", | ||
"exports": { | ||
".": "./index.ts" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/starlight": "^0.30.3", | ||
"astro": "^5.1.1" | ||
}, | ||
"peerDependencies": { | ||
"@astrojs/starlight": ">=0.30" | ||
}, | ||
"engines": { | ||
"node": "^18.17.1 || ^20.3.0 || >=21.0.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"homepage": "https://github.com/trueberryless-org/starlight-sidebar-swipe", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/trueberryless-org/starlight-sidebar-swipe.git", | ||
"directory": "packages/starlight-sidebar-swipe" | ||
}, | ||
"bugs": "https://github.com/trueberryless-org/starlight-sidebar-swipe/issues" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "astro/tsconfigs/strictest" | ||
} |
Oops, something went wrong.