-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add last updated date to template context #38
Comments
I want to make sure I understand how the manifest file is being used at the moment. The manfiest file Currently, the manfiest file is generated in the base directory and not in the If we decide to use the manifest file to provide a def handle(self, *args, **kwargs):
manifest = Manifest(manifest_file=get_output_json())
is_force = "force" in options and options["force"] is True
is_skipped = False
for path in get_content_paths():
item = ManifestItem.create(markdown_file)
existing_item = self.manifest.get(markdown_file)
if existing_item and not is_force:
if item.mtime == existing_item.mtime:
is_skipped = True
elif item.md5 == existing_item.md5:
# Update item in manifest to get newest mtime
self.manifest.add(markdown_file)
is_skipped = True
if not is_skipped:
self.manifest.add(markdown_file)
if manifest.is_dirty:
manifest.write_data() This is a basic example of how it might work, I've left out multithreading stuff for now. The code above is copied from the existing Also, in an def get_output_json() -> Path:
"""
Get the path of the JSON manifest `output.json` file.
"""
try:
return settings.COLTRANE["OUTPUT"]["MANIFEST"]
except (AttributeError, KeyError):
pass
return get_base_directory() / "output.json" |
My thought was that output.json shouldn't be served with the static html from the output directory. |
Either
last_updated_date
ormodified_date
.Some more thoughts #29 (comment) and #29 (comment).
The text was updated successfully, but these errors were encountered: