Project structure

This commit is contained in:
Jacek Sieka 2021-02-08 11:46:36 +01:00
commit 29a670ca22
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
5 changed files with 65 additions and 0 deletions

24
.github/workflows/gh-pages.yml vendored Normal file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
book

21
README.md Normal file
View File

@ -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.

11
book.toml Normal file
View File

@ -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

8
src/SUMMARY.md Normal file
View File

@ -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)