diff --git a/README.md b/README.md index d7c04ea..05ce666 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,8 @@ Useful related runtime patterns: Useful helpers for that data model now include: - `DTree::get_by_path("a/b/c")` for path-style config traversal without creating missing keys +- `DTree::has("key")` / `key("key")` for non-mutating child lookup, and `get_or_create("key")` when creation is intended +- `DTree::to_u64()`, `to_s64()`, `to_f64()`, `to_bool()`, and `to_stringmap()` for typed reads from structured values - `json_encode(String)` for emitting JavaScript-safe string literals directly - `ascii_safe_name(String)` for conservative ASCII identifier normalization - `path_join(base, child)` for filesystem-style path assembly diff --git a/etc/uce/settings.cfg b/etc/uce/settings.cfg index 41dfb26..56933fa 100644 --- a/etc/uce/settings.cfg +++ b/etc/uce/settings.cfg @@ -14,6 +14,16 @@ PRECOMPILE_FILES_IN= # PUBLIC SITE DIRECTORY USED FOR STARTUP SCAN WHEN PRECOMPILE_FILES_IN IS EMPTY SITE_DIRECTORY=site +# ENABLE JIT COMPILATION WHEN A PAGE REQUEST HITS A STALE OR MISSING UNIT +JIT_COMPILE_ON_REQUEST=1 + +# ENABLE THE BACKGROUND PROACTIVE COMPILER LOOP +PROACTIVE_COMPILE_ENABLED=1 + +# AFTER A FAILED COMPILE, SERVE THE LAST COMPILER OUTPUT AND WAIT THIS MANY SECONDS +# BEFORE TRYING AGAIN IF THE SOURCE FILE HAS NOT CHANGED +COMPILE_FAILURE_RETRY_SECONDS=10 + # PERIODIC KNOWN-.uce RECHECK INTERVAL IN SECONDS PROACTIVE_COMPILE_CHECK_INTERVAL=60 diff --git a/site/doc/areas/time.txt b/site/doc/areas/time.txt index b085287..1506cef 100644 --- a/site/doc/areas/time.txt +++ b/site/doc/areas/time.txt @@ -3,5 +3,6 @@ Time and Date Functions time_precise time time_format_local +time_format_relative time_format_utc time_parse diff --git a/site/doc/index.uce b/site/doc/index.uce index 0f38682..2072212 100644 --- a/site/doc/index.uce +++ b/site/doc/index.uce @@ -23,6 +23,8 @@ RENDER(Request& context) { String page = first(context.get["p"], "index"); + String page_title = page; + nibble(page_title, "_"); <>
@@ -34,7 +36,7 @@ RENDER(Request& context) UCE Docs if(page != "index") { - ?> / = page ?> + ?> / = page_title ?> } ?> @@ -78,6 +80,14 @@ RENDER(Request& context) } + else if(ft.substr(0, 2) == "3_") + { + String fn = ft; + String pre = nibble(fn, "_"); + ?> + + + } else { ?> @@ -135,18 +145,28 @@ RENDER(Request& context) { auto doc = split(file_get_contents("pages/"+page+".txt"), "\n"); - // Pre-extract related lines for sidebar - StringList rel_lines; - bool in_rel = false; + // Pre-extract sidebar-only sections so the article body stays focused. + StringList equiv_lines; + StringList see_lines; + String sidebar_section = ""; for(auto s : doc) { - if(s == ":related") { in_rel = true; } - else if(s != "" && s.substr(0, 1) == ":") { in_rel = false; } - else if(in_rel && s != "") { rel_lines.push_back(s); } + if(s != "" && s.substr(0, 1) == ":") + { + sidebar_section = s.substr(1); + } + else if(sidebar_section == "related" && s != "") + { + equiv_lines.push_back(s); + } + else if(sidebar_section == "see" && s != "") + { + see_lines.push_back(s); + } } String detail_class = "detail-layout"; - if(rel_lines.size() == 0) detail_class += " no-sidebar"; + if(equiv_lines.size() == 0 && see_lines.size() == 0) detail_class += " no-sidebar"; ?>