-
Notifications
You must be signed in to change notification settings - Fork 6
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 marpple/init-docs
docs: init rune docs
- Loading branch information
Showing
15 changed files
with
2,179 additions
and
839 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,62 @@ | ||
# Sample workflow for building and deploying a VitePress site to GitHub Pages | ||
# | ||
name: Deploy Docs to Pages | ||
|
||
on: | ||
# push: | ||
# branches: [ main ] | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Not needed if lastUpdated is not enabled | ||
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun | ||
- uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm | ||
with: | ||
version: 8 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build with VitePress | ||
run: pnpm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/.vitepress/dist | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,2 @@ | ||
.vitepress/dist | ||
.vitepress/cache |
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,38 @@ | ||
import { defineConfig } from 'vitepress' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "Rune", | ||
description: "Hello, Rune!", | ||
base: '/rune/', | ||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
sidebar: [ | ||
{ | ||
text: 'Introduction', | ||
items: [ | ||
{ text: 'What is Rune?', link: '/guide/what-is-rune' }, | ||
{ text: 'Getting Started', link: '/guide/getting-started' }, | ||
] | ||
}, | ||
{ | ||
text: 'Tutorial', | ||
items: [ | ||
{ text: 'View', link: '/tutorial/view' }, | ||
{ text: 'View 추상화하기', link: '/tutorial/view-abstract' }, | ||
{ text: 'Enable', link: '/tutorial/enable' }, | ||
{ text: 'Markdown Examples', link: 'guide/markdown-examples' }, | ||
] | ||
}, | ||
{ | ||
text: 'API Reference', | ||
items: [ | ||
{ text: 'API name', link: '/api/examples' }, | ||
] | ||
} | ||
], | ||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/marpple/rune' } | ||
] | ||
} | ||
}) |
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,49 @@ | ||
--- | ||
outline: deep | ||
--- | ||
|
||
# Runtime API Examples | ||
|
||
This page demonstrates usage of some of the runtime APIs provided by VitePress. | ||
|
||
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: | ||
|
||
```md | ||
<script setup> | ||
import { useData } from 'vitepress' | ||
|
||
const { theme, page, frontmatter } = useData() | ||
</script> | ||
|
||
## Results | ||
|
||
### Theme Data | ||
<pre>{{ theme }}</pre> | ||
|
||
### Page Data | ||
<pre>{{ page }}</pre> | ||
|
||
### Page Frontmatter | ||
<pre>{{ frontmatter }}</pre> | ||
``` | ||
|
||
<script setup> | ||
import { useData } from 'vitepress' | ||
|
||
const { site, theme, page, frontmatter } = useData() | ||
</script> | ||
|
||
## Results | ||
|
||
### Theme Data | ||
<pre>{{ theme }}</pre> | ||
|
||
### Page Data | ||
<pre>{{ page }}</pre> | ||
|
||
### Page Frontmatter | ||
<pre>{{ frontmatter }}</pre> | ||
|
||
## More | ||
|
||
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). |
Empty file.
Oops, something went wrong.