Skip to content

Commit

Permalink
doc: add a documentation template (#25)
Browse files Browse the repository at this point in the history
* Add the Zola website
* Add documentation commands in Makefile
  • Loading branch information
arttet authored Sep 17, 2024
1 parent 55b1724 commit ffe8b43
Show file tree
Hide file tree
Showing 265 changed files with 83,375 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy GitHub Pages

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

env:
ZOLA_VERSION: 0.19.2
DOC_DIR: doc

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Setup Zola
run: curl -s -L https://github.com/getzola/zola/releases/download/v${{ env.ZOLA_VERSION }}/zola-v${{ env.ZOLA_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | sudo tar xvzf - -C /usr/local/bin
shell: bash

- name: Build GitHub Pages
run: zola --root ${{ env.DOC_DIR }} build

- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
path: ./${{ env.DOC_DIR }}/public

deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .github/workflows/rust-compiler-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
paths-ignore:
- '**/README.md'
- '**/LICENSE'
- '**/doc/**'
schedule:
# https://crontab.guru/
# At 12:00 AM
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUST_INSTALL_DIR ?= install
RUST_DIST_FORMATS ?= xz
RUST_USE_LLD ?= false

## ▸▸▸ Auxiliary commands ◂◂◂
.PHONY: help
help: ## Show this help
@fgrep -h "## " $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/## //'
Expand All @@ -18,6 +19,7 @@ clean: ## Remove download artifacts
rm -rf rust

# Note: use Makefile.local for customization
-include misc/make/doc.Makefile
-include misc/make/offline.Makefile
-include Makefile.local

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@ Builds the *Rust* compiler and [Tier 3 targets](https://doc.rust-lang.org/nightl

```sh
$ make
▸▸▸ Auxiliary commands ◂◂◂
help: Show this help
clean: Remove download artifacts
clean: Remove downloaded artifacts
▸▸▸ Download commands ◂◂◂
download: Download Rust sources
▸▸▸ Configure commands ◂◂◂
configure: Configure Rust
configure-with-llvm: Configure Rust and LLVM
▸▸▸ Target Info commands ◂◂◂
show-target-info: Show target info
▸▸▸ Documentation commands ◂◂◂
doc-build: Build the documentation site [env: DOC_DIR=]
doc-serve: Serve the documentation site [env: DOC_PORT=]
doc-clean: Remove generated artifacts [env: DOC_DIR=]
▸▸▸ Offline commands ◂◂◂
offline: Download prebuilt Rust binaries and cache them for offline use
```
Expand Down
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public
42 changes: 42 additions & 0 deletions doc/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# The URL the site will be built for
base_url = "https://arttet.github.io/rust-compiler-builder/"
title = "Rust Compiler Builder"
description = "Documentation of Rust Compiler Builder"

# The site theme to use.
theme = "adidoks"

# The default language; used in feeds and search index
default_language = "en"

# Whether to automatically compile all Sass files in the sass directory
compile_sass = true

# When set to "true", the generated HTML files are minified.
minify_html = true

# Whether to build a search index to be used later on by a JavaScript library
build_search_index = false

[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true

[extra]
title_addition = "Documentation of Rust Compiler Builder"
timezone = "Asia/Dubai"

[extra.open]
enable = false
image = "static/icons/favicon.png"

[[extra.menu.social]]
name = "GitHub"
pre = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>'
url = "https://github.com/arttet/rust-compiler-builder"
post = "v0.1.0"
weight = 20

[extra.footer]
info = '© 2024 <a href="https://github.com/arttet">Artyom Tetyukhin</a>'
33 changes: 33 additions & 0 deletions doc/content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
+++
title = "Rust Compiler Builder"


# The homepage contents
[extra]
lead = '<b>Rust Compiler Builder</b> is a configuration tool to build the <a href="https://github.com/rust-lang/rust">Rust compiler</a> and tier 3 <a href="https://doc.rust-lang.org/nightly/rustc/platform-support.html">Rust targets</a>.'
url = "/docs/getting-started/introduction/"
url_button = "Get started"
repo_version = ""
repo_license = "MIT License"
repo_url = "https://github.com/arttet/rust-compiler-builder"

# Menu items
[[extra.menu.main]]
name = "Documentation"
section = "docs"
url = "/docs/getting-started/introduction/"
weight = 10

[[extra.list]]
title = "Integrated with GitHub CI/CD"
content = 'Easily add your tier 3 <a href="https://doc.rust-lang.org/nightly/rustc/platform-support.html">Rust targets</a> to your CI/CD pipeline and build them whenever you want.'

[[extra.list]]
title = "Customizable ⚡️"
content = 'Easily customizable environment for building the <a href="https://github.com/rust-lang/rust">Rust compiler</a> with <a href="https://github.com/rust-lang/llvm-project">LLVM</a> from different channels.'

[[extra.list]]
title = "Offline Mode"
content = 'Easily prepare the <a href="https://github.com/rust-lang/rust">Rust compiler</a> for offline mode without needing constant access to the Internet.'

+++
6 changes: 6 additions & 0 deletions doc/content/docs/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
+++
title = "Documentation"
sort_by = "weight"
weight = 1
template = "docs/section.html"
+++
7 changes: 7 additions & 0 deletions doc/content/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
+++
title = "Getting Started"
template = "docs/section.html"
sort_by = "weight"
weight = 1
draft = false
+++
22 changes: 22 additions & 0 deletions doc/content/docs/getting-started/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
+++
title = "Introduction"
draft = false
weight = 10
sort_by = "weight"
template = "docs/page.html"

[extra]
lead = ''
toc = true
top = false
+++

## Quick Start

### Documentation in Progress

Thank you for visiting this website. Please note that the documentation is currently under development. I am actively working on providing comprehensive and detailed information about the configuration files and scripts included in this repository.

In the meantime, feel free to explore the repository and reach out if you have any questions. Your patience and understanding are greatly appreciated.

Stay tuned for updates!
Empty file.
22 changes: 22 additions & 0 deletions doc/themes/adidoks/sass/bootstrap/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2011-2021 Twitter, Inc.
Copyright (c) 2011-2021 The Bootstrap Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit ffe8b43

Please sign in to comment.