-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Sphinx - theming #1933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Sphinx - theming #1933
Changes from 84 commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
6060f77
Add Sphinx Jinja2 custom template bridge
AA-Turner 9b32ce4
Add sphinx theme options and favicon
AA-Turner 2f0875a
Add breadcrumbs template
AA-Turner 6c6da48
Add sidebar template
AA-Turner 9d0ae13
Add search template
AA-Turner 8392119
Add main layout template override
AA-Turner 57673a1
Add javascript overrides
AA-Turner db6bab6
Add fonts and stylesheets
AA-Turner 76acf20
Add PEP override styles
AA-Turner e81b54b
Disable search
AA-Turner 079abff
Control included JavaScript in templates
AA-Turner 6a9ba7d
Remove old JS (search related)
AA-Turner 74a7cd2
Add theme config
AA-Turner f501f61
Update layout.html template to remove inheritance
AA-Turner 222d641
Move layout.html to page.html
AA-Turner 514fea5
Add body jinja code
AA-Turner 13606da
Remove unneeded block
AA-Turner f1d4971
Remove doc relations functionality
AA-Turner dc491ee
Use google fonts, remove local files
AA-Turner b8ef2d4
Move templates folder so as not to include in built static files
AA-Turner 1975119
Remove PEPTemplateLoader as the `pep_id` filter is not used
AA-Turner 57ee102
Remove breadcrumbs.html
AA-Turner c707253
Move static CSS and JavaScript one level up
AA-Turner b9475dd
Run PurgeCSS
AA-Turner 0c5b30d
Remove more unused selectors
AA-Turner 6342abd
Remove more unused selectors / prefixes
AA-Turner 5077817
Start to rearrange and de-duplicate
AA-Turner fbbdbef
Continue removing, also consolidate some classes
AA-Turner aa6ea5a
More grouping & rearranging
AA-Turner 0687404
Fix parsing for definition list
AA-Turner 2271fc9
Clean up code and blockquote rules
AA-Turner 56f6949
Add explicit CSS overrides file
AA-Turner eb48d34
Move blockquote style to overrides
AA-Turner 56204ba
Update code style
AA-Turner 69fbe9d
Header styles
AA-Turner ef1d0b0
Update breadcrumbs and move .text rules to groups
AA-Turner 77b16d4
Move hyphenation to explicit overrides
AA-Turner ddcc4ab
Move bottom margin & line height to explicit overrides
AA-Turner d0fec5c
Update monospace fonts
AA-Turner 83a3229
Make style-pydotorg-compat.css standalone
AA-Turner f55dcec
Fix footer metadata display
AA-Turner 3024a5d
Improve PEPContents, use HTML title elements and use self-backlinks
AA-Turner 121b119
Adjust header styles
AA-Turner 535d3c3
Adjust admonitions
AA-Turner 16a650f
Adjust definition lists
AA-Turner 22789d0
Add comments
AA-Turner 2806db9
Reorder rule groups (mostly) alphabetically
AA-Turner df66b2d
Use rem units
AA-Turner 35a9dd7
Merge pep.css and style.css
AA-Turner 9c86b52
Remove main legacy CSS reset
AA-Turner b3bdbe8
Remove some print rules
AA-Turner 16e1968
Remove media query rules with non-existent targets
AA-Turner a862d40
Update media queries & breakpoints
AA-Turner 1f26fb4
Remove two levels of div elements
AA-Turner 5357af5
Move print to mq.css
AA-Turner 1db6b5d
Use <link /> tag for fonts, not CSS import
AA-Turner 9a0064e
Fix indentation error from RST conversion
AA-Turner 9eae911
Remove duplicate table of contents
AA-Turner 54fdfc2
Fix footnote fixing
AA-Turner c766f77
Use tango pygments style
AA-Turner e1fa5c1
Update page header
AA-Turner b8fcf1a
Add border to PEP header table
AA-Turner 616976e
Remove compat file
AA-Turner 76c3670
Merge customsidebar.html into page.html
AA-Turner 3de7610
Disambiguate and rename pep theme as such
AA-Turner ecd1074
Handle index file for directory and file building
AA-Turner 99027b5
Change footer metadata to paragraphs from spans
AA-Turner 1c82ea8
Simplify new title node logic
AA-Turner 256f807
Update & further simplify styles
AA-Turner e0027e5
Add notes on colours used
AA-Turner 2ca667e
Update admonition colours
AA-Turner 0ded9fd
Simplify the mask email algorithm
AA-Turner ed1d6cd
Stop using .settings.pep_base_url in various places
AA-Turner 1905480
Remove unneeded escapes in page.html
AA-Turner a4ca92e
Add clean up step for deployments
AA-Turner 8c3daaa
Update selectors for sphinx 4
AA-Turner b968c1a
Register PEPTranslator for dirhtml builder
AA-Turner ae433d1
Add meta description
AA-Turner 029ad2e
Update config values dependent on builder used
AA-Turner cda149f
Update create_index_file for multiple builders
AA-Turner d5a5e7e
Fix sidebar position
AA-Turner 8d66f82
Update margins
AA-Turner e52b0da
Reduce padding and margins for smaller screens
AA-Turner e98760d
Update pep_sphinx_extensions/pep_processor/transforms/pep_contents.py
AA-Turner bc3d560
Remove recursion check in Contents
AA-Turner ab8c2c1
Fix literal markup in PEP titles
AA-Turner 792e013
Remove extraneous links within section titles
AA-Turner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.