diff --git a/examples/talkorigins-modern.site.json b/examples/talkorigins-modern.site.json index e2bfa14..904cafb 100644 --- a/examples/talkorigins-modern.site.json +++ b/examples/talkorigins-modern.site.json @@ -2,7 +2,7 @@ "lang": "en", "title": "TalkOrigins Archive: Modernized Preview", "site_title": "TalkOrigins Archive", - "description": "A SciSiteForge proof-of-concept for the www2.talkorigins.org modernization line.", + "description": "A SciSiteForge proof-of-concept for poc1.talkorigins.org and the TalkOrigins Archive modernization line.", "license": "CC BY-SA 4.0", "github_url": "https://git.cns.fyi/welsberr/talkorigins-modern", "contact_email": "feedback@talkorigins.org", @@ -35,52 +35,59 @@ ] }, "navigation": [ - { "label": "Home", "href": "/" }, - { "label": "Support", "href": "/foundation/2026-update/" }, - { "label": "Search", "href": "/search/" } + { "label": "Start Here", "href": "#start" }, + { "label": "Key Resources", "href": "#resources" }, + { "label": "Search", "href": "https://www.talkorigins.org/search/" }, + { "label": "Roadmap", "href": "#roadmap" }, + { "label": "Support", "href": "#roadmap" } ], "hero": { "kicker": "Archive Preview", - "title": "A cleaner, more readable TalkOrigins Archive that still feels like the Archive.", - "lede": "Modernization is already underway: stable Archive articles, dynamic sister-site commentary, corpus-aware search, and claim-centered notebooks can coexist without collapsing into a single CMS.", + "title": "A clearer front door for the TalkOrigins Archive.", + "lede": "The modernization work keeps the Archive's stable reference role while making it easier for a first-time reader to find explanations, claims, search tools, and sister Foundation resources.", "actions": [ - { "label": "Open the preview", "href": "/#overview", "primary": true }, - { "label": "View support update", "href": "/foundation/2026-update/", "primary": false } + { "label": "Start with the overview", "href": "#start", "primary": true }, + { "label": "See the roadmap", "href": "#roadmap", "primary": false } ] }, "content": { "feature_cards": [ { - "title": "Stable Archive, Modern Access", - "body": "The preview keeps the Archive's durable explanatory role while making the reading surface responsive, easier to scan, and easier to route through search.", - "href": "/", - "meta": "modernization" + "title": "New to the topic?", + "body": "Start with readable explanations that separate the scientific issues from the rhetoric around them.", + "href": "https://www.talkorigins.org/faqs/faq-misconceptions.html", + "meta": "Archive guide", + "link_label": "Read a sample FAQ" }, { - "title": "Foundation Search", - "body": "Search can select among TalkOrigins, TalkDesign, Panda's Thumb, Panda's Thumb MT, and the Index to Creationist Claims as separate corpora.", - "href": "/search/", - "meta": "workbench" + "title": "Looking for a specific claim?", + "body": "The Index to Creationist Claims gives readers a direct path from a familiar claim to a response and references.", + "href": "https://www.talkorigins.org/indexcc/", + "meta": "Claim index", + "link_label": "Open the Index" }, { - "title": "Support Update", - "body": "The public update explains that modernization is already underway and that the stable Archive/dynamic commentary split is intentional.", - "href": "/foundation/2026-update/", - "meta": "public proof" + "title": "Searching across Foundation sites?", + "body": "Foundation search keeps TalkOrigins, TalkDesign, Panda's Thumb, Panda's Thumb MT, and the claim index as distinct selectable corpora.", + "href": "https://www.talkorigins.org/search/", + "meta": "Search", + "link_label": "Search the sites" } ], "section_cards": [ { "title": "Featured FAQ: Misconceptions", "body": "A representative long-form Archive article demonstrates how legacy explanatory material can be presented in the modern theme.", - "href": "/faqs/faq-misconceptions/", - "meta": "Archive article" + "href": "https://www.talkorigins.org/faqs/faq-misconceptions.html", + "meta": "Archive article", + "link_label": "Read the FAQ" }, { "title": "Featured Claim: CA100", "body": "A representative Index to Creationist Claims entry shows the claim-centered path into evidence and rebuttal material.", - "href": "/indexcc/CA100/", - "meta": "Index claim" + "href": "https://www.talkorigins.org/indexcc/CA/CA100.html", + "meta": "Index claim", + "link_label": "Read the claim entry" } ], "bibliography_entries": [ @@ -107,18 +114,18 @@ "notebooks": [ { "id": "evidence-and-claims", - "title": "Evidence and Claims Notebook", - "summary": "A reusable study module that can connect stable Archive articles, Index to Creationist Claims entries, guided concepts, and bibliography updates.", - "audience": "self-learners, instructors, and board-reviewed site editors", + "title": "Evidence and Claims Reading Path", + "summary": "A guided path can connect stable Archive articles, Index to Creationist Claims entries, search results, and bibliography updates without hiding where each source came from.", + "audience": "interested lay readers, instructors, and site editors", "goals": [ "Move from a claim to the relevant evidence and archive context", "Keep stable source material separate from dynamic commentary", - "Expose provenance, citations, and review status as first-class study material" + "Show provenance, citations, and review status as part of the reading experience" ], "apps": [ { "title": "Public search", - "href": "/search/", + "href": "https://www.talkorigins.org/search/", "description": "Search across Foundation corpora and the Index to Creationist Claims" } ], @@ -126,5 +133,27 @@ "max_items": 8 } ], + "roadmap": [ + { + "title": "Replace the preview placeholders with real Archive pages", + "status": "Next", + "body": "Use the modernization theme on selected high-value FAQs and claim pages so readers can evaluate actual content, not just a shell." + }, + { + "title": "Promote corpus-aware Foundation search", + "status": "Next", + "body": "Make search visible from each Foundation-associated domain with Index and local-domain corpora selected by default." + }, + { + "title": "Connect support messaging to visible modernization work", + "status": "Planned", + "body": "Use the proof-of-concept site to show that the Archive is being actively maintained while preserving the stable Archive and dynamic commentary split." + }, + { + "title": "Add guided reading paths", + "status": "Planned", + "body": "Generalize the notebook pattern into reader-friendly paths that help users move from questions, claims, and classroom needs to reliable Archive material." + } + ], "content_sources": {} } diff --git a/scisiteforge/content.py b/scisiteforge/content.py index e15add6..4323dc4 100644 --- a/scisiteforge/content.py +++ b/scisiteforge/content.py @@ -17,6 +17,7 @@ class ContentCard: meta: str = "" kind: str = "feature" source: str = "" + link_label: str = "Read More" @dataclass(slots=True) @@ -42,6 +43,7 @@ def cards_from_config(items: list[dict[str, Any]], *, default_kind: str) -> list meta=str(item.get("meta") or item.get("kind") or default_kind), kind=str(item.get("kind") or default_kind), source=str(item.get("source") or item.get("id") or title.lower().replace(" ", "-")), + link_label=str(item.get("link_label") or item.get("label") or "Read More"), ) ) return cards diff --git a/scripts/build.py b/scripts/build.py index 4de5e4e..9c84fb3 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -69,6 +69,8 @@ def _language_options_html(languages: list[dict[str, str]], current_lang: str) - for item in languages if item.get("coverage", True) or item.get("code") == current_lang ] + if len(visible_languages) <= 1: + return "" return "\n".join( f'' for item in visible_languages @@ -85,6 +87,41 @@ def _language_policy_html(language_policy: dict[str, Any]) -> str: return f'

Planned languages: {planned_names}

' +def _roadmap_html(roadmap: list[dict[str, Any]], language_policy: dict[str, Any]) -> str: + items = [] + for item in roadmap: + if not isinstance(item, dict): + continue + title = html_escape(item.get("title", "Roadmap item")) + body = html_escape(item.get("body", "")) + status = html_escape(item.get("status", "Planned")) + items.append(f'
  • {title} {status}

    {body}

  • ') + planned_languages = language_policy.get("planned_languages", []) + planned_names = ", ".join( + html_escape(item.get("name", item.get("code", ""))) + for item in planned_languages + if isinstance(item, dict) and (item.get("name") or item.get("code")) + ) + if planned_names: + items.append( + '
  • Multilingual access Planned' + f'

    Language options will appear only when reviewed coverage exists. Target languages under consideration: {planned_names}.

  • ' + ) + if not items: + return "" + return '" + + +def _language_selector_html(language_options: str) -> str: + if not language_options: + return "" + return ( + '" + ) + + def _hero_actions_html(actions: list[dict[str, Any]]) -> str: if not actions: return "" @@ -120,7 +157,7 @@ def _render_cards(cards: list, template_path: str | Path, lang: str) -> str: "section_excerpt": html_escape(card.body), "section_path": html_escape(card.source or card.title.lower().replace(" ", "-")), "href": html_escape(card.href), - "link_label": "Open", + "link_label": html_escape(card.link_label), }, ) ) @@ -175,6 +212,7 @@ def build_site(config_file: str | Path, output_dir: str | Path) -> dict[str, Any "page_class": html_escape(theme.page_class), "navigation_html": _navigation_html(config.get("navigation", [])), "language_options": _language_options_html(languages, config.get("lang", "en")), + "language_selector_html": _language_selector_html(_language_options_html(languages, config.get("lang", "en"))), "language_policy_html": _language_policy_html(language_policy), "hero_kicker": html_escape(hero.get("kicker", theme.display_name)), "hero_title": html_escape(hero.get("title", config.get("title", ""))), @@ -188,6 +226,7 @@ def build_site(config_file: str | Path, output_dir: str | Path) -> dict[str, Any for card in site_content.bibliography_entries ), "notebook_html": render_notebooks(notebooks, site_content), + "roadmap_html": _roadmap_html(config.get("roadmap", []), language_policy), } page_context.update( { diff --git a/templates/app-card.html b/templates/app-card.html index 7b6c578..3546c96 100644 --- a/templates/app-card.html +++ b/templates/app-card.html @@ -1,5 +1,5 @@

    {{ app_title }}

    {{ app_description }}

    - Launch App + {{ link_label }}
    diff --git a/templates/notebook-section.html b/templates/notebook-section.html index c4f80eb..757083e 100644 --- a/templates/notebook-section.html +++ b/templates/notebook-section.html @@ -2,6 +2,6 @@

    {{ section_title }}

    {{ section_meta }}

    {{ section_excerpt }}

    - + {{ link_label }}
    diff --git a/tests/test_scisiteforge.py b/tests/test_scisiteforge.py index 80b1abd..2dd4548 100644 --- a/tests/test_scisiteforge.py +++ b/tests/test_scisiteforge.py @@ -109,6 +109,7 @@ class SciSiteForgeTests(unittest.TestCase): "body": "Corpus-aware search entry point.", "href": "/search/", "meta": "workbench", + "link_label": "Search", } ], default_kind="feature", @@ -118,6 +119,7 @@ class SciSiteForgeTests(unittest.TestCase): self.assertEqual(cards[0].kind, "feature") self.assertEqual(cards[0].href, "/search/") self.assertEqual(cards[0].meta, "workbench") + self.assertEqual(cards[0].link_label, "Search") def test_build_site_renders_selected_theme_and_content(self) -> None: from tempfile import TemporaryDirectory @@ -236,10 +238,11 @@ class SciSiteForgeTests(unittest.TestCase): build.build_site(config_path, out_dir) html = (out_dir / "index.html").read_text(encoding="utf-8") - self.assertIn('', html) + self.assertNotIn(' - {{ language_options }} - - {{ language_policy_html }} + {{ language_selector_html }} @@ -46,27 +43,27 @@
    -

    Framework

    -

    Modular, static, and reviewable

    -

    This theme is intended to prove the modernization line without giving up the archive posture.

    +

    What This Is

    +

    A preview of a working modernization path

    +

    The Archive remains a stable reference library. The redesign makes that library easier to read, search, and connect to sister Foundation resources.

    -
    -

    Feature cards

    +
    +

    Start Here

    {{ feature_cards_html }}
    -
    -

    Notebook and app content

    +
    +

    Key Resources

    {{ notebook_html }}
    {{ section_cards_html }} @@ -74,12 +71,17 @@
    -
    -

    Bibliography

    +
    +

    Reference Context

      {{ bibliography_html }}
    + +
    +

    Roadmap

    + {{ roadmap_html }} +