Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,22 @@
var collapsedSections = ['Introduction', 'Getting Started', 'Tutorials']
</script> -->

<script script type="text/javascript">
<script type="text/javascript">
var collapsedSections = []
</script>

<script type="text/javascript">
// Override footer links to Meta's Terms and Privacy Policy
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, we use pytorch-sphinx-theme, which have these links to privacy and terms in raw html. We can't directly override it in our layout.html. As such, we would have to use javascript to replace those links.

We could also ask pytorch-sphinx-theme if they could wrap these links in an overridable block but Im not sure if it makes sense for them to support that.

document.addEventListener('DOMContentLoaded', function() {
var termsLink = document.querySelector('.privacy-policy a[href*="linuxfoundation.org/terms"]');
if (termsLink) {
termsLink.href = 'https://opensource.fb.com/legal/terms/';
}

var privacyLink = document.querySelector('.privacy-policy a[href*="linuxfoundation.org/privacy"]');
if (privacyLink) {
privacyLink.href = 'https://opensource.fb.com/legal/privacy/';
}
});
</script>
{% endblock %}
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def __call__(self, filename):
master_doc = "index"

# General information about the project.
copyright = "2023-present, TorchCodec Contributors"
copyright = "©2023 Meta Platforms, Inc"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meta Open Source policy has a script regex that requires the copyright symbol to appear after "Copyright." This will result in a double copyright symbol effectively and render as © Copyright ©2023 Meta Platforms, Inc.The official PyTorch docs also have a double copyright symbol

Alternatively, we could replace the footer's copyright section using JavaScript

author = "Torch Contributors"

# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down
Loading