forked from python/peps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sphinx support: theming (python#1933)
See #2, python#1385 for context. Superseeds python#1568. This is the Sphinx-theming part, building on PR python#1930. ### Stylesheets: - `style.css` - styles - `mq.css` - media queries ### Jinja2 Templates: - `page.html` - overarching template ### Javascript: - `doctools.js` - fixes footnote brackets ### Theme miscellany - `theme.conf` - sets pygments styles, theme internals
- Loading branch information
Showing
19 changed files
with
591 additions
and
129 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 |
---|---|---|
|
@@ -36,6 +36,10 @@ jobs: | |
- name: 🔧 Build PEPs | ||
run: make pages -j$(nproc) | ||
|
||
# remove the .doctrees folder when building for deployment as it takes two thirds of disk space | ||
- name: 🔥 Clean up files | ||
run: rm -r build/.doctrees/ | ||
|
||
- name: 🚀 Deploy to GitHub pages | ||
uses: JamesIves/[email protected] | ||
with: | ||
|
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
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
from sphinx import roles | ||
|
||
from pep_sphinx_extensions.config import pep_url | ||
from pep_sphinx_extensions import config | ||
|
||
|
||
class PEPRole(roles.PEP): | ||
"""Override the :pep: role""" | ||
|
||
def build_uri(self) -> str: | ||
"""Get PEP URI from role text.""" | ||
base_url = self.inliner.document.settings.pep_base_url | ||
pep_num, _, fragment = self.target.partition("#") | ||
pep_base = base_url + pep_url.format(int(pep_num)) | ||
pep_str, _, fragment = self.target.partition("#") | ||
pep_base = config.pep_url.format(int(pep_str)) | ||
if fragment: | ||
return f"{pep_base}#{fragment}" | ||
return pep_base |
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
Oops, something went wrong.