Skip to content

Commit

Permalink
Add {{ theme_ver }} for cache busting
Browse files Browse the repository at this point in the history
  • Loading branch information
nomicode committed Jan 18, 2021
1 parent a68448e commit 811fba4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/crate/theme/rtd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__

def get_version():
return __version__

def current_dir():
return os.path.abspath(os.path.dirname(__file__))

Expand Down
3 changes: 3 additions & 0 deletions src/crate/theme/rtd/conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
# segment analytics configuration
'tracking_segment_id': environ.get('TRACKING_SEGMENT_ID', ''),
'tracking_project': '',

# Can be used the query string of a resource URL for HTTP cache busting
"ver": theme.get_version(),
}
html_extra_path = ["_extra"]
sitemap_filename = "site.xml"
Expand Down
3 changes: 3 additions & 0 deletions src/crate/theme/rtd/crate/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ canonical_url =
# segment.io tracking ID
tracking_segment_id =
tracking_project =

# Can be used the query string of a resource URL for HTTP cache busting
ver =

0 comments on commit 811fba4

Please sign in to comment.