Skip to content

Commit 55a6495

Browse files
committed
Documentation updates and auto-deploy
1 parent 0eb5e2d commit 55a6495

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4318
-1637
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- '.gitignore'
1111
- 'site/**'
1212
- '*.html'
13+
- 'mkdocs.yml'
1314
pull_request:
1415
paths-ignore:
1516
- 'docs/**'
@@ -19,6 +20,7 @@ on:
1920
- '.gitignore'
2021
- 'site/**'
2122
- '*.html'
23+
- 'mkdocs.yml'
2224

2325
jobs:
2426
test:
@@ -158,4 +160,4 @@ jobs:
158160

159161
- name: Behat features
160162
if: ${{ always() }}
161-
run: moodle-plugin-ci behat --profile chrome
163+
run: moodle-plugin-ci behat --profile chrome

.github/workflows/docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
9+
jobs:
10+
deploy-docs:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0 # Fetch full history for gh-pages deployment
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install mkdocs and dependencies
23+
run: |
24+
pip install mkdocs mkdocs-material
25+
26+
- name: Build documentation
27+
run: mkdocs build
28+
29+
- name: Deploy to GitHub Pages
30+
run: mkdocs gh-deploy --force

docs/index.md

Lines changed: 280 additions & 144 deletions
Large diffs are not rendered by default.

docs/stylesheets/extra.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* Increase line height in code blocks */
2+
.codehilite pre,
3+
.highlight pre,
4+
pre code {
5+
line-height: 1.5 !important;
6+
}
7+
8+
/* For inline code as well, if needed */
9+
code {
10+
line-height: 1.5 !important;
11+
}
12+
13+
h2 {
14+
padding-top: 10px;
15+
border-top: 1px solid darkgray;
16+
font-size: 200%;
17+
}

lang/en/qtype_coderunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ class definition is followed by a public <i>__Tester__&nbsp;</i>&nbsp;class that
10151015
is used to pass further sandbox-specific data, such as compile options and
10161016
API-keys. It should generally be left blank but if non-blank it must be a valid
10171017
JSON record. In the case of the jobe sandbox, available attributes include
1018-
disklimit, streamsize, numprocs, compileargs, linkargs and interpreterargs. For
1018+
disklimit, streamsize, numprocs, compileargs, linkargs, runargs and interpreterargs. For
10191019
example <code>{"compileargs":["-std=c89"]}</code> for a C question would force C89
10201020
compliance and no other C options would be used. See the jobe documentation
10211021
for details. Some sandboxes (e.g. the deprecated Ideone sandbox) may silently ignore any or all of

mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
site_name: CodeRunner
2+
theme:
3+
name: readthedocs
4+
extra_css:
5+
- stylesheets/extra.css

site/404.html

Lines changed: 91 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,106 @@
11
<!DOCTYPE html>
2-
<html lang="en" data-bs-theme="light">
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
8-
9-
10-
<link rel="shortcut icon" href="/img/favicon.ico">
11-
<title>CodeRunner</title>
12-
<link href="/css/bootstrap.min.css" rel="stylesheet">
13-
<link href="/css/fontawesome.min.css" rel="stylesheet">
14-
<link href="/css/brands.min.css" rel="stylesheet">
15-
<link href="/css/solid.min.css" rel="stylesheet">
16-
<link href="/css/v4-font-face.min.css" rel="stylesheet">
17-
<link href="/css/base.css" rel="stylesheet">
18-
<link id="hljs-light" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" >
19-
<link id="hljs-dark" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github-dark.min.css" disabled>
20-
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
21-
<script>hljs.highlightAll();</script>
22-
</head>
23-
24-
<body>
25-
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
26-
<div class="container">
27-
<a class="navbar-brand" href="/.">CodeRunner</a>
2+
<html class="writer-html5" lang="en" >
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<link rel="shortcut icon" href="/img/favicon.ico" />
8+
<title>CodeRunner</title>
9+
<link rel="stylesheet" href="/css/theme.css" />
10+
<link rel="stylesheet" href="/css/theme_extra.css" />
11+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" />
12+
<link href="/stylesheets/extra.css" rel="stylesheet" />
13+
14+
<!--[if lt IE 9]>
15+
<script src="/js/html5shiv.min.js"></script>
16+
<![endif]-->
17+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
18+
<script>hljs.highlightAll();</script>
19+
</head>
2820

29-
<!-- Expanded navigation -->
30-
<div id="navbar-collapse" class="navbar-collapse collapse">
21+
<body class="wy-body-for-nav" role="document">
3122

