Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the search and replace approach makes sense, but is somewhat fragile. If the pytorch_sphinx_theme footer updates, we will no longer update the link to have the correct policy.

The fix should probably be upstream, where this link is currently set.

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"
author = "Torch Contributors"

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