Skip to content

Commit

Permalink
Convert old docs to the new FTC docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jm-Taylor committed Nov 10, 2022
1 parent b041933 commit 2565e22
Show file tree
Hide file tree
Showing 420 changed files with 2,894 additions and 5,449 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
5 changes: 5 additions & 0 deletions .gitignore
@@ -0,0 +1,5 @@
# Build Folder
build/
.vscode/
other/

395 changes: 395 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Makefile
Expand Up @@ -8,12 +8,19 @@ SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

AUTOBUILD = sphinx-AUTOBUILD
HTMLBUILDDIR = build/html

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

autobuild:
@$(AUTOBUILD) $(SOURCEDIR) $(HTMLBUILDDIR)
.PHONY: help autobuild Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
42 changes: 19 additions & 23 deletions README.md
@@ -1,31 +1,27 @@
![Documentation Status](https://readthedocs.org/projects/studica-docs/badge/?version=latest)
# studica-docs
[![CC BY 4.0][cc-by-shield]][cc-by]

The Studica Documentation is available in these domains:
- https://docs.studica.com/en/latest
- https://studica-docs.readthedocs.io/en/latest
[cc-by]: http://creativecommons.org/licenses/by/4.0/
[cc-by-shield]: https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg

After pushing an update to the repo the readthedocs plugin will build the project and publish. Note it it may take up to 10 min before the changes are shown!
# Studica Docs
SR FTC Docs

## Building Locally

It is recommended to run the changes made locally before pushing to here for an update. To run the documentation locally python 3.7+ is required. Python 3.7+ can be downloaded [here](https://www.python.org/downloads/).
Local Build Instructions
========================

After python is downloaded run the following commands in command prompt.
Follow the instructions below to build the docs locally.

- ``pip install "Sphinx==3.03"``
- ``pip install sphinx-tabs``
- ``pip install sphinx-rtd-theme``
- ``pip install sphinx-notfound-page``
Requirements
------------
* [Python 3.9](https://www.python.org/downloads/)

Once Python is installed run the following command
`pip install -r source/requirements.txt`

Clone the repo using git into your local system. To build the docs open command prompt and navigate to the folder where the Makefile is located. In that folder run ``make html``. This will show a display of the compilation and if completed without errors there will be a new folder called build. To open the local version of the docs, open the index.html file located inside build/html/
Building
--------

**Note** you need to run ``make html`` every time you make a change.

If you get a **app.add_javascript() is deprecated** error follow these steps:

1. Locate the tabs.py folder. Example path ``C:\python\lib\site-packages\sphinx_tabs\``
2. Open tabs.py using a text editor.
3. Navigate to line 341 or search for ``app.add_javascript(path)``
4. Replace ``app.add_javascript(path)`` with ``app.add_js_file(path)``
5. Save and close.
Auto builder is the best solution to building the docs.
Run `make autobuild` in the root project folder.
This will create a live server at `http://127.0.0.1:8000` or `localhost:8000`
9 changes: 8 additions & 1 deletion make.bat
Expand Up @@ -9,8 +9,11 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=source
set BUILDDIR=build
set AUTOBUILD=sphinx-autobuild
set HTMLBUILDDIR=build/html

if "%1" == "" goto help
if "%1" == "help" goto help
if "%1" == "autobuild" goto autobuild

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
Expand All @@ -31,5 +34,9 @@ goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:autobuild
@%AUTOBUILD% %SOURCEDIR% %HTMLBUILDDIR%
goto :EOF

:end
popd
12 changes: 10 additions & 2 deletions readthedocs.yml
@@ -1,6 +1,14 @@
requirements_file: source/requirements.txt
version: 2

sphinx:
builder: html
configuration: source/conf.py
fail_on_warning: true
fail_on_warning: true

formats:
- pdf

python:
version: 3.8
install:
- requirements: source/requirements.txt
12 changes: 9 additions & 3 deletions source/_static/css/studica-rtd.css
Expand Up @@ -28,17 +28,23 @@
/* set color of left side bar */
.wy-nav-side,.wy-side-nav-search,.wy-nav-top {
/*background: #0079c1; /*005eb8 */
background: #005eb8;
background: #231F20;
}

/* Change caption color to be more legible */
.wy-menu > .caption > span.caption-text {
color: #F7E341;
color: #F57E25;
}

/* Change the version color to match caption color */
.wy-side-nav-search>div.version {
color: #F7E341;
color: #F57E25;
}

/* Card header color */
.sd-card-header {
color: #F57E25 !important;
background-color: #231F20 !important;
}

/* Get rid of that ugly yellow highlight color and replace with something more appealing to the eye */
Expand Down
Binary file modified source/assets/Studica_Favicon.ico
Binary file not shown.
Binary file modified source/assets/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed source/assets/studicaLogo.jpg
Binary file not shown.
11 changes: 7 additions & 4 deletions source/conf.py
Expand Up @@ -18,9 +18,9 @@

# -- Project information -----------------------------------------------------

project = 'Studica Robotics'
copyright = '2020, Studica'
author = 'Studica'
project = 'Studica FTC Docs'
copyright = '2022, Studica LTD and FIRST® Canada'
author = 'Studica and FIRST® Canada'

# The full version, including alpha/beta/rc tags
release = '0.0.1'
Expand All @@ -34,7 +34,9 @@
extensions = [
'sphinx_tabs.tabs',
'sphinx_rtd_theme',
'notfound.extension'
'notfound.extension',
'sphinx_design',
'sphinx-prompt'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -74,6 +76,7 @@
'titles_only': True
}


from sphinx.builders.html import StandaloneHTMLBuilder
StandaloneHTMLBuilder.supported_image_types = [
'image/gif',
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2565e22

Please sign in to comment.