Pi66

Home | Repos | About | Blog | Gaza

merodi
A markdown-based static site generator.
git clone https://git.pi66.xyz/merodi

About | Files | Commits | Refs | License


feat: add on_page_skip hook for skipped pages

Author: pi66
Date: 2026-07-18 00:38
commit: 2a44635f

Stat

A src/build.py 1 +1 -0
A src/hooks.py 1 +1 -0

Diff

diff --git a/src/build.py b/src/build.py
index 6063035..f95bbf5 100644
--- a/src/build.py
+++ b/src/build.py
@@ -186,6 +186,7 @@ def compile_file(md_file, html_dest, config=None, plugins=None, force:bool = Fal
     if config and not force:
         hash = handle_hash_sync(config, md_file)
         if  hash is None and path.exists(html_dest):
+            hook_call("on_page_skip", md_file)
             info(f"Skipping {GRAY(md_file)}...")
             return None 

diff --git a/src/hooks.py b/src/hooks.py index 1c8f15c..050bde9 100644 --- a/src/hooks.py +++ b/src/hooks.py @@ -6,6 +6,7 @@ hooks = { "on_config_load" : None, "on_escape_code" : None, "on_file_changed" : None, ...

Show all

diff --git a/src/build.py b/src/build.py
index 6063035..f95bbf5 100644
--- a/src/build.py
+++ b/src/build.py
@@ -186,6 +186,7 @@ def compile_file(md_file, html_dest, config=None, plugins=None, force:bool = Fal
     if config and not force:
         hash = handle_hash_sync(config, md_file)
         if  hash is None and path.exists(html_dest):
+            hook_call("on_page_skip", md_file)
             info(f"Skipping {GRAY(md_file)}...")
             return None 

diff --git a/src/hooks.py b/src/hooks.py index 1c8f15c..050bde9 100644 --- a/src/hooks.py +++ b/src/hooks.py @@ -6,6 +6,7 @@ hooks = { "on_config_load" : None, "on_escape_code" : None, "on_file_changed" : None, + "on_page_skip" : None, "on_hash_check" : None, "on_hash_written" : None, "on_highlight_config" : None,

// Created by Pi66

// Copyright ©Pi66 2026