mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 17:16:00 +03:00
[GH-ISSUE #659] Bug: TEMPLATES_DIR cannot be changed #414
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#414
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CatalinFrancu on GitHub (Mar 5, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/659
Describe the bug
According to the Configuration wiki page, I should be able to change
TEMPLATES_DIRto customize the layout. However, I cannot seem to change it.Editing
ArchiveBox.confmanually does nothing:archivebox config --get TEMPLATES_DIRandarchivebox versionstill report the default path, which in my case (Arch Linux) is/usr/lib/python3.9/site-packages/archivebox/templates.Trying to set it via
archivebox config --set TEMPLATES_DIR=testproduces the error:This could happen because
TEMPLATES_DIRis not defined in CONFIG_SCHEMA (but don't take my word for it).Thanks for your time and thanks for ArchiveBox!
ArchiveBox version
@pirate commented on GitHub (Mar 5, 2021):
Changing that dir used to be supported but is no longer officially supported since we moved to django.
Instead for now I recommend applying a patch to the files inside
/usr/lib/python3.9/site-packages/archivebox/templatesmanually (save your changes somewhere else so that you dont lose them during updates). Future versions may bring back the override ability, but it's not high on our priority list at the moment. PRs welcome.@CatalinFrancu commented on GitHub (Mar 6, 2021):
Thank you for the explanation! It might be worth updating the wiki page to reflect this. We will probably use the frame contents only and provide our own header to integrate with the rest of the website. Sadly, I am not proficient enough in Django to be of any help. :-/
@pirate commented on GitHub (Mar 8, 2021):
Reopening this because we do want to fix this at some point. Here are the steps to fix it for anyone interested in working on this:
archivebox/config.pyarchivebox/core/settings.pyand add it to the list of TEMPLATE_DIRS@pirate commented on GitHub (Apr 6, 2021):
Ok I've added this option back in v0.6
e4823cc. It's now calledCUSTOM_TEMPLATES_DIR. Here's an example of how to use it:You can use v0.6 early by installing from the
devbranch:Or you can wait till it's officially released soon. Feel free to comment back here if you have any trouble and I'll reopen the issue.