-
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.
Merge pull request #1 from HiDeoo/hd-boostrap
- Loading branch information
Showing
56 changed files
with
9,006 additions
and
1 deletion.
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,44 @@ | ||
name: Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} | ||
|
||
jobs: | ||
lint_test: | ||
name: Lint & Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: pnpm | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Generates docs TypeScript types | ||
run: pnpm astro sync | ||
working-directory: docs | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
- name: Test | ||
run: pnpm test |
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,50 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
integration: | ||
name: Integration | ||
uses: ./.github/workflows/integration.yml | ||
|
||
publish: | ||
name: Publish | ||
needs: | ||
- integration | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: pnpm | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Publish | ||
run: pnpm publish --no-git-checks | ||
working-directory: packages/starlight-heading-badges | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_CONFIG_PROVENANCE: true | ||
|
||
- name: Generate changelog | ||
uses: hideoo/changelogithub-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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 @@ | ||
.astro | ||
.DS_Store | ||
.eslintcache | ||
.idea | ||
.next | ||
.turbo | ||
.vercel | ||
.vscode/* | ||
!.vscode/extensions.json | ||
!.vscode/launch.json | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
.vscode-test | ||
.vscode-test-web | ||
*.local | ||
*.log | ||
*.pem | ||
*.tsbuildinfo | ||
build | ||
coverage | ||
dist | ||
dist-ssr | ||
lerna-debug.log* | ||
logs | ||
next-env.d.ts | ||
node_modules | ||
npm-debug.log* | ||
out | ||
pnpm-debug.log* | ||
releases | ||
test-results | ||
yarn-debug.log* | ||
yarn-error.log* |
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 @@ | ||
pnpx lint-staged |
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 @@ | ||
.astro | ||
.github/blocks | ||
.next | ||
.vercel | ||
.vscode-test | ||
.vscode-test-web | ||
build | ||
coverage | ||
dist | ||
dist-ssr | ||
out | ||
pnpm-lock.yaml |
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,25 @@ | ||
const baseConfig = require('@hideoo/prettier-config') | ||
|
||
/** | ||
* @type {import('prettier').Config} | ||
*/ | ||
const prettierConfig = { | ||
...baseConfig, | ||
overrides: [ | ||
{ | ||
files: '*.astro', | ||
options: { | ||
parser: 'astro', | ||
}, | ||
}, | ||
{ | ||
files: ['*.md', '*.mdx'], | ||
options: { | ||
printWidth: 80, | ||
}, | ||
}, | ||
], | ||
plugins: [require.resolve('prettier-plugin-astro')], | ||
} | ||
|
||
module.exports = prettierConfig |
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": ["dbaeumer.vscode-eslint", "esbenp.prettier-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,13 @@ | ||
{ | ||
"eslint.useFlatConfig": true, | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"html", | ||
"vue", | ||
"markdown", | ||
"astro" | ||
] | ||
} |
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, HiDeoo | ||
|
||
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 @@ | ||
packages/starlight-heading-badges/README.md |
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 @@ | ||
.astro | ||
.github/blocks | ||
.next | ||
.vercel | ||
.vscode-test | ||
.vscode-test-web | ||
build | ||
coverage | ||
dist | ||
dist-ssr | ||
out | ||
pnpm-lock.yaml |
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,28 @@ | ||
<div align="center"> | ||
<h1>starlight-heading-badges 🔖</h1> | ||
<p>Starlight plugin to add badges to your Markdown and MDX headings.</p> | ||
</div> | ||
|
||
<div align="center"> | ||
<a href="https://github.com/HiDeoo/starlight-heading-badges/actions/workflows/integration.yml"> | ||
<img alt="Integration Status" src="https://github.com/HiDeoo/starlight-heading-badges/actions/workflows/integration.yml/badge.svg" /> | ||
</a> | ||
<a href="https://github.com/HiDeoo/starlight-heading-badges/blob/main/LICENSE"> | ||
<img alt="License" src="https://badgen.net/github/license/HiDeoo/starlight-heading-badges" /> | ||
</a> | ||
<br /> | ||
</div> | ||
|
||
## Example | ||
|
||
Run the docs locally using [pnpm](https://pnpm.io): | ||
|
||
```shell | ||
pnpm run dev | ||
``` | ||
|
||
## License | ||
|
||
Licensed under the MIT License, Copyright © HiDeoo. | ||
|
||
See [LICENSE](https://github.com/HiDeoo/starlight-heading-badges/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,35 @@ | ||
import starlight from '@astrojs/starlight' | ||
import { defineConfig } from 'astro/config' | ||
import starlightHeadingBadges from 'starlight-heading-badges' | ||
|
||
export default defineConfig({ | ||
integrations: [ | ||
starlight({ | ||
credits: true, | ||
customCss: ['./src/styles/custom.css'], | ||
editLink: { | ||
baseUrl: 'https://github.com/HiDeoo/starlight-heading-badges/edit/main/docs/', | ||
}, | ||
plugins: [starlightHeadingBadges()], | ||
sidebar: [ | ||
{ | ||
label: 'Start Here', | ||
items: [ | ||
{ label: 'Getting Started', link: '/getting-started/' }, | ||
{ label: 'Usage', link: '/usage/' }, | ||
], | ||
}, | ||
{ | ||
label: 'Resources', | ||
items: [{ label: 'Plugins and Tools', link: '/resources/starlight/' }], | ||
}, | ||
{ label: 'Demo', link: '/demo/' }, | ||
], | ||
social: { | ||
github: 'https://github.com/HiDeoo/starlight-heading-badges', | ||
}, | ||
title: 'Starlight Heading Badges', | ||
}), | ||
], | ||
site: 'https://starlight-heading-badges.vercel.app', | ||
}) |
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,42 @@ | ||
{ | ||
"name": "starlight-heading-badges-docs", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"description": "Starlight plugin to add badges to your Markdown and MDX headings.", | ||
"author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"build": "astro build", | ||
"preview": "astro preview", | ||
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0" | ||
}, | ||
"dependencies": { | ||
"@astrojs/starlight": "^0.24.5", | ||
"@hideoo/starlight-plugins-docs-components": "^0.2.2", | ||
"astro": "^4.11.2", | ||
"sharp": "^0.33.4", | ||
"starlight-heading-badges": "workspace:*" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"packageManager": "pnpm@9.0.4", | ||
"private": true, | ||
"sideEffects": false, | ||
"keywords": [ | ||
"starlight", | ||
"plugin", | ||
"badges", | ||
"headings", | ||
"documentation", | ||
"astro" | ||
], | ||
"homepage": "https://github.com/HiDeoo/starlight-heading-badges", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/HiDeoo/starlight-heading-badges.git", | ||
"directory": "docs" | ||
}, | ||
"bugs": "https://github.com/HiDeoo/starlight-heading-badges/issues" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,9 @@ | ||
<div><slot /></div> | ||
|
||
<style> | ||
div { | ||
background-color: var(--sl-color-gray-6); | ||
border: 2px dashed var(--sl-color-gray-5); | ||
padding: 1rem; | ||
} | ||
</style> |
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,6 @@ | ||
import { docsSchema } from '@astrojs/starlight/schema' | ||
import { defineCollection } from 'astro:content' | ||
|
||
export const collections = { | ||
docs: defineCollection({ schema: docsSchema() }), | ||
} |
Oops, something went wrong.