[PR #1725] [MERGED] Fix: Make CUSTOM_TEMPLATES_DIR configurable again #1475

Closed
opened 2026-03-01 14:49:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/1725
Author: @pirate
Created: 12/29/2025
Status: Merged
Merged: 12/29/2025
Merged by: @pirate

Base: devHead: claude/issue-1484-20251229-2146


📝 Commits (1)

  • 329d185 Fix: Make CUSTOM_TEMPLATES_DIR configurable again

📊 Changes

3 files changed (+12 additions, -8 deletions)

View changed files

📝 archivebox/config/common.py (+4 -0)
📝 archivebox/config/paths.py (+4 -4)
📝 archivebox/core/settings.py (+4 -4)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/1725 **Author:** [@pirate](https://github.com/pirate) **Created:** 12/29/2025 **Status:** ✅ Merged **Merged:** 12/29/2025 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `dev` ← **Head:** `claude/issue-1484-20251229-2146` --- ### 📝 Commits (1) - [`329d185`](https://github.com/ArchiveBox/ArchiveBox/commit/329d185d95d43cdd1a48cf92562bcb10de1d52c8) Fix: Make CUSTOM_TEMPLATES_DIR configurable again ### 📊 Changes **3 files changed** (+12 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `archivebox/config/common.py` (+4 -0) 📝 `archivebox/config/paths.py` (+4 -4) 📝 `archivebox/core/settings.py` (+4 -4) </details> ### 📄 Description ## 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. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 14:49:57 +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#1475
No description provided.