Skip to content

Commit

Permalink
Migrate to MkDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Nov 14, 2023
1 parent 92a3d31 commit 33b805f
Show file tree
Hide file tree
Showing 76 changed files with 610 additions and 345 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: GitHub Pages

on:
push:
branches:
- master
paths:
- docs/**
- mkdocs.yml
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: 'true'
- uses: actions/checkout@v4
with:
fetch-depth: 0 # for the 'Last updated' timestamp
- name: Install requirements
run: pip install -r requirements.txt
- name: Build and deploy site
run: mkdocs gh-deploy --no-history
30 changes: 0 additions & 30 deletions .github/workflows/gitbook.yml

This file was deleted.

12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# .gitignore
## Files we want to have locally, but do not want to push to remote

## Editor swap files
*~
*.swp
*.orig

## gitbook
/_book/
## CMake build system
**/build*/

## gitbook install
/node_modules/

## gitbook-summary
##/SUMMARY.md
## MkDocs
/site/
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![roboticslab-uc3m logo](assets/roboticslab-banner-350px.png)](https://github.com/roboticslab-uc3m)
[![roboticslab-uc3m logo](docs/assets/roboticslab-banner-350px.png)](https://github.com/roboticslab-uc3m)

# Installation Guides

Expand All @@ -7,28 +7,31 @@ Installation Guides @ [roboticslab-uc3m](https://github.com/roboticslab-uc3m)
Currently hosted at https://robots.uc3m.es/installation-guides/

## If you have any doubts or comments

Please read the Developer Manual's [Asking Questions](https://robots.uc3m.es/developer-manual/asking-questions.html) section, and once you've succeded with its [self-evaluation](https://robots.uc3m.es/developer-manual/asking-questions.html#self-evaluation-time) follow the recommendations by commenting publicly [HERE](https://github.com/roboticslab-uc3m/installation-guides/issues/new) if required

## How-To's

* [How to serve on localhost](#how-to-serve-on-localhost)
* [How to upload changes to GitHub](#how-to-upload-changes-to-github)

### How to serve on localhost
It is useful to serve on `localhost` to modify the website and see changes locally.

**Note**: This specific repository is different, it uses a `SUMMARY.md` that is auto-generated via [scripts/admin/update-gitbook.sh](scripts/admin/update-gitbook.sh). For general guides refer to [install-gitbook](install-gitbook.md#to-be-able-to-serve-via-gitbook-legacy).

1. Make sure you have installed [gitbook-summary](install-gitbook.md#gitbook-summary).
It is useful to serve on `localhost` to modify the website and see changes locally.

1. To serve, from the root of the project, run: [./scripts/admin/gitbook-local-serve.sh](scripts/admin/gitbook-local-serve.sh)
1. From the root of the project, run the following command:

1. You can now browse the site at the default location: http://127.0.0.1:4000
```bash
pip install -r requirements.txt
mkdocs serve
```

1. To clean, (recover `.gitignore` to its previous state, remove generated `SUMMARY.md`), run: [./scripts/admin/gitbook-local-clean.sh](scripts/admin/gitbook-local-clean.sh)
1. You can now browse the site at the default location: <http://127.0.0.1:8000>

### How to upload changes to GitHub
This project is managed as any project on [GitHub](https://www.github.com). You may use [Git](https://git-scm.com) or even the GitHub web interface, both on which you can find many tutorials online. The following points are specific to the [Gitbook (legacy)](https://github.com/asrob-uc3m/actas/issues/148#issuecomment-449748350) mechanism used:

1. Please **do not upload** the `_book/` folder. It is auto-generated locally, and the same should happen on the Gitbook (legacy) servers. For this repository, **do not upload** the `SUMMARY.md` file.
This project is managed as any project on [GitHub](https://www.github.com). You may use [Git](https://git-scm.com) or even the GitHub web interface, both on which you can find many tutorials online. The following points are specific to the MkDocs mechanism used:

1. Please **do not upload** the `site/` folder. It is auto-generated locally, and the same should happen on the MkDocs servers.

2. It is safe to `git push` to any upstream branch, just remember that what is on `master` is what will be actually rendered as the website.
1. It is safe to `git push` to any upstream branch, just remember that what is on `master` is what will be actually rendered as the website.
62 changes: 0 additions & 62 deletions SUMMARY.md

This file was deleted.

14 changes: 0 additions & 14 deletions book.json

This file was deleted.

2 changes: 1 addition & 1 deletion _installation-guides.md → docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ The content of this documentation is generated from files hosted at: <https://gi

## If you have any doubts or comments

Please read the Developer Manual's [Asking Questions](https://robots.uc3m.es/developer-manual/asking-questions.html) section, and once you've succeded with its [self-evaluation](https://robots.uc3m.es/developer-manual/asking-questions.html#self-evaluation-time) follow the recommendations by commenting publicly [HERE](https://github.com/roboticslab-uc3m/installation-guides/issues/new) if required
Please read the Developer Manual's [Asking Questions](https://robots.uc3m.es/developer-manual/asking-questions.html) section, and once you've succeded with its [self-evaluation](https://robots.uc3m.es/developer-manual/asking-questions.html#self-evaluation-time) follow the recommendations by commenting publicly [HERE](https://github.com/roboticslab-uc3m/installation-guides/issues/new) if required.
Binary file added docs/assets/favicon.ico
Binary file not shown.
File renamed without changes
Loading

0 comments on commit 33b805f

Please sign in to comment.