mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-05 04:48:00 +00:00
Add youtube videos to docs
This is possible thanks to a custom youtube tag. See https://jasonstitt.com/youtube-in-restructured-text
This commit is contained in:
parent
a2f50205fa
commit
fffc90442e
11
README.rst
11
README.rst
@ -71,19 +71,10 @@ Extensive documentation is available online: https://docs.tutor.overhang.io/
|
||||
Support
|
||||
-------
|
||||
|
||||
To get community support, go to the official discussion forums: https://discuss.overhang.io.
|
||||
To get community support, go to the official discussion forums: https://discuss.overhang.io. For official support, please subscribe to a Long Term Support (LTS) license at https://overhang.io/tutor/lts.
|
||||
|
||||
.. _readme_support_end:
|
||||
|
||||
.. _whats_tutor_start:
|
||||
|
||||
What is Tutor?
|
||||
--------------
|
||||
|
||||
Tutor was presented at the 2019 Open edX conference in San Diego, CA. Here's the 7-minute talk: `video <https://www.youtube.com/watch?v=Oqc7c-3qFc4>`_, `slides <https://regisb.github.io/openedx2019/>`_.
|
||||
|
||||
.. _whats_tutor_end:
|
||||
|
||||
.. _readme_contributing_start:
|
||||
|
||||
Contributing
|
||||
|
44
docs/conf.py
44
docs/conf.py
@ -194,14 +194,50 @@ epub_title = project
|
||||
epub_exclude_files = ['search.html']
|
||||
|
||||
# Custom variables
|
||||
import io
|
||||
import os
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
about = {}
|
||||
with io.open(os.path.join(here, "..", "tutor", "__about__.py"), "rt", encoding="utf-8") as f:
|
||||
with io.open(
|
||||
os.path.join(here, "..", "tutor", "__about__.py"), "rt", encoding="utf-8"
|
||||
) as f:
|
||||
exec(f.read(), about)
|
||||
rst_prolog = """
|
||||
.. |tutor_version| replace:: {}
|
||||
""".format(
|
||||
about['__version__'],
|
||||
about["__version__"],
|
||||
)
|
||||
|
||||
|
||||
# Custom directives
|
||||
def youtube(
|
||||
_name,
|
||||
_args,
|
||||
_options,
|
||||
content,
|
||||
_lineno,
|
||||
_contentOffset,
|
||||
_blockText,
|
||||
_state,
|
||||
_stateMachine,
|
||||
):
|
||||
""" Restructured text extension for inserting youtube embedded videos """
|
||||
if not content:
|
||||
return []
|
||||
video_id = content[0]
|
||||
return [
|
||||
docutils.nodes.raw(
|
||||
"",
|
||||
"""
|
||||
<iframe width="560" height="315"
|
||||
src="https://www.youtube-nocookie.com/embed/{video_id}"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
|
||||
</iframe>""".format(
|
||||
video_id=video_id
|
||||
),
|
||||
format="html",
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
youtube.content = True
|
||||
docutils.parsers.rst.directives.register_directive("youtube", youtube)
|
||||
|
@ -10,16 +10,19 @@ Tutor simplifies the deployment of Open edX by:
|
||||
1. Separating the configuration logic from the deployment platforms.
|
||||
2. Running application processes in cleanly separated `docker containers <https://www.docker.com/resources/what-container>`_.
|
||||
|
||||
.. image:: https://overhang.io/images/openedx-plus-docker-is-tutor.png
|
||||
.. image:: https://overhang.io/static/img/openedx-plus-docker-is-tutor.png
|
||||
:alt: Open edX + Docker = Tutor
|
||||
:width: 500px
|
||||
:align: center
|
||||
|
||||
Because Docker containers are becoming an industry-wide standard, that means that with Tutor it becomes possible to run Open edX anywhere: for now, Tutor supports deploying on a local server, with `docker-compose <https://docs.docker.com/compose/overview/>`_, and in a large cluster, with `Kubernetes <http://kubernetes.io/>`_. But in the future, Tutor may support other deployment platforms.
|
||||
|
||||
.. include:: ../README.rst
|
||||
:start-after: _whats_tutor_start:
|
||||
:end-before: _whats_tutor_end:
|
||||
What is Tutor?
|
||||
--------------
|
||||
|
||||
Tutor was presented at the 2019 Open edX conference in San Diego, CA. Here's the 7-minute talk (with `slides <https://regisb.github.io/openedx2019/>`_):
|
||||
|
||||
.. youtube:: Oqc7c-3qFc4
|
||||
|
||||
How does Tutor work?
|
||||
--------------------
|
||||
|
Loading…
Reference in New Issue
Block a user