Skip to content

feat(docs): Add Furo50 Sphinx theme extension (CS50 Jekyll-style replication) #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli50.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `cli50`
# cli50

`cli50` is a command-line tool via which you can (easily!) mount a directory within a container running [`cs50/cli`](cs50/cli), a Docker image based on Ubuntu 22.04, a popular distribution of Linux. We use `cli50` to work on CS50's own apps in a standard, contained environment, without having to install apps' dependencies on our own Macs and PCs. It provides a command-line environment similar, but not quite identical to, a terminal window in [Visual Studio Code for CS50](cs50.dev). It also supports Docker outside of Docker (DooD).

Expand Down
19 changes: 10 additions & 9 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
"sphinx_markdown_tables",
"sphinx_tabs.tabs",
"sphinxcontrib.httpdomain",
"sphinxext.opengraph"
"sphinxext.opengraph",
"furo50",
]

html_css_files = [
"/_static/custom.css?" + str(round(time.time())),
"https://use.fontawesome.com/releases/v5.13.0/css/all.css"
"custom.css",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The theme automatically adds the cache versioning so we no longer have to do it manually.
image
image

"https://use.fontawesome.com/releases/v5.13.0/css/all.css",
]
html_js_files = ["/_static/custom.js?" + str(round(time.time()))]
html_js_files = ["custom.js"]
html_static_path = ["_static"]
html_theme = "sphinx_rtd_theme"
html_theme = "furo"
html_title = "CS50 Docs"
html_permalinks_icon = "#"
html_theme_options = {
"display_version": False,
"prev_next_buttons_location": False,
"sticky_navigation": False
}
html_title = "CS50 Docs"
html_show_copyright = False

myst_heading_anchors = 6

Expand All @@ -31,3 +31,4 @@
ogp_site_url = "https://cs50.readthedocs.io/"

project = "CS50 Docs"

2 changes: 1 addition & 1 deletion cs50/check.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `cs50/check`
# cs50/check

