Closed zedseven closed 6 months ago
As I outlined in the issue thread, let's first find out how we want to handle this breaking change if we want it. Happy to continue discussion here once we are all on the same page :)
As commented in https://github.com/dbrgn/tealdeer/issues/320#issuecomment-1937775105, I think it's valuable to print a warning when pages with .page
or .patch
extension are found in the custom pages directory. This will be a small performance hit, but we can remove it again after 1-2 releases.
@zedseven would you be willing to add such a check?
Could you add a breaking change warning to the docs?
diff --git a/docs/src/usage_custom_pages.md b/docs/src/usage_custom_pages.md
index 7024abd..d5d0f89 100644
--- a/docs/src/usage_custom_pages.md
+++ b/docs/src/usage_custom_pages.md
@@ -1,5 +1,13 @@
# Custom Pages and Patches
+> ⚠️ **Breaking change in version 1.7.0:** The file name extension for custom
+> pages and patches was changed:
+>
+> - `<name>.page` → `<name>.page.md`
+> - `<name>.patch` → `<name>.patch.md`
+>
+> If you have custom pages or patches, you need to rename them.
+
Tealdeer allows creating new custom pages, overriding existing pages as well as
extending existing pages.
The branch also needs a rebase against main
.
I've added the temporary check (when looking up any command), added your warning to the docs, rebased the branch onto the latest main
, and fixed a bug I noticed with my initial implementation.
My rationale for this PR is in #320. Closes #320.
To summarise, the lack of a
.md
extension causes problems for external tools working with the custom page files, and my solution is to simply add the extension to the end.e.g.
{name}.page.md
{name}.patch.md
This will be a breaking change for anyone using custom pages.