-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add per-file overrides using field lists (#50)
* Use field lists to implement per page overrides * Move location where quotes are escaped so that it will work with per page overrides and in general will only happen when it becomes a html tag and starts mattering. * Add title override * Add documentation for field lists * Fix empty field lists from crashing * Add tests * Refractor to use fields.get to get the values * Run black * Add arbitrary tags support * Add tests for arbitrary tags * Add documentation for arbitrary tags * Prevent creation of multiple tags with the same property * Revert "Prevent creation of multiple tags with the same property" This reverts commit 0f3e4a8. * Rework overrides and arbitrary tags and slightly change syntax * Update readme.md and adjust image:alt functionality * Apply suggestions from code review Co-authored-by: Vasista Vovveti <[email protected]> * Run black * Remove any support for relative paths with field lists and add a note * Revert relative url behaviour * Change readme to align with previous commit * Disable relative file paths with field lists * Fix typo in comments Co-authored-by: Dalton Smith <[email protected]> * Update README.md Co-authored-by: Vasista Vovveti <[email protected]> Co-authored-by: Dalton Smith <[email protected]>
- Loading branch information
1 parent
985d069
commit d5db5c4
Showing
10 changed files
with
165 additions
and
27 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
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 @@ | ||
extensions = ["sphinxext.opengraph"] | ||
|
||
master_doc = "index" | ||
exclude_patterns = ["_build"] | ||
|
||
html_theme = "basic" | ||
|
||
ogp_site_url = "http://example.org/" |
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,4 @@ | ||
:og:video: http://example.org/video.mp4 | ||
:og:video:type: video/mp4 | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at lorem ornare, fringilla massa nec, venenatis mi. Donec erat sapien, tincidunt nec rhoncus nec, scelerisque id diam. Orci varius natoque penatibus et magnis dis parturient mauris. |
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,10 @@ | ||
extensions = ["sphinxext.opengraph"] | ||
|
||
master_doc = "index" | ||
exclude_patterns = ["_build"] | ||
|
||
html_theme = "basic" | ||
|
||
ogp_site_name = "Example's Docs!" | ||
ogp_site_url = "http://example.org/" | ||
ogp_image_alt = "Example Alt Text" |
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,7 @@ | ||
:ogp_description_length: 10 | ||
:og:image: img/sample.jpg | ||
:og:image:alt: Overridden Alt Text | ||
|
||
Lorem Ipsum | ||
=========== | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at lorem ornare, fringilla massa nec, venenatis mi. Donec erat sapien, tincidunt nec rhoncus nec, scelerisque id diam. Orci varius natoque penatibus et magnis dis parturient mauris. |
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,11 @@ | ||
extensions = ["sphinxext.opengraph"] | ||
|
||
master_doc = "index" | ||
exclude_patterns = ["_build"] | ||
|
||
html_theme = "basic" | ||
|
||
ogp_site_name = "Example's Docs!" | ||
ogp_site_url = "http://example.org/" | ||
ogp_image = "http://example.org/image.png" | ||
ogp_type = "book" |
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 @@ | ||
:og:description: Overridden description | ||
:og:title: Overridden Title | ||
:og:type: article | ||
:og:image: http://example.org/overridden-image.png | ||
|
||
Lorem Ipsum | ||
=========== | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at lorem ornare, fringilla massa nec, venenatis mi. Donec erat sapien, tincidunt nec rhoncus nec, scelerisque id diam. Orci varius natoque penatibus et magnis dis parturient mauris. |
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