Skip to content

Commit

Permalink
doc(book): use Vuepress for the book
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaka91 committed Dec 31, 2023
1 parent 76a8649 commit 9a0b0d9
Show file tree
Hide file tree
Showing 122 changed files with 518 additions and 898 deletions.
2 changes: 2 additions & 0 deletions book/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.kt]
ktlint_standard_filename = disabled
5 changes: 3 additions & 2 deletions book/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/book
/theme
/.vitepress/cache
/.vitepress/dist
/node_modules
126 changes: 126 additions & 0 deletions book/.vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
import { defineConfig } from "vitepress";
import stefGrammar from "../../vscode-extension/syntaxes/stef.tmLanguage.json";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Stef",
description: "Strongly Typed Encoding Format",
srcDir: "src",
base: "/stef",
markdown: {
theme: {
dark: "one-dark-pro",
light: "min-light",
},
languages: [
{
...stefGrammar,
name: "stef",
},
],
lineNumbers: true,
},
vite: {
resolve: {
preserveSymlinks: true,
},
},
head: [["link", { rel: "icon", type: "image/svg+xml", href: "/logo.svg" }]],
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: "/logo.svg",
editLink: {
pattern: "https://github.com/dnaka91/stef/edit/main/book/src/:path",
},
nav: [
{ text: "Guide", link: "/guide/", activeMatch: "/guide/" },
{ text: "Reference", link: "/reference/", activeMatch: "/reference/" },
],

sidebar: [
{ text: "Introduction", link: "/introduction" },
{ text: "Ideas", link: "/ideas" },
{
text: "User Guide",
items: [
{ text: "Installation", link: "/guide/installation" },
{ text: "Creating schemas", link: "/guide/creating" },
{ text: "Generating code", link: "/guide/generating" },
{ text: "Examples", link: "/guide/examples" },
],
},
{
text: "Reference",
items: [
{
text: "Command Line Interface",
link: "/reference/cli/",
items: [
{ text: "stef lint", link: "/reference/cli/lint" },
{ text: "stef check", link: "/reference/cli/check" },
{ text: "stef format", link: "/reference/cli/format" },
],
},
{
text: "Schema",
link: "/reference/schema/",
items: [
{ text: "Structs", link: "/reference/schema/structs" },
{ text: "Enums", link: "/reference/schema/enums" },
{ text: "Arrays", link: "/reference/schema/arrays" },
{ text: "Tuples", link: "/reference/schema/tuples" },
{ text: "Constants", link: "/reference/schema/constants" },
{ text: "Statics", link: "/reference/schema/statics" },
{ text: "Type Aliases", link: "/reference/schema/type-aliases" },
{ text: "Modules", link: "/reference/schema/modules" },
{ text: "Imports", link: "/reference/schema/imports" },
{ text: "References", link: "/reference/schema/references" },
{ text: "Attributes", link: "/reference/schema/attributes" },
],
},
{
text: "Wire Format",
link: "/reference/wire-format",
},
{
text: "Compiler",
link: "/reference/compiler",
},
{
text: "Generators",
link: "/reference/generators/",
items: [
{ text: "Rust", link: "/reference/generators/rust" },
{ text: "Go", link: "/reference/generators/go" },
],
},
],
},
{
text: "Miscellaneous",
items: [
{ text: "Team", link: "/misc/team" },
{ text: "License", link: "/misc/license" },
],
},
],

outline: "deep",

socialLinks: [{ icon: "github", link: "https://github.com/dnaka91/stef" }],

footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2023-present Dominik Nakamura",
},

docFooter: {
prev: false,
next: false,
},

search: {
provider: "local",
},
},
});
6 changes: 3 additions & 3 deletions book/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ format:
gofmt -w {{files}}

@format-kotlin +files:
ktlint -F --disabled_rules=filename {{files}}
ktlint -F {{files}}

@format-typescript +files:
prettier --log-level warn -w {{files}}
Expand All @@ -61,7 +61,7 @@ format:
black -q {{files}}

dev:
mdbook serve
bun run dev

build:
mdbook build
bun run build
File renamed without changes.
17 changes: 0 additions & 17 deletions book/book.toml

This file was deleted.

1 change: 0 additions & 1 deletion book/highlight/.gitignore

This file was deleted.

17 changes: 0 additions & 17 deletions book/highlight/package.json

This file was deleted.

80 changes: 0 additions & 80 deletions book/highlight/src/ayu-highlight.css

This file was deleted.

3 changes: 0 additions & 3 deletions book/highlight/src/css/overrides.css

This file was deleted.

84 changes: 0 additions & 84 deletions book/highlight/src/highlight.css

This file was deleted.

28 changes: 0 additions & 28 deletions book/highlight/src/highlight.ts

This file was deleted.

Loading

0 comments on commit 9a0b0d9

Please sign in to comment.