Skip to content

Commit

Permalink
Switch to Vitepress
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Sep 2, 2024
1 parent 305d217 commit 46cab59
Show file tree
Hide file tree
Showing 43 changed files with 112 additions and 1,994 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ Gemfile.lock
.rubocop-*
.covered.db
.DS_Store

.vitepress/dist
.vitepress/cache
26 changes: 0 additions & 26 deletions .rubocop.yml

This file was deleted.

1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

23 changes: 23 additions & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { defineConfig } from "vitepress";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Phlex",
description: "Ruby views",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Home", link: "/" },
{ text: "Guide", link: "/guide/rails" },
],

sidebar: [
{
text: "Guide",
items: [{ text: "Rails", link: "/guide/rails" }],
},
],

socialLinks: [{ icon: "github", link: "https://github.com/phlex-ruby" }],
},
});
84 changes: 0 additions & 84 deletions CODE_OF_CONDUCT.md

This file was deleted.

12 changes: 0 additions & 12 deletions CONTRIBUTING.md

This file was deleted.

17 changes: 0 additions & 17 deletions Gemfile

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE.txt

This file was deleted.

2 changes: 0 additions & 2 deletions Procfile.dev

This file was deleted.

9 changes: 0 additions & 9 deletions README.md

This file was deleted.

49 changes: 49 additions & 0 deletions 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).
Loading

0 comments on commit 46cab59

Please sign in to comment.