diff --git a/_config.yml b/_config.yml index 680b6c3f74..aaf2d5d0b4 100644 --- a/_config.yml +++ b/_config.yml @@ -20,9 +20,13 @@ description: "Class of 2026" owner_name: Open Coding Society github_username: open-coding-society github_repo: "pages" -baseurl: "" +baseurl: "" future: true +# OCS Assistant: load the floating chatbot site-wide by default. Any page can +# override per-page with `ocs_bot: false` (or `true`) in its front matter. +ocs_bot: true + # Exclude from Jekyll watch - these are processed by our conversion scripts # This prevents double-regeneration when saving notebooks/docx files exclude: diff --git a/_includes/custom-head.html b/_includes/custom-head.html index 84f72b1c41..eea8160b8d 100644 --- a/_includes/custom-head.html +++ b/_includes/custom-head.html @@ -2,4 +2,20 @@ {% include head-custom.html %} + +{%- comment -%} + OCS Assistant — loaded CONDITIONALLY per page (not force-embedded everywhere). + A page loads the floating assistant when `ocs_bot: true` is in its front matter, + or it inherits the site-wide default `ocs_bot` from _config.yml. Turn it off on a + single page with `ocs_bot: false`, or flip the whole site from _config.yml. The + legacy `disable_ocs_bot: true` opt-out is still honored. +{%- endcomment -%} +{%- assign ocs_bot_on = site.ocs_bot -%} +{%- unless page.ocs_bot == nil -%}{%- assign ocs_bot_on = page.ocs_bot -%}{%- endunless -%} +{%- if page.disable_ocs_bot -%}{%- assign ocs_bot_on = false -%}{%- endif -%} +{%- if ocs_bot_on -%} + + + +{%- endif -%} \ No newline at end of file diff --git a/_layouts/search.html b/_layouts/search.html index ec3c099d0d..b0c8f6121e 100644 --- a/_layouts/search.html +++ b/_layouts/search.html @@ -6,6 +6,11 @@ + + + + +