1
0
Fork 0
forked from mirror/grapevine

set up mdbook

This adds some new tools in CI for lint the book and also sets up
automated deployment to GitLab Pages. Also adds a readme that suggests
reading the book, since that's where all the information will be.
This commit is contained in:
Charles Hall 2024-06-09 12:52:45 -07:00
parent e318dfcb3d
commit 9a5e552ca0
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
10 changed files with 68 additions and 0 deletions

3
.gitignore vendored
View file

@ -12,3 +12,6 @@ result*
# GitLab CI cache # GitLab CI cache
/.gitlab-ci.d /.gitlab-ci.d
# mdbook artifacts
/public

View file

@ -1,6 +1,7 @@
stages: stages:
- ci - ci
- artifacts - artifacts
- deploy
variables: variables:
# Makes some things print in color # Makes some things print in color
@ -48,3 +49,14 @@ artifacts:
image: nixos/nix:2.18.2 image: nixos/nix:2.18.2
script: script:
- ./bin/nix-build-and-cache packages - ./bin/nix-build-and-cache packages
pages:
stage: deploy
image: nixos/nix:2.18.2
script:
- direnv exec . mdbook build
artifacts:
paths:
- public
only:
- main

1
.lycheeignore Symbolic link
View file

@ -0,0 +1 @@
.gitignore

1
.markdownlintignore Symbolic link
View file

@ -0,0 +1 @@
.gitignore

9
README.md Normal file
View file

@ -0,0 +1,9 @@
# Grapevine
A Matrix homeserver.
## Read the book
[Click here to read the latest version.][0]
[0]: https://matrix.pages.gitlab.computer.surgery/grapevine-fork/

12
book.toml Normal file
View file

@ -0,0 +1,12 @@
[book]
title = "Grapevine"
language = "en"
multilingual = false
src = "book"
[build]
build-dir = "public"
[output.html]
git-repository-icon = "fa-git-square"
git-repository-url = "https://gitlab.computer.surgery/matrix/grapevine-fork"

3
book/SUMMARY.md Normal file
View file

@ -0,0 +1,3 @@
# Summary
* [Introduction](./introduction.md)

1
book/introduction.md Normal file
View file

@ -0,0 +1 @@
# Introduction

View file

@ -30,6 +30,26 @@ name = "cargo-clippy"
group = "versions" group = "versions"
script = "cargo clippy -- --version" script = "cargo clippy -- --version"
[[task]]
name = "lychee"
group = "versions"
script = "lychee --version"
[[task]]
name = "markdownlint"
group = "versions"
script = "markdownlint --version"
[[task]]
name = "lychee"
group = "lints"
script = "lychee --offline ."
[[task]]
name = "markdownlint"
group = "lints"
script = "markdownlint ."
[[task]] [[task]]
name = "cargo-fmt" name = "cargo-fmt"
group = "lints" group = "lints"

View file

@ -3,6 +3,9 @@
, engage , engage
, inputs , inputs
, jq , jq
, lychee
, markdownlint-cli
, mdbook
, mkShell , mkShell
, system , system
, toolchain , toolchain
@ -27,6 +30,9 @@ mkShell {
# Keep sorted # Keep sorted
engage engage
jq jq
lychee
markdownlint-cli
mdbook
toolchain toolchain
] ]
++ ++