-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
towards automating documentation serving
- Loading branch information
1 parent
74e95a9
commit 604e5ff
Showing
15 changed files
with
113 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: documentation | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- name: Install dependencies | ||
run: | | ||
pip install sphinx sphinx_rtd_theme myst_parser | ||
- name: Sphinx build | ||
run: | | ||
sphinx-build doc _build | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: _build/ | ||
force_orphan: true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
🔗 Making links to existing content | ||
=================================== | ||
|
||
* You can use either markdown style links, or html style links. | ||
* Specify the type of content to which you are linking by preceding the name of the content with that type. | ||
* | ||
|
||
Link to an assignment | ||
----------------------- | ||
|
||
|
||
To link to an existing Canvas assignment, use a link of the form | ||
|
||
.. code-block:: | ||
<a href="assignment:Test Assignment">link to Test Assignment</a> | ||
[Test Assignment](assignment:Test Assignment) | ||
The name must match exactly, including case. This is the name on Canvas, not the name of the containerized content on your local computer. That is, the thing after `assignment:` is the `name` field from `meta.json`. | ||
|
||
Link to a page | ||
----------------------- | ||
|
||
To link to an existing Canvas page, use a link of the form | ||
|
||
.. code-block:: | ||
<a href="page:Test Page">Link to page titled Test Page</a> | ||
[Link to page titled Test Page](page:Test Page) | ||
The name must match exactly, including case. This is the name on Canvas, not the name of the containerized content on your local computer. That is, the thing after `page:` is the `name` field from `meta.json`. | ||
|
||
|
||
Link to an uploaded file | ||
------------------------------- | ||
To link to an existing Canvas file, use a link of the form | ||
|
||
.. code-block:: | ||
<a href="file:DavidenkoDiffEqn.pdf">Link to file called DavidenkoDiffEqn.pdf</a> | ||
[Link to file called DavidenkoDiffEqn.pdf](file:DavidenkoDiffEqn.pdf) | ||
The name must match exactly, including case. This is the name of the file on Canvas. There is currently no way to refer to multiple files of the same name in different folders on Canvas. If you want this, make an issue, or implement it yourself and make a PR. | ||
|
||
|
||
|
||
Notes | ||
------ | ||
|
||
What if the content doesn't (yet) exist? | ||
****************************************** | ||
|
||
If the "existing" content doesn't yet exist when the content is published, a broken link will be made, and a warning issued to the terminal. This is ok. Think of the publishing process using Markdown2Canvas similar to the compilation of a TeX document, which is done in multiple passes. Once the page / assignment / file exists, the link will resolve correctly to it. Publish all content about twice to get links to resolve. | ||
|
||
|
||
|
||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.