Project structure
This commit is contained in:
commit
29a670ca22
|
@ -0,0 +1,24 @@
|
|||
name: github pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build book
|
||||
run: |
|
||||
curl -LSfs https://japaric.github.io/trust/install.sh | sh -s -- --git rust-lang/mdBook
|
||||
curl -LSfs https://japaric.github.io/trust/install.sh | sh -s -- --git badboy/mdbook-toc
|
||||
PATH=.cargo/bin:$PATH mdbook build
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./book
|
|
@ -0,0 +1 @@
|
|||
book
|
|
@ -0,0 +1,21 @@
|
|||
# Introduction
|
||||
|
||||
[Online version](https://status-im.github.io/nim-style-guide/)
|
||||
|
||||
An ever evolving collection of conventions, idioms and tricks that reflects the experience of developing a production-grade application in [Nim](https://nim-lang.org) with a small team of developers.
|
||||
|
||||
## Build and publish
|
||||
|
||||
The style guide is built using [mdBook](https://github.com/rust-lang/mdBook), and published to gh-pages using a github action.
|
||||
|
||||
```bash
|
||||
# Install tooling
|
||||
cargo install mdbook mdbook-toc
|
||||
|
||||
# Edit book and view through local browser
|
||||
mdbook serve
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
We welcome contributions to the style guide as long as they match the strict security requirements Status places on Nim code. As with any style guide, some of it comes down to taste and we might reject them based on consistency or whim.
|
|
@ -0,0 +1,11 @@
|
|||
[book]
|
||||
authors = ["Jacek Sieka"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
title = "The Status Nim style guide"
|
||||
|
||||
[preprocessor.toc]
|
||||
command = "mdbook-toc"
|
||||
renderer = ["html"]
|
||||
max-level = 2
|
|
@ -0,0 +1,8 @@
|
|||
# Summary
|
||||
|
||||
- [Introduction](01_introduction.md)
|
||||
- [Formatting](02_formatting.md)
|
||||
- [Language](03_language.md)
|
||||
- [Error handling](04_errors.md)
|
||||
- [Libraries](05_libraries.md)
|
||||
- [Tooling](06_tooling.md)
|
Loading…
Reference in New Issue