`cs50/check` is the [Docker](../../docker) image on [Docker Hub](https://hub.docker.com/r/cs50/check), implemented with this [`Dockerfile`](https://github.com/cs50/check/blob/main/Dockerfile) used by [submit.cs50.io](https://submit.cs50.io/) to run [`check50`](https://cs50.readthedocs.io/projects/check50/).
2 changes: 1 addition & 1 deletion cs50/cli.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `cs50/cli`
# cs50/cli
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backtick for titles is removed due to issue: ABD-01/furo50#11


`cs50/cli` is the [Docker](../../docker) image on [Docker Hub](https://hub.docker.com/r/cs50/cli), implemented with this [`Dockerfile`](https://github.com/cs50/cli/blob/main/Dockerfile), used by [`cli50`](../cli50).
2 changes: 1 addition & 1 deletion cs50/codespace.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `cs50/codespace`
# cs50/codespace

`cs50/codespace` is the [Docker](../../docker) image on [Docker Hub](https://hub.docker.com/r/cs50/codespace), implemented with this [`Dockerfile`](https://github.com/cs50/codespace/blob/main/Dockerfile), used by CS50's adaptation of [Visual Studio Code](/code/). It is also available as `ghcr.io/cs50/codespace` on [GitHub Packages](https://github.com/cs50/codespace/pkgs/container/codespace).
2 changes: 1 addition & 1 deletion cs50/ide.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `cs50/ide`
# cs50/ide

`cs50/ide` is the [Docker](../../docker) image on [Docker Hub](https://hub.docker.com/r/cs50/ide), implemented with this [`Dockerfile`](https://github.com/cs50/ide/blob/main/Dockerfile), used by [CS50 IDE](../ide/index).
2 changes: 1 addition & 1 deletion cs50/sandbox.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `cs50/sandbox`
# cs50/sandbox

`cs50/sandbox` is a [Docker](../../docker) image on [Docker Hub](https://hub.docker.com/r/cs50/sandbox), implemented with this [`Dockerfile`](https://github.com/cs50/sandbox/blob/main/Dockerfile), with which you can create a container nearly identical to those used by [CS50 Sandbox](../sandbox).
2 changes: 1 addition & 1 deletion cs50/server.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `cs50/server`
# cs50/server

`cs50/server` is a [Docker](../../docker) image on [Docker Hub](https://hub.docker.com/r/cs50/server), implemented with this [`Dockerfile`](https://github.com/cs50/server/blob/main/Dockerfile), with which you can (easily!) serve websites with, optionally, back ends implemented in JavaScript, PHP, Python, or Ruby. (We use it to serve CS50's own apps on [AWS Elastic Beanstalk](https://aws.amazon.com/elasticbeanstalk/)!) Essentially, it's a lightly customized installation of [Passenger](https://www.phusionpassenger.com/library/), an app server, to which we've added support for PHP (for some of CS50's older web apps). It also facilitates configuration of Nginx, the web server used by Passenger in in [Standalone mode](https://www.phusionpassenger.com/library/config/standalone/intro.html), via two files, `httpd.conf` and `server.conf`. The image itself is based on [`cs50/cli`](cli), which, in turn, is based on [Ubuntu 22.04](https://hub.docker.com/_/ubuntu/), a popular distribution of Linux.

Expand Down
2 changes: 1 addition & 1 deletion pip.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `pip`
# pip

Most of CS50's command-line tools are implemented in Python and can be installed on your own Mac or PC via `pip`, a command-line tool via which you can install Python packages from [PyPI](https://pypi.org/), "the default [package index](https://packaging.python.org/glossary/#term-package-index) for the Python community."

Expand Down
2 changes: 1 addition & 1 deletion python.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `python`
# Python

Most of CS50's command-line tools require that you have Python 3.6 or higher installed, since CS50 [uses f-strings](https://www.python.org/dev/peps/pep-0498/) and [assumes that keyword arguments are ordered](https://www.python.org/dev/peps/pep-0468/). (If you already have Python installed on your Mac or PC but didn't install it yourself, odds are it's an older version.) You can install the latest version of Python for

Expand Down
2 changes: 1 addition & 1 deletion render50.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `render50`
# render50

`render50` is a command-line tool with which you can generate syntax-highlighted PDFs of source code. In years past, CS50 generated PDFs of students' submissions so that teaching fellows (TFs) could annotate the PDFs with typed feedback. These days, CS50 generates PDFs of lectures' source code so that students can annotate them during lectures and so that David has a printout of each lecture's source code in front of him during lectures!

Expand Down
15 changes: 8 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
myst-parser==0.17.2
sphinx==4.5.0
sphinx-markdown-tables==0.0.17
sphinx-tabs==3.3.1
sphinx_rtd_theme==1.0.0
sphinxcontrib-httpdomain==1.8.0
sphinxext-opengraph==0.6.3
myst-parser>=0.17.2
sphinx>=4.5.0
sphinx-markdown-tables>=0.0.17
sphinx-tabs>=3.3.1
sphinx_rtd_theme>=1.0.0
sphinxcontrib-httpdomain>=1.8.0
sphinxext-opengraph>=0.6.3
furo50>=1.0.0b1
2 changes: 1 addition & 1 deletion style50.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `style50`
# style50

`style50` is a command-line tool with which you can check your code for consistency with [CS50's style guide](../style/c/) (for C). If your code isn't styled consistently, `style50` will summarize the changes you should make to your code, as by highlighting in <span class="bg-green p-1 text-white">green</span> characters you should add and highlighting in <span class="bg-red p-1 text-white">red</span> characters you should delete.

Expand Down
2 changes: 1 addition & 1 deletion submit50.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `submit50`
# submit50

`submit50` is a command-line tool with which you can submit work (e.g., problem sets) to a course (e.g., CS50). It's based on `git`, a "distributed version control system" that allows you to save different versions of files without having to give each version a unique filename (as you might be wont to do on your own Mac or PC!). Via `submit50` and, in turn, `git` can you thus submit work multiple times (i.e., multiple versions thereof).

Expand Down