Skip to content

Commit

Permalink
Merge pull request #9 from pulsate-dev/migration-nextra-to-starlight
Browse files Browse the repository at this point in the history
chore: Migration Nextra to Starlight
  • Loading branch information
m1sk9 committed Aug 19, 2024
2 parents e2d078f + 4c51749 commit 9769298
Show file tree
Hide file tree
Showing 68 changed files with 3,768 additions and 3,546 deletions.
171 changes: 12 additions & 159 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,168 +1,21 @@
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# build output
dist/
# generated types
.astro/

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### NextJS template
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem
node_modules/

# debug
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local
pnpm-debug.log*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
5 changes: 2 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"recommendations": [
"biomejs.biome"
]
"recommendations": ["astro-build.astro-vscode", "biomejs.biome"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
29 changes: 6 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
# Pulsate Docs
# Pulsate Documentation

Website for the Pulsate project. Build with [Nextra](https://nextra.site).
次世代の分散型ソーシャルネットワーキング "Pulsate" のドキュメント.

This site lives at [docs.pulsate.dev](https://docspulsate.dev).
Starlight を使って静的サイトを生成しています. ローカルでサイトをテストする際は `pnpm run dev`, ビルドする際は `pnpm run build` を実行してください.

## Contributing

### Getting Started

The website is built with [Nextra](https://nextra.site). To get started, clone the repository and run the following commands:

```sh
pnpm install
pnpm dev
```

### Resources
現在このドキュメントは [https://docs.pulsate.dev](https://docs.pulsate.dev) で公開されています.

- [Nextra Documentation](https://nextra.site)

### License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

#### Font: LINE Seed JP
## Contributing

The font used in this project is [LINE Seed JP](https://seed.line.me/). It is licensed under the [SIL Open Font License](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL).
貢献方法についてのガイドは [CONTRIBUTING.md](./CONTRIBUTING.md) を参照してください.
56 changes: 56 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

import react from "@astrojs/react";
import starlightOpenAPIPlugin, {openAPISidebarGroups} from "starlight-openapi";

// https://astro.build/config
export default defineConfig({
integrations: [starlight({
title: 'Pulsate Docs',
description: 'Documentation for Pulsate',
lastUpdated: true,
pagination: false,
favicon: './src/assets/logo.png',
locales: {
root: {
label: '日本語',
lang: 'ja'
},
en: {
label: 'English'
}
},
logo: {
src: './src/assets/logo.png'
},
editLink: {
baseUrl: 'https://github.com/pulsate-dev/docs/edit/main/'
},
social: {
discord: 'https://link.pulsate.dev/discord',
github: 'https://github.com/withastro/starlight',
twitter: 'https://link.pulsate.dev/x',
youtube: 'https://link.pulsate.dev/youtube'
},
plugins: [
starlightOpenAPIPlugin([
{
base: 'api-reference',
label: 'API Reference',
schema: 'https://raw.githubusercontent.com/pulsate-dev/pulsate/main/resources/schema.json'
},
]),
],
sidebar: [
{
label: 'リリースノート',
translations: {
en: 'Release Note'
},
link: '/release-note'
},
...openAPISidebarGroups
]
}), react()]
});
7 changes: 4 additions & 3 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
// general
"files": {
"ignore": [".next/**"],
"include": ["pages/**", "components/**", "next.config.js"]
"ignore": [".astro/**"],
"include": ["*.ts", "*.tsx"]
},

// formatter
Expand All @@ -27,7 +27,8 @@
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto"
}
},
"globals": ["Astro"]
},
"organizeImports": {
"enabled": true
Expand Down
30 changes: 0 additions & 30 deletions components/atoms/ScalarAPIReference.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions components/molecules/NoTransCallout.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions components/molecules/TipCallout.tsx

This file was deleted.

Loading

0 comments on commit 9769298

Please sign in to comment.