Skip to content

Commit

Permalink
Migrate to docsify and Github Pages (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
WallE256 authored and quantum5 committed Oct 24, 2019
1 parent 309d776 commit f8ea1db
Show file tree
Hide file tree
Showing 23 changed files with 113 additions and 168 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DMOJ Documentation
Documentation for the [DMOJ judge](https://github.com/DMOJ/judge) system.

Access at [https://dmoj.readthedocs.org](https://dmoj.readthedocs.org)
Access at [https://docs.dmoj.ca](https://docs.dmoj.ca)
Empty file added docs/.nojekyll
Empty file.
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Table of Contents
- [**Linux installation**](judge/linux_installation.md)
- [**Windows installation**](judge/windows_installation.md)

- [**Supported Languages**](judge/supported_languages.md)
- [**Problem file format**](judge/problem_format.md)
Expand Down
26 changes: 26 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- Site
- [Installing the Site](site/installation.md)
- [Updating the Site](site/updating.md)
- [Contest Formats](site/contest_formats.md)
- [Managing Problems Through the Site Interface](site/managing_problems.md)
- [PDF Generation of Problem Statements](site/pdf_generation.md)
- [LaTeX Math with Wikimedia Mathoid](site/mathoid.md)
- [LaTeX Diagrams with Texoid](site/texoid.md)
- [reCAPTCHA Spam Registration Prevention](site/recaptcha.md)
- [SSL Proxying for User Content](site/ssl_content_proxy.md)

- Judge
- [Linux Installation](judge/linux_installation.md)
- [Supported Languages](judge/supported_languages.md)
- [Colored Compiler Messages](judge/colored_compiler_messages.md)
- [Status Codes](judge/status_codes.md)

- Problem File Format
- [Problem Format](problem_format/problem_format.md)
- [Custom Checkers](problem_format/custom_checkers.md)
- [Custom Grader Behaviour](problem_format/custom_graders.md)
- [Generators](problem_format/generator.md)
- [Problem Examples](problem_format/problem_examples.md)

- About
- [License](about/LICENSE.md)
26 changes: 26 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
loadSidebar: true,
subMaxLevel: 2,
name: 'DMOJ Docs'
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-shell-session.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-python.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-latex.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-yaml.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-c.min.js"></script>
</body>
</html>
22 changes: 0 additions & 22 deletions docs/index.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/judge/colored_compiler_messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The DMOJ judge automatically enables colors for newer GCC versions.
## Enabling Colors in GCC < 4.9
Colors can be enabled in GCC versions prior to 4.9 through the `colorgcc` package. If `colorgcc` doesn't work for you, there are alternative packages out there that accomplish a similar result.

```sh
```shell-session
sudo apt-get install colorgcc
```

Expand All @@ -18,7 +18,7 @@ Then, specify the `colorgcc` executable in place of the GCC executors in the jud
### Using `colorgcc` alongside a GCC 4.9+ installation
It may be the case that you have multiple GCC versions installed, and that `colorgcc` will attempt to colorize GCC 4.9+ output instead of GCC < 4.9. By default, `colorgcc` uses the GCC executables in `$PATH`, but this behaviour can be overriden through a `.colorgccrc` file placed in the judge `$HOME`. The example below assumes you have an environment variable `$JUDGE_HOME` set to the home directory of the judge user.

```sh
```shell-session
echo 'color-g++: /usr/bin/g++' >> $JUDGE_HOME/.colorgccrc
echo 'color-gcc: /usr/bin/gcc' >> $JUDGE_HOME/.colorgccrc
echo 'color-c++: /usr/bin/c++' >> $JUDGE_HOME/.colorgccrc
Expand Down
8 changes: 5 additions & 3 deletions docs/judge/linux_installation.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
This installation guide is for Linux based machines (WSL included). For installation on Windows, see the [Windows install instructions](windows_installation).
# Linux Installation

This installation guide is for Linux based machines (WSL included). Windows is not supported.

## Installing the prerequisites

```
```shell-session
$ apt install git python-dev python-pip build-essential libseccomp-dev
$ git clone https://github.com/DMOJ/judge
$ cd judge
Expand All @@ -14,7 +16,7 @@ $ python setup.py develop

Start by taking the `runtime` block from the output of the command `dmoj-autoconf` and put it in a new file `config.yml`. Next, add a `problem_storage_root` node where you specify where your problem data is located.

```
```yaml
problem_storage_root:
- /judge/problems
runtime:
Expand Down
2 changes: 2 additions & 0 deletions docs/judge/status_codes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Status Codes

This page lists all status codes encountered on the DMOJ and their description. It should be noted that it is possible for a test case to be given multiple status codes (indeed, this is usually the case for non-AC verdicts), in which case the one with the highest priority will be displayed. This page lists status codes in order of increasing priority.

## AC - Accepted
Expand Down
53 changes: 0 additions & 53 deletions docs/judge/windows_installation.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/problem_format/custom_checkers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Checkers - `checker`
# Custom Checkers

A problem with many possible outputs (e.g. not a single possible answer, with score based on accuracy) may benefit from the `checker` field in the `init.yml` file. A checker is a Python script that is executed per-case post-execution — it grades the output of a process but does not interact with it.

Expand Down Expand Up @@ -111,7 +111,7 @@ Variables in global scope will exist throughout the grading process.
Additionally, if the `check` method has the flag `run_on_error` set, it will be run against the submission's output, even if it receives an IR/TLE/RTE/MLE verdict.
The only built-in checker that has this flag set is the `linecount` checker.

## Returns
### Returns

`check` can return either a `CheckerResult` object (`from dmoj.result import CheckerResult`), or a boolean (`case_passed_bool`).
A `CheckerResult` can be instantiated through `CheckerResult(case_passed_bool, points_awarded, feedback='')`.
Expand Down
2 changes: 2 additions & 0 deletions docs/problem_format/custom_graders.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Custom Graders

# Custom Grader Behaviour - `grader`
An `init.yml` object can contain a top-level `custom_judge` node, which contains a path to a Python file to be executed as a grader for the problem. The grader has access to the archive specified in `archive`.

Expand Down
1 change: 1 addition & 0 deletions docs/problem_format/problem_format.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Problem Format
Each problem is stored in its own directory. That directory must contain a file named `init.yml`.

# `init.yml`
Expand Down
Loading

0 comments on commit f8ea1db

Please sign in to comment.