[PR #1725] Fix: Make CUSTOM_TEMPLATES_DIR configurable again #2984

Closed
opened 2026-03-01 18:01:19 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/ArchiveBox/ArchiveBox/pull/1725

State: closed
Merged: Yes


Summary

Resolves #1484 where CUSTOM_TEMPLATES_DIR configuration was being ignored.

The setting was previously removed from ServerConfig and hardcoded as a constant, preventing users from customizing the templates directory location.

Changes

  • Added CUSTOM_TEMPLATES_DIR field to StorageConfig in common.py
  • Updated settings.py to use STORAGE_CONFIG.CUSTOM_TEMPLATES_DIR
  • Updated paths.py to use configurable value in version output

Usage

Users can now configure the custom templates directory via:

  • ArchiveBox.conf: CUSTOM_TEMPLATES_DIR = ./custom_templates
  • Environment variable: export CUSTOM_TEMPLATES_DIR=/path/to/templates
  • Defaults to DATA_DIR/user_templates if not configured

Generated with Claude Code


Summary by cubic

Restores CUSTOM_TEMPLATES_DIR configurability so users can override the templates directory. Fixes issue #1484 and updates the app to consistently use the configured path.

  • Bug Fixes

    • Added CUSTOM_TEMPLATES_DIR to StorageConfig.
    • Updated settings.py and paths.py to read STORAGE_CONFIG.CUSTOM_TEMPLATES_DIR.
  • Migration

    • Configure via ArchiveBox.conf or the CUSTOM_TEMPLATES_DIR env var.
    • Defaults to DATA_DIR/user_templates if not set.

Written for commit 329d185d95. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/ArchiveBox/ArchiveBox/pull/1725 **State:** closed **Merged:** Yes --- ## Summary Resolves #1484 where CUSTOM_TEMPLATES_DIR configuration was being ignored. The setting was previously removed from ServerConfig and hardcoded as a constant, preventing users from customizing the templates directory location. ## Changes - Added CUSTOM_TEMPLATES_DIR field to StorageConfig in common.py - Updated settings.py to use STORAGE_CONFIG.CUSTOM_TEMPLATES_DIR - Updated paths.py to use configurable value in version output ## Usage Users can now configure the custom templates directory via: - ArchiveBox.conf: `CUSTOM_TEMPLATES_DIR = ./custom_templates` - Environment variable: `export CUSTOM_TEMPLATES_DIR=/path/to/templates` - Defaults to DATA_DIR/user_templates if not configured Generated with [Claude Code](https://claude.ai/code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Restores CUSTOM_TEMPLATES_DIR configurability so users can override the templates directory. Fixes issue #1484 and updates the app to consistently use the configured path. - **Bug Fixes** - Added CUSTOM_TEMPLATES_DIR to StorageConfig. - Updated settings.py and paths.py to read STORAGE_CONFIG.CUSTOM_TEMPLATES_DIR. - **Migration** - Configure via ArchiveBox.conf or the CUSTOM_TEMPLATES_DIR env var. - Defaults to DATA_DIR/user_templates if not set. <sup>Written for commit 329d185d95d43cdd1a48cf92562bcb10de1d52c8. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
kerem 2026-03-01 18:01:19 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2984
No description provided.