This repository has been archived by the owner on Mar 21, 2023. It is now read-only.
forked from mps-youtube/yewtube
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use mkdocs instead of sphinx docs
* build(setup): extras_require mkdocs * build(setup): extras_require mkdocs - package mkdocstrings-python-legacy * refactor: check sys.stdout.encoding once also isort module * docs: mkdocs - skip_files for test files * docs(CONTRIBUTING): mkdocs
- Loading branch information
1 parent
28eadb7
commit 32a2e9c
Showing
13 changed files
with
165 additions
and
30 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
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 @@ | ||
--8<-- "CHANGELOG.md" |
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 @@ | ||
--8<-- "CONTRIBUTING.md" |
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,33 @@ | ||
/* Indentation. */ | ||
div.doc-contents:not(.first) { | ||
padding-left: 25px; | ||
border-left: 4px solid rgba(230, 230, 230); | ||
margin-bottom: 80px; | ||
} | ||
|
||
/* Don't capitalize names. */ | ||
h5.doc-heading { | ||
text-transform: none !important; | ||
} | ||
|
||
/* Don't use vertical space on hidden ToC entries. */ | ||
.hidden-toc::before { | ||
margin-top: 0 !important; | ||
padding-top: 0 !important; | ||
} | ||
|
||
/* Don't show permalink of hidden ToC entries. */ | ||
.hidden-toc a.headerlink { | ||
display: none; | ||
} | ||
|
||
/* Avoid breaking parameters name, etc. in table cells. */ | ||
td code { | ||
word-break: normal !important; | ||
} | ||
|
||
/* For pieces of Markdown rendered in table cells. */ | ||
td p { | ||
margin-top: 0 !important; | ||
margin-bottom: 0 !important; | ||
} |
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,34 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
"""Generate the code reference pages and navigation.""" | ||
|
||
from pathlib import Path | ||
|
||
import mkdocs_gen_files | ||
|
||
nav = mkdocs_gen_files.Nav() | ||
|
||
skip_files = [ | ||
(Path("mps_youtube") / "config.py"), | ||
(Path("mps_youtube") / "mpris.py"), | ||
] | ||
skip_files.extend((Path("mps_youtube") / "test").glob("*.py")) | ||
for path in sorted(Path("mps_youtube").glob("**/*.py")): | ||
if path in skip_files: | ||
continue | ||
module_path = path.with_suffix("") | ||
doc_path = path.relative_to("mps_youtube").with_suffix(".md") | ||
full_doc_path = Path("reference", doc_path) | ||
|
||
parts = list(module_path.parts) | ||
parts[-1] = f"{parts[-1]}.py" | ||
nav[parts] = doc_path | ||
|
||
with mkdocs_gen_files.open(full_doc_path, "w") as fd: | ||
ident = ".".join(module_path.parts) | ||
print("::: " + ident, file=fd) | ||
|
||
mkdocs_gen_files.set_edit_path(full_doc_path, path) | ||
|
||
with mkdocs_gen_files.open("reference/SUMMARY.md", "w") as nav_file: | ||
nav_file.writelines(nav.build_literate_nav()) |
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 @@ | ||
--8<-- "README.md" |
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,3 @@ | ||
``` | ||
--8<-- "LICENSE" | ||
``` |
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,49 @@ | ||
site_name: Yewtube | ||
site_description: Terminal based YouTube player and downloader. | ||
site_url: https://iamtalhaasghar.github.io/yewtube | ||
repo_url: https://github.com/iamtalhaasghar/yewtube | ||
repo_name: iamtalhaasghar/yewtube | ||
|
||
nav: | ||
- Home: | ||
- Overview: index.md | ||
- Changelog: changelog.md | ||
- License: license.md | ||
- Code Reference: reference/ | ||
- Development: | ||
- Contributing: contributing.md | ||
|
||
theme: | ||
name: material | ||
features: | ||
- navigation.tabs | ||
palette: | ||
scheme: slate | ||
primary: teal | ||
accent: purple | ||
|
||
extra_css: | ||
- css/mkdocstrings.css | ||
|
||
markdown_extensions: | ||
- admonition | ||
- pymdownx.emoji | ||
- pymdownx.magiclink | ||
- pymdownx.snippets: | ||
check_paths: true | ||
- pymdownx.superfences | ||
- pymdownx.tabbed | ||
- pymdownx.tasklist | ||
- toc: | ||
permalink: true | ||
|
||
plugins: | ||
- search | ||
- mkdocstrings: | ||
watch: | ||
- mps_youtube | ||
- gen-files: | ||
scripts: | ||
- docs/gen_ref_nav.py | ||
- literate-nav: | ||
nav_file: SUMMARY.md |
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
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
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
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
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