Skip to content

Commit

Permalink
Readthedocs support (blackjack4494#107)
Browse files Browse the repository at this point in the history
Authored-by: shirtjs <[email protected]>
  • Loading branch information
shirt-dev authored Feb 24, 2021
1 parent 5b1ecbb commit a17417e
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 64 deletions.
23 changes: 23 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF
formats:
- epub
- pdf
- htmlzip

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
33 changes: 23 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,33 @@

import sys
import os
# Allows to import youtube_dlc
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

# Allows to import yt-dlp
sys.path.insert(0, os.path.abspath('..'))
from recommonmark.transform import AutoStructify

# -- General configuration ------------------------------------------------

# The suffix of source filenames.
source_suffix = ['.rst', '.md']

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'recommonmark',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'youtube-dlc'
copyright = u'2014, Ricardo Garcia Gonzalez'
project = u'yt-dlp'
copyright = u'UNLICENSE'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -62,10 +65,20 @@
# a list of builtin themes.
html_theme = 'default'

# Disable highlights
highlight_language = 'none'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']


# Output file base name for HTML help builder.
htmlhelp_basename = 'youtube-dlcdoc'
def setup(app):
app.add_config_value('recommonmark_config', {
'enable_math': False,
'enable_inline_math': False,
'enable_eval_rst': True,
'enable_auto_toc_tree': True,
}, True)
app.add_transform(AutoStructify)
31 changes: 0 additions & 31 deletions docs/faq.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/index.md
23 changes: 0 additions & 23 deletions docs/index.rst

This file was deleted.

2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recommonmark>=0.6.0
m2r2

0 comments on commit a17417e

Please sign in to comment.