32-
<ul class="nav navbar-nav ms-md-auto">
33-
<li class="nav-item">
34-
<a href="#" class="nav-link" data-bs-toggle="modal" data-bs-target="#mkdocs_search_modal">
35-
<i class="fa fa-search"></i> Search
36-
</a>
37-
</li>
38-
</ul>
39-
</div>
40-
</div>
41-
</div>
42-
43-
<div class="container">
44-
<div class="row">
23+
<div class="wy-grid-for-nav">
24+
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
25+
<div class="wy-side-scroll">
26+
<div class="wy-side-nav-search">
27+
<a href="/." class="icon icon-home"> CodeRunner
28+
</a><div role="search">
29+
<form id ="rtd-search-form" class="wy-form" action="//search.html" method="get">
30+
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" title="Type search term here" />
31+
</form>
32+
</div>
33+
</div>
4534

46-
<div class="row-fluid">
47-
<div id="main-content" class="span12">
48-
<h1 id="404-page-not-found" style="text-align: center">404</h1>
49-
<p style="text-align: center"><strong>Page not found</strong></p>
35+
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
36+
<ul>
37+
<li class="toctree-l1"><a class="reference internal" href="/.">CodeRunner</a>
38+
</li>
39+
</ul>
5040
</div>
5141
</div>
42+
</nav>
5243

44+
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
45+
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
46+
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
47+
<a href="/.">CodeRunner</a>
48+
49+
</nav>
50+
<div class="wy-nav-content">
51+
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
52+
<ul class="wy-breadcrumbs">
53+
<li><a href="/." class="icon icon-home" aria-label="Docs"></a></li>
54+
<li class="wy-breadcrumbs-aside">
55+
</li>
56+
</ul>
57+
<hr/>
58+
</div>
59+
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
60+
<div class="section" itemprop="articleBody">
61+
5362

54-
</div>
55-
</div>
63+
<h1 id="404-page-not-found">404</h1>
64+
65+
<p><strong>Page not found</strong></p>
5666

57-
<footer class="col-md-12">
58-
<hr>
59-
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
60-
</footer>
61-
<script src="/js/bootstrap.bundle.min.js"></script>
62-
<script>
63-
var base_url = "/",
64-
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
65-
</script>
66-
<script src="/js/base.js"></script>
67-
<script src="/search/main.js"></script>
6867

69-
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
70-
<div class="modal-dialog modal-lg">
71-
<div class="modal-content">
72-
<div class="modal-header">
73-
<h4 class="modal-title" id="searchModalLabel">Search</h4>
74-
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
75-
</div>
76-
<div class="modal-body">
77-
<p>From here you can search these documents. Enter your search terms below.</p>
78-
<form>
79-
<div class="form-group">
80-
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
81-
</div>
82-
</form>
83-
<div id="mkdocs-search-results" data-no-results-text="No results found"></div>
84-
</div>
85-
<div class="modal-footer">
86-
</div>
87-
</div>
88-
</div>
89-
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
90-
<div class="modal-dialog">
91-
<div class="modal-content">
92-
<div class="modal-header">
93-
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
94-
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
95-
</div>
96-
<div class="modal-body">
97-
<table class="table">
98-
<thead>
99-
<tr>
100-
<th style="width: 20%;">Keys</th>
101-
<th>Action</th>
102-
</tr>
103-
</thead>
104-
<tbody>
105-
<tr>
106-
<td class="help shortcut"><kbd>?</kbd></td>
107-
<td>Open this help</td>
108-
</tr>
109-
<tr>
110-
<td class="next shortcut"><kbd>n</kbd></td>
111-
<td>Next page</td>
112-
</tr>
113-
<tr>
114-
<td class="prev shortcut"><kbd>p</kbd></td>
115-
<td>Previous page</td>
116-
</tr>
117-
<tr>
118-
<td class="search shortcut"><kbd>s</kbd></td>
119-
<td>Search</td>
120-
</tr>
121-
</tbody>
122-
</table>
123-
</div>
124-
<div class="modal-footer">
12568
</div>
69+
</div><footer>
70+
71+
<hr/>
72+
73+
<div role="contentinfo">
74+
<!-- Copyright etc -->
75+
</div>
76+
77+
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
78+
</footer>
79+
12680
</div>
127-
</div>
81+
</div>
82+
83+
</section>
84+
85+
</div>
86+
87+
<div class="rst-versions" role="note" aria-label="Versions">
88+
<span class="rst-current-version" data-toggle="rst-current-version">
89+
90+
91+
92+
</span>
12893
</div>
94+
<script src="/js/jquery-3.6.0.min.js"></script>
95+
<script>var base_url = "/";</script>
96+
<script src="/js/theme_extra.js"></script>
97+
<script src="/js/theme.js"></script>
98+
<script src="/search/main.js"></script>
99+
<script>
100+
jQuery(function () {
101+
SphinxRtdTheme.Navigation.enable(true);
102+
});
103+
</script>
129104

130-
</body>
105+
</body>
131106
</html>

0 commit comments

Comments
 (0)