Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
YuheiFUJITA committed Apr 16, 2024
1 parent dee6b7d commit 11a293d
Show file tree
Hide file tree
Showing 16 changed files with 615 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
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: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
- uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: bun install # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: bun 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
docs/.vitepress/cache
docs/.vitepress/dist
Binary file added bun.lockb
Binary file not shown.
81 changes: 81 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { defineConfig } from "vitepress";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "GitHub Copilot ハンズオン",
description: "VS Code Conference Japan 2024",
base: "/conf-2024-hands-on-textbook/",
markdown: {
lineNumbers: true,
},
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{
text: "イベントページ",
items: [
{
text: "Webサイト",
link: "https://vscodejp.github.io/conference-2024/",
},
{
text: "connpass カンファレンスページ",
link: "https://vscode.connpass.com/event/308890/",
},
{
text: "connpass ハンズオンページ",
link: "https://vscode.connpass.com/event/313606/",
},
],
},
{
text: "GitHub",
items: [
{
text: "テキスト",
link: "https://github.com/vscodejp/conf-2024-hands-on-textbook",
},
{
text: "ソースコード",
link: "https://github.com/vscodejp/conf-2024-hands-on-codebase",
},
],
},
],

sidebar: [
{
text: "テキスト",
items: [
{
text: "Getting Started",
link: "/getting-started",
},
{
text: "Practice",
link: "/practice",
},
{
text: "スラッシュコマンド",
link: "/command",
},
{
text: "Nuxt3によるブログ作成",
link: "/sample-article",
},
],
},
],

socialLinks: [
{
icon: "discord",
link: "https://discord.gg/p9UMpyEe7P",
},
{
icon: "github",
link: "https://github.com/vscodejp",
},
],
},
});
49 changes: 49 additions & 0 deletions docs/api-examples.md
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 added docs/command.md
Empty file.
90 changes: 90 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Getting Started

## はじめに

また、途中で以下のようなアイコンが表示されることがあります。

::: info

これは補足情報です。不要であれば読み飛ばしてください。

:::

::: tip

これは追加情報や知っておくと便利な情報です。余裕がある方は読んでみてください。

:::

::: warning

これは注意事項です。何か問題が発生した場合、こちらに書かれていることに該当していないか確認してみてください。

:::

## 環境構築

### nodeのインストール

今回、このrepositoryを動かすためにはnode.jsが必要です。以下のリンクからインストールしてください。

<https://nodejs.org/en/download>

インストールが完了したら、以下のコマンドでバージョンを確認してください。

```bash
node -v
```

```bash
npm -v
```

以下のように表示されればインストール成功です。

```bash
$ node -v
v18.12.1
$ npm -v
9.6.2
```

::: warning

今回、nodeのバージョンは18以上を前提としています。古いバージョンを利用している場合、動作しない可能性があります。

:::

### clone

以下のrepositoryをcloneしてください。

```bash
git clone https://github.com/vscodejp/conf-2024-hands-on-codebase.git
```

### VS Codeの起動

cloneしたrepositoryをVS Codeで開いてください。

::: tip

`code` コマンドを使うと、ターミナルからVS Codeを起動できます。

```bash
code path/to/conf-2024-hands-on-codebase
```

:::

### VS Codeの拡張機能をインストール

![alt text](/images/install-recommended-extension.png)

::: details 表示されない場合

もし表示されない場合は、`@recommended`で拡張機能を検索してください。

![alt text](/images/search-recommended-extension.png)

:::
25 changes: 25 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home

hero:
name: "GitHub Copilot ハンズオン"
text: "VS Code Conference Japan 2024"
tagline: tab enter tab enter tab enter ...
actions:
- theme: brand
text: Getting Started
link: /getting-started
- theme: alt
text: Discordへ
link: https://discord.gg/p9UMpyEe7P

features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature B
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature C
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
---

Loading

0 comments on commit 11a293d

Please sign in to comment.