Skip to content

Commit

Permalink
Refactor Linutil Docs with mdBook (#8)
Browse files Browse the repository at this point in the history
* Refactor Linutil Docs with mdBook

* Add x task back

* Create .gitmodules

* Add linutil as a submodule

* Refactor Overall Structure

* Fix x-task Dir to Src

* [FAQ] Add unistall `opensuse` & `cargo`

* Fix [FAQ] Dir

* Fix Spell

* Spell Corrected

* Convert xtask To Manual Run

* Add's workflow dispatch
  • Loading branch information
harilvfs authored Jan 13, 2025
1 parent 884c0a0 commit e5a8b09
Show file tree
Hide file tree
Showing 41 changed files with 517 additions and 278 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pages: write # To push to a GitHub Pages site
id-token: write # To update the deployment status
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build Book
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
mdbook build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'book'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
77 changes: 0 additions & 77 deletions .github/workflows/hugo.yml

This file was deleted.

19 changes: 2 additions & 17 deletions .github/workflows/xtask.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
name: XTasks

on:
pull_request:
paths:
- "xtask"
- "Cargo.toml"
- "Cargo.lock"
- ".cargo"
- "core/tabs"
- "docs"
push:
paths:
- "xtask"
- "Cargo.toml"
- "Cargo.lock"
- ".cargo"
- "core/tabs"
- "docs"
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -63,5 +48,5 @@ jobs:
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add /content/userguide.md
git add /src/userguide.md
git commit -m "Commit the user guide" || echo "No changes to commit"
14 changes: 1 addition & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# Temporary lock file while building
/.hugo_build.lock
book
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "themes/relearn"]
path = themes/relearn
url = https://github.com/McShelby/hugo-theme-relearn.git
[submodule "linutil"]
path = linutil
url = https://github.com/ChrisTitusTech/linutil.git
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div align="center">

![Logo](/logo/cttlogo.avif)

### **Official Linutil Documentation**

</div>

[![GitHub Actions Build Status][check]][link]

*For installation and other guides, visit the* [Wiki](https://chris-titus-docs.github.io/linutil-docs/).

<a href="https://chris-titus-docs.github.io/linutil-docs/" target="_blank"><img alt="Wiki" src="https://img.shields.io/badge/WIKI-98c379?style=flat-square" width="50"></a>


[check]: https://github.com/chris-titus-docs/linutil-docs/actions/workflows/deploy.yml/badge.svg
[link]: https://github.com/chris-titus-docs/linutil-docs/actions/workflows/deploy.yml
5 changes: 0 additions & 5 deletions archetypes/default.md

This file was deleted.

36 changes: 36 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[book]
authors = ["Aayush Chalise"]
language = "en"
multilingual = false
src = "src"
title = "Linutil Docs"
description = "Linutil is a distro-agnostic toolbox designed to simplify everyday Linux tasks."

[output.html]
default-theme = "ayu"
preferred-dark-theme = "ayu"
smart-punctuation = true
mathjax-support = true
site-url = "/linutil-docs/"
git-repository-url = "https://github.com/Chris-Titus-Docs/linutil-docs/tree/main/src/"
edit-url-template = "https://github.com/Chris-Titus-Docs/linutil-docs/edit/main/{path}"

[output.html.playground]
editable = true
line-numbers = true

[output.html.code.hidelines]
python = "~"

[output.html.search]
limit-results = 20
use-boolean-and = true
boost-title = 2
boost-hierarchy = 2
boost-paragraph = 1
expand = true
heading-split-level = 2

[output.html.redirect]
"/format/config.html" = "configuration/index.html"

78 changes: 0 additions & 78 deletions content/_index.md

This file was deleted.

8 changes: 0 additions & 8 deletions content/faq.md

This file was deleted.

8 changes: 0 additions & 8 deletions hugo.toml

This file was deleted.

1 change: 0 additions & 1 deletion layouts/partials/favicon.html

This file was deleted.

11 changes: 0 additions & 11 deletions layouts/partials/logo.html

This file was deleted.

Binary file added logo/cttlogo.avif
Binary file not shown.
4 changes: 4 additions & 0 deletions src/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Document not found (404)

This URL is invalid, sorry. Try the search instead!

24 changes: 24 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Summary

[Introduction](./introduction.md)
[Preview](./preview.md)

______________________________________________________________________

[Installation](installation.md)

[Command Line Tool](command.md)

[User Guide](userguide.md)

[Contributing](./collaboration/contribute.md)

[RoadMap](./collaboration/roadmap.md)

[Code of Conduct](./collaboration/coc.md)

[FAQ](faq.md)

-----------

[Contributors](misc/contributors.md)
Binary file added src/assets/code-of-conduct.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/contribute.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/contributors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/cttlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/faq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/guide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/installation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/roadmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/script.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e5a8b09

Please sign in to comment.