jekyll-theme-modootoday 1.4.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +172 -1
- data/README.ko.md +41 -12
- data/README.md +41 -12
- data/RULES.md +30 -13
- data/_includes/footer-custom.html +4 -5
- data/_includes/modootoday/assets/imports.html +14 -0
- data/_includes/modootoday/assets/preload.html +11 -0
- data/_includes/modootoday/assets/registry.html +95 -0
- data/_includes/modootoday/assets/scripts.html +39 -0
- data/_includes/modootoday/assets/sheets.html +28 -0
- data/_includes/modootoday/assets/site-scripts.html +25 -0
- data/_includes/modootoday/assets/site-sheets.html +10 -0
- data/_includes/modootoday/assets/url.html +5 -0
- data/_includes/modootoday/blog/home-list.html +26 -0
- data/_includes/modootoday/blog/home-posts.html +6 -0
- data/_includes/modootoday/breadcrumb.html +9 -10
- data/_includes/modootoday/chart/figure.html +4 -0
- data/_includes/modootoday/chart/table.html +14 -0
- data/_includes/modootoday/chrome/footer.html +16 -0
- data/_includes/modootoday/chrome/nav-sheet.html +13 -0
- data/_includes/modootoday/chrome/showcase.html +13 -0
- data/_includes/modootoday/config.html +20 -15
- data/_includes/modootoday/detail/page.html +28 -0
- data/_includes/modootoday/directory/item.html +4 -2
- data/_includes/modootoday/directory/items.html +7 -2
- data/_includes/modootoday/directory/jsonld.html +2 -2
- data/_includes/modootoday/directory/list.html +4 -2
- data/_includes/modootoday/directory/self.html +8 -0
- data/_includes/modootoday/doc/pagination.html +1 -1
- data/_includes/modootoday/doc/sidebar.html +1 -1
- data/_includes/modootoday/doc/twin.html +5 -4
- data/_includes/modootoday/docs-extra/jsonld.html +7 -7
- data/_includes/modootoday/docs-extra/packages.html +3 -3
- data/_includes/modootoday/filter/controls.html +4 -0
- data/_includes/modootoday/head-meta.html +14 -11
- data/_includes/modootoday/home-url.html +1 -1
- data/_includes/modootoday/i18n/ar.html +1 -1
- data/_includes/modootoday/i18n/de.html +1 -1
- data/_includes/modootoday/i18n/el.html +1 -1
- data/_includes/modootoday/i18n/es.html +1 -1
- data/_includes/modootoday/i18n/fa.html +1 -1
- data/_includes/modootoday/i18n/fr.html +1 -1
- data/_includes/modootoday/i18n/id.html +1 -1
- data/_includes/modootoday/i18n/it.html +1 -1
- data/_includes/modootoday/i18n/ja.html +1 -1
- data/_includes/modootoday/i18n/ko.html +1 -1
- data/_includes/modootoday/i18n/ml.html +1 -1
- data/_includes/modootoday/i18n/pl.html +1 -1
- data/_includes/modootoday/i18n/pt-BR.html +1 -1
- data/_includes/modootoday/i18n/ro.html +1 -1
- data/_includes/modootoday/i18n/ru.html +1 -1
- data/_includes/modootoday/i18n/th.html +1 -1
- data/_includes/modootoday/i18n/tr.html +1 -1
- data/_includes/modootoday/i18n/uk.html +1 -1
- data/_includes/modootoday/i18n/ur-Latn.html +1 -1
- data/_includes/modootoday/i18n/vi.html +1 -1
- data/_includes/modootoday/i18n/zh-CN.html +1 -1
- data/_includes/modootoday/i18n/zh-TW.html +1 -1
- data/_includes/modootoday/i18n.html +142 -123
- data/_includes/modootoday/jsonld/author.html +6 -7
- data/_includes/modootoday/jsonld/breadcrumb.html +4 -4
- data/_includes/modootoday/jsonld/graph.html +1 -1
- data/_includes/modootoday/jsonld/profile.html +3 -2
- data/_includes/modootoday/jsonld/props.html +2 -2
- data/_includes/modootoday/jsonld/schema/defined-term.html +8 -0
- data/_includes/modootoday/jsonld/schema/faq.html +19 -0
- data/_includes/modootoday/jsonld/schema/learning.html +11 -0
- data/_includes/modootoday/jsonld/type.html +10 -3
- data/_includes/modootoday/jsonld/webpage.html +1 -0
- data/_includes/modootoday/lang-switch.html +1 -1
- data/_includes/modootoday/links/content.html +9 -3
- data/_includes/modootoday/lookup/crumbs.html +13 -0
- data/_includes/modootoday/lookup/page.html +9 -0
- data/_includes/modootoday/lookup/urls.html +3 -0
- data/_includes/modootoday/markdown/c/chart.html +24 -0
- data/_includes/modootoday/markdown/c/faq.html +1 -1
- data/_includes/modootoday/markdown/c/params.html +3 -2
- data/_includes/modootoday/markdown/c/widget.html +22 -0
- data/_includes/modootoday/markdown/code.html +19 -0
- data/_includes/modootoday/markdown/components.html +12 -11
- data/_includes/modootoday/markdown/figures/diagrams.html +31 -0
- data/_includes/modootoday/markdown/figures/math.html +34 -0
- data/_includes/modootoday/markdown/figures.html +8 -0
- data/_includes/modootoday/markdown/inline/chart.html +30 -0
- data/_includes/modootoday/markdown/inline/widget.html +19 -0
- data/_includes/modootoday/markdown/inline.html +5 -1
- data/_includes/modootoday/markdown/llms-pages.html +2 -2
- data/_includes/modootoday/markdown/sections.html +12 -6
- data/_includes/modootoday/markdown/split.html +3 -2
- data/_includes/modootoday/markdown/visual.html +6 -0
- data/_includes/modootoday/meta/byline.html +7 -8
- data/_includes/modootoday/meta/share.html +1 -1
- data/_includes/modootoday/nav.html +6 -6
- data/_includes/modootoday/news/notes.html +1 -1
- data/_includes/modootoday/pages/error.html +4 -2
- data/_includes/modootoday/pages/hero/poster.html +10 -0
- data/_includes/modootoday/pages/search-form.html +6 -4
- data/_includes/modootoday/pages/title.html +6 -0
- data/_includes/modootoday/profile/name.html +8 -0
- data/_includes/modootoday/records/body.html +3 -0
- data/_includes/modootoday/records/card.html +5 -0
- data/_includes/modootoday/records/facts.html +14 -0
- data/_includes/modootoday/records/lookup.html +8 -0
- data/_includes/modootoday/ref-url.html +7 -1
- data/_includes/modootoday/render/chart.html +15 -0
- data/_includes/modootoday/render/math.html +23 -7
- data/_includes/modootoday/render/mermaid.html +6 -5
- data/_includes/modootoday/search/record.html +13 -0
- data/_includes/modootoday/search.json +14 -7
- data/_includes/modootoday/site/author.html +18 -0
- data/_includes/modootoday/site/nav-auto.html +22 -0
- data/_includes/modootoday/site/nav.html +17 -0
- data/_includes/modootoday/stylesheets.html +25 -21
- data/_includes/modootoday/t.html +1 -1
- data/_includes/modootoday/theme-color.html +3 -3
- data/_includes/modootoday/version.html +2 -0
- data/_layouts/blog.html +2 -0
- data/_layouts/default.html +12 -34
- data/_layouts/detail.html +2 -26
- data/_layouts/directory.html +9 -3
- data/_layouts/doc.html +5 -4
- data/_layouts/download.html +2 -2
- data/_layouts/events.html +1 -0
- data/_layouts/feed.html +3 -3
- data/_layouts/home.html +4 -1
- data/_layouts/integrations.html +1 -0
- data/_layouts/jobs.html +1 -0
- data/_layouts/llms.html +8 -5
- data/_layouts/page.html +5 -0
- data/_layouts/portfolio.html +1 -0
- data/_layouts/reference.html +4 -2
- data/_layouts/resume.html +3 -2
- data/_layouts/search.html +2 -2
- data/_layouts/sponsors.html +1 -0
- data/_layouts/team.html +1 -0
- data/_sass/modootoday/_access.scss +6 -6
- data/_sass/modootoday/_core.scss +9 -4
- data/_sass/modootoday/_settings.scss +3 -0
- data/_sass/modootoday/_sheet.scss +4 -0
- data/_sass/modootoday/_site.scss +3 -0
- data/_sass/modootoday/base/_code.scss +21 -12
- data/_sass/modootoday/base/_prose.scss +18 -12
- data/_sass/modootoday/base/_table.scss +3 -6
- data/_sass/modootoday/blog/_article.scss +8 -3
- data/_sass/modootoday/blog/_cards.scss +15 -13
- data/_sass/modootoday/blog/_index.scss +2 -0
- data/_sass/modootoday/blog/_news.scss +1 -1
- data/_sass/modootoday/blog/_post.scss +1 -1
- data/_sass/modootoday/components/chrome/_showcase.scss +40 -0
- data/_sass/modootoday/components/core/chrome/_breadcrumb.scss +7 -3
- data/_sass/modootoday/components/core/chrome/_header.scss +26 -0
- data/_sass/modootoday/components/core/chrome/_nav.scss +15 -20
- data/_sass/modootoday/components/core/chrome/_pagination.scss +12 -4
- data/_sass/modootoday/components/core/chrome/_theme-toggle.scss +2 -2
- data/_sass/modootoday/components/core/inline/_badge.scss +10 -6
- data/_sass/modootoday/components/core/inline/_callout.scss +5 -5
- data/_sass/modootoday/components/core/inline/_code-copy.scss +34 -8
- data/_sass/modootoday/components/core/inline/_code.scss +7 -5
- data/_sass/modootoday/components/core/inline/_cta.scss +6 -6
- data/_sass/modootoday/components/core/inline/_embed.scss +1 -1
- data/_sass/modootoday/components/core/inline/_figure.scss +5 -4
- data/_sass/modootoday/components/core/inline/_hero.scss +9 -5
- data/_sass/modootoday/components/core/inline/_kbd.scss +1 -1
- data/_sass/modootoday/components/core/inline/_reveal.scss +3 -1
- data/_sass/modootoday/components/data/_chart.scss +25 -0
- data/_sass/modootoday/components/doc/_sidebar.scss +29 -12
- data/_sass/modootoday/components/doc/_toc.scss +5 -4
- data/_sass/modootoday/components/figure/_figure-svg.scss +3 -1
- data/_sass/modootoday/components/filter/_filter.scss +14 -0
- data/_sass/modootoday/components/footer/_footer.scss +13 -0
- data/_sass/modootoday/components/media/_diagram.scss +14 -0
- data/_sass/modootoday/components/media/_widget.scss +7 -0
- data/_sass/modootoday/components/search/_search.scss +23 -14
- data/_sass/modootoday/components/section/showcase/_card.scss +20 -11
- data/_sass/modootoday/components/section/showcase/_cta.scss +5 -3
- data/_sass/modootoday/components/section/showcase/_linkcards.scss +11 -7
- data/_sass/modootoday/components/section/showcase/_pricing.scss +19 -9
- data/_sass/modootoday/components/section/showcase/_quote.scss +4 -3
- data/_sass/modootoday/components/section/structure/_accordion.scss +7 -1
- data/_sass/modootoday/components/section/structure/_params.scss +1 -2
- data/_sass/modootoday/components/section/structure/_steps.scss +1 -1
- data/_sass/modootoday/components/section/structure/_tabs.scss +14 -6
- data/_sass/modootoday/components/section/structure/_timeline.scss +13 -3
- data/_sass/modootoday/components/table/_table.scss +65 -0
- data/_sass/modootoday/components/table-stack/_table-stack.scss +22 -0
- data/_sass/modootoday/components/visual/_visual.scss +9 -0
- data/_sass/modootoday/detail/_index.scss +3 -0
- data/_sass/modootoday/detail/_page.scss +2 -0
- data/_sass/modootoday/directory/_grid.scss +7 -0
- data/_sass/modootoday/directory/_index.scss +3 -0
- data/_sass/modootoday/docs-extra/_index.scss +3 -0
- data/_sass/modootoday/docs-extra/_page.scss +15 -10
- data/_sass/modootoday/hero/_index.scss +2 -0
- data/_sass/modootoday/hero/_layout.scss +10 -7
- data/_sass/modootoday/kit/_button.scss +5 -5
- data/_sass/modootoday/kit/_measure.scss +5 -0
- data/_sass/modootoday/layout/_shell.scss +7 -21
- data/_sass/modootoday/marketing/_index.scss +3 -0
- data/_sass/modootoday/marketing/_page.scss +11 -7
- data/_sass/modootoday/marketing/_pricing.scss +6 -5
- data/_sass/modootoday/pages/_actions.scss +5 -4
- data/_sass/modootoday/pages/_error.scss +7 -3
- data/_sass/modootoday/pages/_index.scss +3 -0
- data/_sass/modootoday/pages/_legal.scss +3 -3
- data/_sass/modootoday/pages/_search.scss +3 -1
- data/_sass/modootoday/registry/_hooks.scss +13 -0
- data/_sass/modootoday/resume/_index.scss +3 -0
- data/_sass/modootoday/resume/_page.scss +1 -1
- data/_sass/modootoday/tokens/_code-presets.scss +17 -0
- data/_sass/modootoday/tokens/_fonts.scss +17 -0
- data/_sass/modootoday/tokens/_merge.scss +4 -0
- data/_sass/modootoday/tokens/_primitive.scss +4 -2
- data/_sass/modootoday/tokens/_scale.scss +9 -0
- data/_sass/modootoday/tokens/_semantic.scss +18 -11
- data/_sass/modootoday/tools/_functions.scss +9 -0
- data/_sass/modootoday.scss +6 -2
- data/assets/css/modootoday/chrome/banner.scss +8 -0
- data/assets/css/modootoday/chrome/doc-nav.scss +8 -0
- data/assets/css/modootoday/chrome/footer.scss +8 -0
- data/assets/css/modootoday/{search.scss → chrome/search.scss} +1 -2
- data/assets/css/modootoday/chrome/showcase.scss +8 -0
- data/assets/css/modootoday/{terminal.scss → chrome/terminal.scss} +1 -2
- data/assets/css/modootoday/content/code.scss +8 -0
- data/assets/css/modootoday/content/extras.scss +8 -0
- data/assets/css/modootoday/content/inline.scss +8 -0
- data/assets/css/modootoday/{lists.scss → content/lists.scss} +1 -2
- data/assets/css/modootoday/{loading.scss → content/loading.scss} +1 -2
- data/assets/css/modootoday/data/chart.scss +7 -0
- data/assets/css/modootoday/data/filter.scss +7 -0
- data/assets/css/modootoday/data/table-stack.scss +7 -0
- data/assets/css/modootoday/data/table.scss +7 -0
- data/assets/css/modootoday/docs/doc.scss +7 -0
- data/assets/css/modootoday/marketing/hero.scss +8 -0
- data/assets/css/modootoday/media/figure.scss +8 -0
- data/assets/css/modootoday/media/visual.scss +7 -0
- data/assets/css/modootoday/media/widget.scss +7 -0
- data/assets/css/modootoday/{bleed.scss → structure/bleed.scss} +1 -2
- data/assets/css/modootoday.scss +3 -2
- data/assets/js/modootoday/blog/share.js +34 -0
- data/assets/js/modootoday/chrome/menu.js +51 -0
- data/assets/js/modootoday/chrome/search-keys.js +56 -0
- data/assets/js/modootoday/chrome/search.js +112 -0
- data/assets/js/modootoday/chrome/showcase.js +15 -0
- data/assets/js/modootoday/chrome/theme-init.js +3 -0
- data/assets/js/modootoday/chrome/theme-toggle.js +36 -0
- data/assets/js/modootoday/content/code-copy.js +59 -0
- data/assets/js/modootoday/content/scroll-region.js +84 -0
- data/assets/js/modootoday/data/chart-table.js +16 -0
- data/assets/js/modootoday/data/chart.js +106 -0
- data/assets/js/modootoday/data/filter-chips.js +30 -0
- data/assets/js/modootoday/data/filter.js +62 -0
- data/assets/js/modootoday/data/table-stack.js +60 -0
- data/assets/js/modootoday/dom/config.js +32 -0
- data/assets/js/modootoday/structure/accordion.js +25 -0
- data/assets/js/modootoday/structure/tabs.js +51 -0
- data/assets/js/modootoday/text/normalize.js +28 -0
- data/assets/js/modootoday/theme/current.js +38 -0
- data/exe/modootoday-stubs +7 -0
- data/i18n/ar.yml +16 -2
- data/i18n/de.yml +16 -2
- data/i18n/el.yml +16 -2
- data/i18n/en.yml +16 -2
- data/i18n/es.yml +16 -2
- data/i18n/fa.yml +16 -2
- data/i18n/fr.yml +16 -2
- data/i18n/id.yml +16 -2
- data/i18n/it.yml +16 -2
- data/i18n/ja.yml +17 -3
- data/i18n/ko.yml +17 -3
- data/i18n/languages.yml +2 -1
- data/i18n/ml.yml +16 -2
- data/i18n/pl.yml +16 -2
- data/i18n/pt-BR.yml +16 -2
- data/i18n/ro.yml +16 -2
- data/i18n/ru.yml +16 -2
- data/i18n/th.yml +16 -2
- data/i18n/tr.yml +16 -2
- data/i18n/uk.yml +16 -2
- data/i18n/ur-Latn.yml +16 -2
- data/i18n/vi.yml +16 -2
- data/i18n/zh-CN.yml +17 -3
- data/i18n/zh-TW.yml +17 -3
- data/lib/jekyll-theme-modootoday.rb +14 -6
- data/lib/modootoday/check/build/aliases.rb +79 -0
- data/lib/modootoday/check/build/build_output.rb +58 -0
- data/lib/modootoday/check/build/byte_exact.rb +55 -0
- data/lib/modootoday/check/build/records.rb +39 -0
- data/lib/modootoday/check/build/showcase.rb +27 -0
- data/lib/modootoday/check/build/site_assets.rb +59 -0
- data/lib/modootoday/check/build/structured_data/nested.rb +29 -0
- data/lib/modootoday/check/{structured_data.rb → build/structured_data.rb} +15 -3
- data/lib/modootoday/check/build/term_sets.rb +46 -0
- data/lib/modootoday/check/build/third_party.rb +33 -0
- data/lib/modootoday/check/{twins.rb → build/twins.rb} +31 -14
- data/lib/modootoday/check/cli.rb +12 -5
- data/lib/modootoday/check/config/keys/appearance/chrome.rb +13 -0
- data/lib/modootoday/check/config/keys/appearance/color_scheme.rb +10 -0
- data/lib/modootoday/check/config/keys/appearance/components.rb +13 -0
- data/lib/modootoday/check/config/keys/appearance/showcase.rb +57 -0
- data/lib/modootoday/check/config/keys/appearance/switches.rb +15 -0
- data/lib/modootoday/check/config/keys/appearance/tokens.rb +31 -0
- data/lib/modootoday/check/config/keys/figures/chart.rb +16 -0
- data/lib/modootoday/check/config/keys/figures/diagrams.rb +31 -0
- data/lib/modootoday/check/config/keys/pages/content.rb +25 -0
- data/lib/modootoday/check/config/keys/pages/edit_url.rb +10 -0
- data/lib/modootoday/check/config/keys/pages/languages.rb +17 -0
- data/lib/modootoday/check/config/keys/pages/search.rb +47 -0
- data/lib/modootoday/check/config/keys/pages/twins.rb +30 -0
- data/lib/modootoday/check/config/keys/serving/csp.rb +9 -0
- data/lib/modootoday/check/config/keys/serving/delivery.rb +66 -0
- data/lib/modootoday/check/config/keys.rb +21 -0
- data/lib/modootoday/check/{renderers.rb → config/renderers.rb} +36 -61
- data/lib/modootoday/check/config/schema.rb +23 -0
- data/lib/modootoday/check/config/site_config.rb +25 -0
- data/lib/modootoday/check/config/source_mode.rb +18 -0
- data/lib/modootoday/check/config/validate.rb +47 -0
- data/lib/modootoday/check/context.rb +11 -5
- data/lib/modootoday/check/layouts/directory.rb +10 -2
- data/lib/modootoday/check/layouts/docs_extra.rb +3 -3
- data/lib/modootoday/check/layouts/profile.rb +21 -0
- data/lib/modootoday/check/layouts/shells.rb +2 -0
- data/lib/modootoday/check/layouts.rb +5 -1
- data/lib/modootoday/check/native/collections.rb +47 -0
- data/lib/modootoday/check/native/layouts.rb +43 -0
- data/lib/modootoday/check/native/sources.rb +27 -0
- data/lib/modootoday/check/{a11y → page/a11y}/new_window.rb +5 -5
- data/lib/modootoday/check/page/chart.rb +91 -0
- data/lib/modootoday/check/{component_rules.rb → page/component_rules.rb} +1 -1
- data/lib/modootoday/check/page/figures/diagrams.rb +64 -0
- data/lib/modootoday/check/page/figures/freshness.rb +55 -0
- data/lib/modootoday/check/page/figures/math_static.rb +88 -0
- data/lib/modootoday/check/page/filter.rb +63 -0
- data/lib/modootoday/check/page/hero_script.rb +39 -0
- data/lib/modootoday/check/page/math_notation.rb +36 -0
- data/lib/modootoday/check/{page_sections.rb → page/page_sections.rb} +5 -3
- data/lib/modootoday/check/{page_syntax.rb → page/page_syntax.rb} +4 -1
- data/lib/modootoday/check/page/pages.rb +65 -0
- data/lib/modootoday/check/page/widget.rb +66 -0
- data/lib/modootoday/check/{i18n.rb → registry/i18n.rb} +8 -30
- data/lib/modootoday/check/registry/i18n_pages.rb +80 -0
- data/lib/modootoday/check/{registry.rb → registry/registry.rb} +1 -1
- data/lib/modootoday/check/source/site_hook.rb +65 -0
- data/lib/modootoday/check.rb +30 -15
- data/lib/modootoday/figures.rb +88 -0
- data/lib/modootoday/i18n/page_lang.rb +56 -0
- data/lib/modootoday/i18n/source_rev.rb +26 -0
- data/lib/modootoday/i18n.rb +6 -0
- data/lib/modootoday/markdown.rb +46 -0
- data/lib/modootoday/schema/compat/minima.yml +8 -0
- data/lib/modootoday/schema/compat/minimal-mistakes.yml +16 -0
- data/lib/modootoday/schema/rules.rb +1 -0
- data/lib/modootoday/stubs/aliases.rb +61 -0
- data/lib/modootoday/stubs/cli.rb +77 -0
- data/lib/modootoday/stubs/page.rb +19 -0
- data/lib/modootoday/stubs/plan.rb +43 -0
- data/lib/modootoday/stubs/records.rb +101 -0
- data/lib/modootoday/stubs/report.rb +31 -0
- data/lib/modootoday/stubs/source.rb +87 -0
- data/lib/modootoday/stubs/twins.rb +40 -0
- data/lib/modootoday/stubs/writer.rb +19 -0
- data/lib/modootoday/stubs.rb +24 -0
- metadata +189 -43
- data/assets/css/modootoday/doc.scss +0 -10
- data/assets/css/modootoday/figure.scss +0 -8
- data/assets/js/modootoday/accordion.js +0 -13
- data/assets/js/modootoday/code-copy.js +0 -29
- data/assets/js/modootoday/menu.js +0 -19
- data/assets/js/modootoday/scroll-region.js +0 -14
- data/assets/js/modootoday/search-keys.js +0 -18
- data/assets/js/modootoday/search.js +0 -31
- data/assets/js/modootoday/share.js +0 -16
- data/assets/js/modootoday/tabs.js +0 -26
- data/assets/js/modootoday/theme-init.js +0 -2
- data/assets/js/modootoday/theme-toggle.js +0 -17
- data/lib/modootoday/check/build_output.rb +0 -39
- data/lib/modootoday/check/markdown.rb +0 -39
- data/lib/modootoday/check/pages.rb +0 -32
- data/lib/modootoday/check/site_config.rb +0 -88
- /data/lib/modootoday/check/{built_parts.rb → build/built_parts.rb} +0 -0
- /data/lib/modootoday/check/{blog.rb → layouts/blog.rb} +0 -0
- /data/lib/modootoday/check/{a11y → page/a11y}/content.rb +0 -0
- /data/lib/modootoday/check/{a11y → page/a11y}/illustration.rb +0 -0
- /data/lib/modootoday/check/{page_values.rb → page/page_values.rb} +0 -0
- /data/lib/modootoday/check/{slots.rb → page/slots.rb} +0 -0
- /data/lib/modootoday/check/{gh_render.rb → source/gh_render.rb} +0 -0
- /data/lib/modootoday/check/{github_pages.rb → source/github_pages.rb} +0 -0
- /data/lib/modootoday/check/{stylesheets.rb → source/stylesheets.rb} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
{%- comment -%}"author" property:
|
|
2
|
-
|
|
3
|
-
{%-
|
|
4
|
-
{%- if
|
|
5
|
-
{%-
|
|
6
|
-
{
|
|
7
|
-
{"@type":"Person","name":{{ _ld_ad.name | default: _ld_a | jsonify }}{% if _ld_ad.url %},"url":{{ _ld_ad.url | absolute_url | jsonify }}{% endif %}}{% unless forloop.last %},{% endunless %}
|
|
1
|
+
{%- comment -%}"author" property: the page's authors as site/author.html resolves them (front matter, then
|
|
2
|
+
site.modootoday.schema.author, then site.author). Each becomes a Person with name and, when known, an absolute url.{%- endcomment -%}
|
|
3
|
+
{%- include modootoday/site/author.html -%}
|
|
4
|
+
{%- if mt_authors.size > 0 -%},"author":[
|
|
5
|
+
{%- for _ld_a in mt_authors -%}
|
|
6
|
+
{"@type":"Person","name":{{ _ld_a.name | default: _ld_a | jsonify }}{% if _ld_a.url %},"url":{{ _ld_a.url | absolute_url | jsonify }}{% endif %}}{% unless forloop.last %},{% endunless %}
|
|
8
7
|
{%- endfor -%}]{%- endif -%}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{%- comment -%}BreadcrumbList (#breadcrumb) from the page URL, like modootoday/breadcrumb.html: home, each parent directory that
|
|
2
2
|
is a page, then the page. Not printed on the home page or a /<lang>/ home.{%- endcomment -%}
|
|
3
|
-
{%-
|
|
4
|
-
{%-
|
|
3
|
+
{%- include modootoday/lookup/crumbs.html lang=_ld_lang -%}
|
|
4
|
+
{%- assign _ld_segs = page.url | split: "/" -%}{%- assign _ld_home = mt_crumb_home -%}{%- assign _ld_start = mt_crumb_start -%}
|
|
5
5
|
{%- if page.url != _ld_home and page.url != "/" -%}
|
|
6
|
-
{%- assign _ld_hp =
|
|
6
|
+
{%- assign _ld_hp = mt_crumb_pages | where: "url", _ld_home | first -%}{%- assign _ld_n = 1 -%}
|
|
7
7
|
,{"@type":"BreadcrumbList","@id":{{ _ld_url | append: "#breadcrumb" | jsonify }},"itemListElement":[{"@type":"ListItem","position":1,"name":{{ _ld_hp.short_title | default: _ld_hp.title | default: mt_site_title | default: site.title | default: "Home" | strip_html | jsonify }},"item":{{ _ld_home | absolute_url | jsonify }}}
|
|
8
8
|
{%- assign _ld_acc = _ld_home -%}
|
|
9
9
|
{%- for _s in _ld_segs offset: 1 -%}{%- if forloop.index > _ld_start and _s != "" and _s != "index.html" -%}
|
|
10
10
|
{%- assign _ld_acc = _ld_acc | append: _s | append: "/" -%}
|
|
11
11
|
{%- if _ld_acc == page.url or forloop.last -%}{%- assign _ld_n = _ld_n | plus: 1 -%}
|
|
12
12
|
,{"@type":"ListItem","position":{{ _ld_n }},"name":{{ _ld_title | jsonify }},"item":{{ _ld_url | jsonify }}}
|
|
13
|
-
{%- else -%}{%- assign _ld_pp =
|
|
13
|
+
{%- else -%}{%- assign _ld_pp = mt_crumb_pages | where: "url", _ld_acc | first -%}{%- if _ld_pp -%}{%- assign _ld_n = _ld_n | plus: 1 -%}
|
|
14
14
|
,{"@type":"ListItem","position":{{ _ld_n }},"name":{{ _ld_pp.title | default: _s | strip_html | jsonify }},"item":{{ _ld_acc | absolute_url | jsonify }}}
|
|
15
15
|
{%- endif -%}{%- endif -%}
|
|
16
16
|
{%- endif -%}{%- endfor -%}]}
|
|
@@ -5,7 +5,7 @@ an Article type or a front matter entity), BreadcrumbList (#breadcrumb). Absolut
|
|
|
5
5
|
front matter schema: false no JSON-LD on that page
|
|
6
6
|
"<" is printed as \u003c, so the block never closes the script element early (CSP-safe: data, not script).{%- endcomment -%}
|
|
7
7
|
{%- assign _ld = site.modootoday.schema -%}
|
|
8
|
-
{%- unless site.modootoday.seo == false or _ld == false or _ld.enabled == false or page.schema == false or page.jsonld == false or site.url == nil -%}
|
|
8
|
+
{%- unless site.modootoday.seo == false or _ld == false or _ld.enabled == false or page.schema == false or page.jsonld == false or site.url == nil or site.url == "" -%}
|
|
9
9
|
{%- include modootoday/jsonld/type.html -%}
|
|
10
10
|
{%- assign _ld_root = "/" | absolute_url -%}
|
|
11
11
|
{%- assign _ld_url = page.url | absolute_url -%}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{%- comment -%}mainEntity of a links or resume ProfilePage (inside jsonld/webpage.html), unless schema: sets mainEntity:
|
|
2
|
-
a Person (or profile: organization) named
|
|
2
|
+
a Person (or profile: organization) named by profile/name.html, with image, jobTitle (page.headline), email and sameAs from
|
|
3
3
|
page.links / page.profiles urls that are absolute.{%- endcomment -%}
|
|
4
4
|
{%- unless page.schema.mainEntity -%}
|
|
5
5
|
{%- assign _pf = page.links | default: page.profiles -%}
|
|
6
|
-
{%-
|
|
6
|
+
{%- include modootoday/profile/name.html -%}
|
|
7
|
+
{%- assign _pn = mt_profile_name | default: _ld_title -%}
|
|
7
8
|
,"mainEntity":{"@type":{% if page.profile == "organization" %}"Organization"{% else %}"Person"{% endif %},"@id":{{ _ld_url | append: "#main" | jsonify }},"name":{{ _pn | jsonify }}
|
|
8
9
|
{%- if page.image %},"image":{{ page.image | absolute_url | jsonify }}{% endif -%}
|
|
9
10
|
{%- if page.headline %},"jobTitle":{{ page.headline | jsonify }}{% endif -%}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
{%- comment -%}Front matter schema: map printed as properties (skips type, page_type). Keys are schema.org property names;
|
|
1
|
+
{%- comment -%}Front matter schema: map printed as properties (skips type, page_type, faq). Keys are schema.org property names;
|
|
2
2
|
values go through jsonify; nested type: keys print as @type; date keys with a time print as ISO 8601. Use absolute URLs or site paths starting with / (printed absolute) for url, image, logo, sameAs.{%- endcomment -%}
|
|
3
3
|
{%- assign _ld_urlkeys = "url image logo sameAs item contentUrl embedUrl applicationUrl downloadUrl" | split: " " -%}
|
|
4
4
|
{%- assign _ld_datekeys = "datePosted validThrough startDate endDate datePublished dateModified dateCreated uploadDate" | split: " " -%}
|
|
5
5
|
{%- for _ld_kv in page.schema -%}{%- assign _ld_k = _ld_kv[0] -%}
|
|
6
|
-
{%- unless _ld_k == "type" or _ld_k == "page_type" -%}
|
|
6
|
+
{%- unless _ld_k == "type" or _ld_k == "page_type" or _ld_k == "faq" -%}
|
|
7
7
|
{%- assign _ld_v = _ld_kv[1] -%}
|
|
8
8
|
{%- assign _ld_s = _ld_v | append: "" -%}{%- assign _ld_c = _ld_s | slice: 0, 1 -%}{%- assign _ld_c2 = _ld_s | slice: 0, 2 -%}
|
|
9
9
|
{%- if _ld_urlkeys contains _ld_k and _ld_c == "/" and _ld_c2 != "//" -%}{%- assign _ld_v = _ld_v | absolute_url -%}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{%- comment -%}A DefinedTerm page (#main), each property skipped when schema: sets it: inDefinedTermSet from term_set (a site path
|
|
2
|
+
points at that glossary page's #main DefinedTermSet node; an absolute URL is printed as it is) and termCode from term_code.{%- endcomment -%}
|
|
3
|
+
{%- assign _ts = page.term_set -%}
|
|
4
|
+
{%- if _ts and page.schema.inDefinedTermSet == nil -%}
|
|
5
|
+
{%- assign _tsc = _ts | slice: 0, 1 -%}
|
|
6
|
+
{%- if _tsc == "/" %},"inDefinedTermSet":{"@id":{{ _ts | absolute_url | append: "#main" | jsonify }}}{% else %},"inDefinedTermSet":{{ _ts | jsonify }}{% endif -%}
|
|
7
|
+
{%- endif -%}
|
|
8
|
+
{%- if page.term_code and page.schema.termCode == nil %},"termCode":{{ page.term_code | append: "" | jsonify }}{% endif -%}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{%- comment -%}mainEntity of an FAQPage from its c: faq sections (schema.faq: auto, inside jsonld/webpage.html): each details summary is
|
|
2
|
+
a Question name and the rest of that details, without pre blocks, its Answer text. The visible text is the only source,
|
|
3
|
+
so the structured data cannot drift from it. No question prints an empty list, which modootoday-check rejects.{%- endcomment -%}
|
|
4
|
+
{%- assign _fq_n = 0 -%}
|
|
5
|
+
,"mainEntity":[
|
|
6
|
+
{%- assign _fq_secs = content | split: '<section class="mt-section mt-c-faq' -%}
|
|
7
|
+
{%- for _fs in _fq_secs offset: 1 -%}
|
|
8
|
+
{%- assign _fq_qs = _fs | split: "</section>" | first | split: '<details class="mt-details"><summary>' -%}
|
|
9
|
+
{%- for _q in _fq_qs offset: 1 -%}
|
|
10
|
+
{%- assign _fq_h = _q | split: "</summary>" | first -%}
|
|
11
|
+
{%- assign _fq_a = _q | remove_first: _fq_h | remove_first: "</summary>" | split: "</details>" | first -%}
|
|
12
|
+
{%- assign _fq_ps = _fq_a | split: "<pre" -%}{%- assign _fq_a = _fq_ps[0] -%}
|
|
13
|
+
{%- for _p in _fq_ps offset: 1 -%}{%- assign _fq_c = _p | split: "</pre>" | first -%}{%- assign _fq_r = _p | remove_first: _fq_c | remove_first: "</pre>" -%}{%- assign _fq_a = _fq_a | append: " " | append: _fq_r -%}{%- endfor -%}
|
|
14
|
+
{%- assign _fq_h = _fq_h | strip_html | normalize_whitespace | replace: "<", "<" | replace: ">", ">" | replace: """, '"' | replace: "'", "'" | replace: "&", "&" -%}
|
|
15
|
+
{%- assign _fq_a = _fq_a | strip_html | normalize_whitespace | replace: "<", "<" | replace: ">", ">" | replace: """, '"' | replace: "'", "'" | replace: "&", "&" -%}
|
|
16
|
+
{%- if _fq_n > 0 %},{% endif -%}{%- assign _fq_n = _fq_n | plus: 1 -%}
|
|
17
|
+
{"@type":"Question","name":{{ _fq_h | jsonify }},"acceptedAnswer":{"@type":"Answer","text":{{ _fq_a | jsonify }}}}
|
|
18
|
+
{%- endfor -%}
|
|
19
|
+
{%- endfor -%}]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{%- comment -%}Learning properties of a Course or LearningResource node (#main), each skipped when schema: sets it: provider
|
|
2
|
+
(#publisher), educationalLevel (level), timeRequired (the lesson minutes of modules, else minutes), teaches,
|
|
3
|
+
learningResourceType (resource_type).{%- endcomment -%}
|
|
4
|
+
{%- assign _sc = page.schema -%}
|
|
5
|
+
{%- unless _sc.provider %},"provider":{"@id":{{ _ld_root | append: "#publisher" | jsonify }}}{% endunless -%}
|
|
6
|
+
{%- if page.level and _sc.educationalLevel == nil %},"educationalLevel":{{ page.level | jsonify }}{% endif -%}
|
|
7
|
+
{%- assign _min = 0 -%}{%- for m in page.modules -%}{%- for l in m.lessons -%}{%- assign _min = _min | plus: l.minutes -%}{%- endfor -%}{%- endfor -%}
|
|
8
|
+
{%- if _min == 0 and page.minutes -%}{%- assign _min = page.minutes | plus: 0 -%}{%- endif -%}
|
|
9
|
+
{%- if _min > 0 and _sc.timeRequired == nil %},"timeRequired":"PT{{ _min }}M"{% endif -%}
|
|
10
|
+
{%- if page.teaches and _sc.teaches == nil %},"teaches":{{ page.teaches | jsonify }}{% endif -%}
|
|
11
|
+
{%- if page.resource_type and _sc.learningResourceType == nil %},"learningResourceType":{{ page.resource_type | jsonify }}{% endif -%}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
{%- comment -%}Resolves the page's schema.org type into _ld_type and its kind into _ld_kind (page | article | entity).
|
|
2
|
-
Order: front matter schema.type, then
|
|
3
|
-
|
|
2
|
+
Order: front matter schema.type, then FAQPage when schema.faq is auto (front matter, else site) and a c: faq section exists
|
|
3
|
+
(_ld_faqs), then site.modootoday.schema.layouts[<layout>], then the theme's layout map, then WebPage. A directory layout's
|
|
4
|
+
self-detail (directory/self.html) counts as its detail layout.{%- endcomment -%}
|
|
5
|
+
{%- assign _ld_faq = _ld.faq -%}{%- if page.schema.faq != nil -%}{%- assign _ld_faq = page.schema.faq -%}{%- endif -%}
|
|
6
|
+
{%- assign _ld_faqs = false -%}
|
|
7
|
+
{%- if _ld_faq == "auto" -%}{%- for _s in page.sections -%}{%- if _s.c == "faq" -%}{%- assign _ld_faqs = true -%}{%- endif -%}{%- endfor -%}{%- endif -%}
|
|
8
|
+
{%- assign _ld_type = page.schema.type -%}{%- if _ld_type == nil and _ld_faqs -%}{%- assign _ld_type = "FAQPage" -%}{%- endif -%}
|
|
9
|
+
{%- include modootoday/directory/self.html -%}{%- assign _ld_layout = mt_self_detail | default: page.layout -%}
|
|
10
|
+
{%- assign _ld_type = _ld_type | default: site.modootoday.schema.layouts[_ld_layout] -%}
|
|
4
11
|
{%- unless _ld_type -%}
|
|
5
|
-
{%- case
|
|
12
|
+
{%- case _ld_layout -%}
|
|
6
13
|
{%- when "post" -%}{%- assign _ld_type = "BlogPosting" -%}
|
|
7
14
|
{%- when "news-article" -%}{%- assign _ld_type = "NewsArticle" -%}
|
|
8
15
|
{%- when "project" -%}{%- assign _ld_type = "CreativeWork" -%}
|
|
@@ -7,6 +7,7 @@ name, url, description, image and inLanguage mirror the Open Graph tags; mainEnt
|
|
|
7
7
|
{%- if _ld_img %},"primaryImageOfPage":{"@type":"ImageObject","url":{{ _ld_img | absolute_url | jsonify }}}{% endif -%}
|
|
8
8
|
{%- if page.url != "/" %},"breadcrumb":{"@id":{{ _ld_url | append: "#breadcrumb" | jsonify }}}{% endif -%}
|
|
9
9
|
{%- if _ld_kind != "page" %},"mainEntity":{"@id":{{ _ld_url | append: "#main" | jsonify }}}{% endif -%}
|
|
10
|
+
{%- if _ld_faqs and _ld_type == "FAQPage" and page.schema.mainEntity == nil -%}{%- include modootoday/jsonld/schema/faq.html -%}{%- endif -%}
|
|
10
11
|
{%- if _ld_type == "ProfilePage" and page.layout == "links" or _ld_type == "ProfilePage" and page.layout == "resume" -%}{%- include modootoday/jsonld/profile.html -%}{%- endif -%}
|
|
11
12
|
{%- if page.layout == "hub" and page.cards and page.schema.hasPart == nil %},"hasPart":[{% for c in page.cards %}{% unless forloop.first %},{% endunless %}{"@type":"WebPage","name":{{ c.title | jsonify }},"url":{{ c.url | absolute_url | jsonify }}}{% endfor %}]{% endif -%}
|
|
12
13
|
{%- if page.layout == "legal" -%}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{%- if _ls_cur != _ls_def -%}{%- assign _ls_pre = "/" | append: _ls_cur -%}{%- assign _ls_base = page.url | remove_first: _ls_pre -%}{%- endif -%}
|
|
15
15
|
{%- include modootoday/i18n.html lang=_ls_cur -%}{%- assign _ls_label = mt_t_languages_label -%}
|
|
16
16
|
{%- capture _ls_curname -%}{%- include modootoday/i18n/name.html code=_ls_cur -%}{%- endcapture -%}{%- assign _ls_curname = site.data.i18n[_ls_cur].language | default: _ls_curname -%}
|
|
17
|
-
{%-
|
|
17
|
+
{%- include modootoday/lookup/urls.html -%}
|
|
18
18
|
{%- capture _ls_items -%}
|
|
19
19
|
{%- for _l in site.modootoday.languages -%}
|
|
20
20
|
{%- if page.ref -%}{%- include modootoday/ref-url.html ref=page.ref lang=_l exact=true -%}{%- assign _ls_alt = mt_ref_url | default: "/-none-/" -%}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{%- comment -%}Filters rendered page content (include.html): bare "#" sample links stay "#" instead of baseurl + "/#";
|
|
2
2
|
Markdown links titled "new-window" ([text](url "new-window"), portable), or with kramdown {: .mt-new-window} or target="_blank", get rel, the data hook and the hint; with
|
|
3
|
-
site.modootoday.external_links.new_window, external links (not starting with site.url) open in a new window too.
|
|
3
|
+
site.modootoday.external_links.new_window, external links (not starting with site.url) open in a new window too.
|
|
4
|
+
Every table is wrapped in div.mt-table, the scroll region the table sheet styles and scroll-region.js labels.
|
|
5
|
+
Front matter diagrams: and static math (on pages with a math block) first swap their sources for static figures (markdown/figures.html).{%- endcomment -%}
|
|
4
6
|
{%- assign _hash = "#" | relative_url | prepend: 'href="' | append: '"' -%}
|
|
5
7
|
{%- assign _nwa = ' target="_blank" rel="noopener noreferrer" data-mt-new-window aria-describedby="mt-new-window-hint"' -%}
|
|
6
|
-
{%- assign _h = include.html -%}{%-
|
|
8
|
+
{%- assign _h = include.html -%}{%- assign _hm = false -%}{%- assign _hx = site.modootoday.math -%}
|
|
9
|
+
{%- if _hx.mode == "static" and _hx.enabled != false and page.math != false -%}{%- if _h contains "language-math" or _h contains "\[" -%}{%- assign _hm = true -%}{%- endif -%}{%- endif -%}
|
|
10
|
+
{%- if page.diagrams or _hm -%}{%- capture _h %}{% include modootoday/markdown/figures.html html=_h math=_hm %}{% endcapture -%}{%- endif -%}
|
|
11
|
+
{%- if _hash contains "#" -%}{%- assign _h = _h | replace: _hash, 'href="#"' -%}{%- endif -%}
|
|
7
12
|
{%- assign _nwc = _nwa | prepend: 'class="mt-new-window"' -%}{%- assign _nwt = _nwa | append: ">" -%}
|
|
8
13
|
{%- if _h contains 'target="_blank">' -%}{%- assign _h = _h | replace: ' target="_blank">', _nwt -%}{%- endif -%}
|
|
9
14
|
{%- if _h contains ' title="new-window"' -%}{%- assign _h = _h | replace: ' title="new-window"', _nwa -%}{%- endif -%}
|
|
@@ -11,6 +16,7 @@
|
|
|
11
16
|
{%- if site.modootoday.external_links.new_window -%}
|
|
12
17
|
{%- assign _ext = _nwa | prepend: "<a" | append: ' href="http' -%}
|
|
13
18
|
{%- assign _h = _h | replace: '<a href="http', _ext -%}
|
|
14
|
-
{%- if site.url -%}{%- assign _own = _nwa | prepend: "<a" | append: ' href="' | append: site.url -%}{%- assign _ownr = '<a href="' | append: site.url -%}{%- assign _h = _h | replace: _own, _ownr -%}{%- endif -%}
|
|
19
|
+
{%- if site.url and site.url != "" -%}{%- assign _own = _nwa | prepend: "<a" | append: ' href="' | append: site.url -%}{%- assign _ownr = '<a href="' | append: site.url -%}{%- assign _h = _h | replace: _own, _ownr -%}{%- endif -%}
|
|
15
20
|
{%- endif -%}
|
|
21
|
+
{%- if _h contains "<table" -%}{%- assign _h = _h | replace: "<table", '<div class="mt-table"><table' | replace: "</table>", "</table></div>" -%}{%- endif -%}
|
|
16
22
|
{{ _h }}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{%- comment -%}Sets mt_crumb_home, mt_crumb_start and mt_crumb_pages (the home and parent pages that exist) for the breadcrumb
|
|
2
|
+
nav and its JSON-LD; include.lang is the page language. Callers pick each page with where: "url" on this short list.{%- endcomment -%}
|
|
3
|
+
{%- assign _cr_segs = page.url | split: "/" -%}
|
|
4
|
+
{%- assign mt_crumb_home = "/" -%}{%- assign mt_crumb_start = 0 -%}{%- assign mt_crumb_pages = "" | split: "" -%}
|
|
5
|
+
{%- if _cr_segs[1] == include.lang and include.lang != site.lang -%}{%- assign mt_crumb_home = "/" | append: include.lang | append: "/" -%}{%- assign mt_crumb_start = 1 -%}{%- endif -%}
|
|
6
|
+
{%- if page.url != mt_crumb_home and page.url != "/" -%}
|
|
7
|
+
{%- include modootoday/lookup/page.html url=mt_crumb_home -%}{%- if mt_lookup_page -%}{%- assign mt_crumb_pages = mt_crumb_pages | push: mt_lookup_page -%}{%- endif -%}
|
|
8
|
+
{%- assign _cr_acc = mt_crumb_home -%}
|
|
9
|
+
{%- for _s in _cr_segs offset: 1 -%}{%- if forloop.index > mt_crumb_start and _s != "" and _s != "index.html" -%}
|
|
10
|
+
{%- assign _cr_acc = _cr_acc | append: _s | append: "/" -%}
|
|
11
|
+
{%- unless _cr_acc == page.url or forloop.last -%}{%- include modootoday/lookup/page.html url=_cr_acc -%}{%- if mt_lookup_page -%}{%- assign mt_crumb_pages = mt_crumb_pages | push: mt_lookup_page -%}{%- endif -%}{%- endunless -%}
|
|
12
|
+
{%- endif -%}{%- endfor -%}
|
|
13
|
+
{%- endif -%}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{%- comment -%}Sets mt_lookup_page to the first page whose url is include.url, or nil. The position of "|url|" in mt_page_urls
|
|
2
|
+
is its index in site.pages, so no pass over the pages is needed; the where fallback only runs if a URL holds a "|".{%- endcomment -%}
|
|
3
|
+
{%- include modootoday/lookup/urls.html -%}{%- assign mt_lookup_page = nil -%}
|
|
4
|
+
{%- assign _lk_k = "|" | append: include.url | append: "|" -%}
|
|
5
|
+
{%- if mt_page_urls contains _lk_k -%}
|
|
6
|
+
{%- assign _lk_i = mt_page_urls | split: _lk_k | first | prepend: "x" | split: "|" | size | minus: 1 -%}
|
|
7
|
+
{%- assign mt_lookup_page = site.pages[_lk_i] -%}
|
|
8
|
+
{%- if mt_lookup_page.url != include.url -%}{%- assign mt_lookup_page = site.pages | where: "url", include.url | first -%}{%- endif -%}
|
|
9
|
+
{%- endif -%}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{%- comment -%}Sets mt_page_urls ("|/|/a/|": every page URL) once per render, so "does this page exist" checks are a string
|
|
2
|
+
contains on "|url|" instead of a pass over site.pages; each pass costs one to_liquid per page.{%- endcomment -%}
|
|
3
|
+
{%- unless mt_page_urls -%}{%- assign mt_page_urls = site.pages | map: "url" | join: "|" | prepend: "|" | append: "|" -%}{%- endunless -%}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{%- comment -%}c: chart — params type (bar, line, area, pie, doughnut), stacked, horizontal and data: <name>. With data:,
|
|
2
|
+
site.data.charts[<name>] renders as a table (chart/table.html) at the end of the section and an emphasis-only paragraph
|
|
3
|
+
ending the section is its figcaption; otherwise the section's first table is the chart, captioned as inline charts are.{%- endcomment -%}
|
|
4
|
+
{%- assign _mcc_b = include.html -%}{%- assign _mcc_s = include.s -%}
|
|
5
|
+
{%- assign _mcc_q = "" -%}{%- if _mcc_s.stacked == true -%}{%- assign _mcc_q = "stacked" -%}{%- endif -%}
|
|
6
|
+
{%- if _mcc_s.horizontal == true -%}{%- assign _mcc_q = _mcc_q | append: " horizontal" | strip -%}{%- endif -%}
|
|
7
|
+
{%- assign _mcc_cap = "" -%}{%- assign _mcc_t = "" -%}{%- assign _mcc_a = "" -%}
|
|
8
|
+
{%- if _mcc_s.data -%}{%- assign _mcc_d = site.data.charts[_mcc_s.data] -%}
|
|
9
|
+
{%- if _mcc_d -%}{%- capture _mcc_t %}{% include modootoday/chart/table.html data=_mcc_d %}{% endcapture -%}{%- endif -%}
|
|
10
|
+
{%- assign _mcc_pre = _mcc_b | rstrip -%}{%- assign _mcc_e = _mcc_pre | split: "<p><em>" | last -%}
|
|
11
|
+
{%- assign _mcc_n = _mcc_e | size | minus: 9 -%}{%- assign _mcc_z = _mcc_e | slice: _mcc_n, 9 -%}{%- assign _mcc_c = _mcc_e | slice: 0, _mcc_n -%}
|
|
12
|
+
{%- if _mcc_pre contains "<p><em>" and _mcc_z == "</em></p>" and _mcc_n > 0 -%}{%- unless _mcc_c contains "<" -%}{%- assign _mcc_cap = _mcc_c -%}
|
|
13
|
+
{%- assign _mcc_n = _mcc_pre | size | minus: _mcc_e.size | minus: 7 -%}{%- assign _mcc_pre = _mcc_pre | slice: 0, _mcc_n | rstrip -%}{%- endunless -%}{%- endif -%}
|
|
14
|
+
{%- assign _mcc_pre = _mcc_pre | append: "
|
|
15
|
+
" -%}
|
|
16
|
+
{%- elsif _mcc_b contains "<table" -%}{%- assign _mcc_pre = _mcc_b | split: "<table" | first -%}
|
|
17
|
+
{%- assign _mcc_r = _mcc_b | remove_first: _mcc_pre -%}{%- assign _mcc_t = _mcc_r | split: "</table>" | first | append: "</table>" -%}
|
|
18
|
+
{%- assign _mcc_a = _mcc_r | remove_first: _mcc_t | lstrip -%}{%- assign _mcc_h = _mcc_a | slice: 0, 7 -%}
|
|
19
|
+
{%- if _mcc_h == "<p><em>" -%}{%- assign _mcc_e = _mcc_a | remove_first: "<p><em>" -%}{%- assign _mcc_c = _mcc_e | split: "</em></p>" | first -%}
|
|
20
|
+
{%- unless _mcc_c contains "<" or _mcc_c == _mcc_e -%}{%- assign _mcc_cap = _mcc_c -%}{%- assign _mcc_a = _mcc_e | remove_first: _mcc_c | remove_first: "</em></p>" -%}{%- endunless -%}
|
|
21
|
+
{%- endif -%}{%- endif -%}
|
|
22
|
+
{%- if _mcc_t == "" -%}{{ _mcc_b }}{%- else -%}{%- assign _mcc_ty = _mcc_s.type -%}
|
|
23
|
+
{{ _mcc_pre }}{% include modootoday/chart/figure.html table=_mcc_t caption=_mcc_cap type=_mcc_ty opts=_mcc_q %}{{ _mcc_a }}
|
|
24
|
+
{%- endif -%}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
{%- comment -%}c: faq — the details transform. FAQPage structured data comes from the page's single JSON-LD graph (a schema: block in front matter
|
|
1
|
+
{%- comment -%}c: faq — the details transform. FAQPage structured data comes from the page's single JSON-LD graph: schema.faq: auto reads these details back (jsonld/schema/faq.html), or a schema: block in front matter.{%- endcomment -%}
|
|
2
2
|
{%- include modootoday/markdown/c/details.html html=include.html -%}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
{%- comment -%}c: params — header cells get scope="col"; a cell holding `required` shows the params.required badge
|
|
1
|
+
{%- comment -%}c: params — header cells get scope="col"; a cell holding `required` shows the params.required badge; the table
|
|
2
|
+
stacks below 40rem (mt-table--stack) unless its own {: .class} names a variant.{%- endcomment -%}
|
|
2
3
|
{%- capture _rq %}<span class="mt-param-required">{{ mt_t_params_required }}</span>{% endcapture -%}
|
|
3
|
-
{{ include.html | replace: "<th>", '<th scope="col">' | replace: '<code class="language-plaintext highlighter-rouge">required</code>', _rq | replace: "<code>required</code>", _rq }}
|
|
4
|
+
{{ include.html | replace: "<table>", '<table class="mt-table--stack">' | replace: "<th>", '<th scope="col">' | replace: '<code class="language-plaintext highlighter-rouge">required</code>', _rq | replace: "<code>required</code>", _rq }}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{%- comment -%}c: widget — params widget (a custom element name, the element: of a modootoday.scripts entry) and props (a map of
|
|
2
|
+
scalars, written to data-props as JSON). The section text after the h2 becomes the element's light-DOM fallback, shown
|
|
3
|
+
until the element is defined (widget sheet, :defined); assets/site-scripts.html loads the module where the element is.
|
|
4
|
+
When the body ends in a [data-mt-result] box (as for c: cta), only that box's content becomes the fallback.{%- endcomment -%}
|
|
5
|
+
{%- assign _mcw_b = include.html -%}{%- assign _mcw_e = include.s.widget | append: "" -%}
|
|
6
|
+
{%- assign _mcw_h = _mcw_b | split: "</h2>" | first | append: "</h2>" -%}
|
|
7
|
+
{%- assign _mcw_t = "" -%}
|
|
8
|
+
{%- if _mcw_b contains "data-mt-result>" -%}
|
|
9
|
+
{%- assign _mcw_t = _mcw_b | append: "@" | split: "</div>" | last | remove: "@" | prepend: "</div>" -%}
|
|
10
|
+
{%- assign _mcw_n = _mcw_b | size | minus: _mcw_t.size -%}
|
|
11
|
+
{%- assign _mcw_b = _mcw_b | slice: 0, _mcw_n -%}
|
|
12
|
+
{%- assign _mcw_h = _mcw_b | split: "data-mt-result>" | first | append: "data-mt-result>" -%}
|
|
13
|
+
{%- endif -%}
|
|
14
|
+
{%- if _mcw_e contains "-" and _mcw_b contains "</h2>" -%}{%- unless _mcw_e contains "<" or _mcw_e contains '"' or _mcw_e contains " " or _mcw_e contains ">" -%}
|
|
15
|
+
{%- assign _mcw_r = _mcw_b | remove_first: _mcw_h | strip -%}
|
|
16
|
+
{%- capture _mcw_b %}{{ _mcw_h }}
|
|
17
|
+
<{{ _mcw_e }} class="mt-widget"{% if include.s.props %} data-props="{{ include.s.props | jsonify | escape }}"{% endif %}><div class="mt-widget-fallback">
|
|
18
|
+
{{ _mcw_r }}
|
|
19
|
+
</div></{{ _mcw_e }}>
|
|
20
|
+
{% endcapture -%}
|
|
21
|
+
{%- endunless -%}{%- endif -%}
|
|
22
|
+
{{ _mcw_b }}{{ _mcw_t }}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{%- comment -%}md-components v1 — code block fix-ups (called by components.html).
|
|
2
|
+
Each highlighted pre is focusable (it scrolls) and carries data-mt-line: its first line's width in 8ch steps
|
|
3
|
+
(1-16, x beyond; non-ASCII counts 2ch), so the copy button's strip appears only where that line reaches it.{%- endcomment -%}
|
|
4
|
+
{%- assign _x = include.html -%}
|
|
5
|
+
{%- assign _key = '<pre class="highlight">' -%}
|
|
6
|
+
{%- if _x contains _key -%}
|
|
7
|
+
{%- assign _nl = "
|
|
8
|
+
" -%}
|
|
9
|
+
{%- assign _bits = _x | split: _key -%}
|
|
10
|
+
{%- capture _x -%}{{ _bits[0] }}{%- for _b in _bits offset: 1 -%}
|
|
11
|
+
{%- assign _l = _b | split: _nl | first | strip_html | replace: "<", "<" | replace: ">", ">" | replace: """, '"' | replace: "'", "'" | replace: "&", "&" -%}
|
|
12
|
+
{%- assign _w = 0 -%}
|
|
13
|
+
{%- assign _cs = _l | split: "" -%}
|
|
14
|
+
{%- for _ch in _cs limit: 130 -%}{%- if _ch > "~" -%}{%- assign _w = _w | plus: 2 -%}{%- else -%}{%- assign _w = _w | plus: 1 -%}{%- endif -%}{%- endfor -%}
|
|
15
|
+
{%- assign _k = _w | plus: 7 | divided_by: 8 -%}{%- if _k > 16 -%}{%- assign _k = "x" -%}{%- endif -%}
|
|
16
|
+
<pre class="highlight" tabindex="0" data-mt-line="{{ _k }}">{{ _b }}
|
|
17
|
+
{%- endfor -%}{%- endcapture -%}
|
|
18
|
+
{%- endif -%}
|
|
19
|
+
{{ _x }}
|
|
@@ -12,7 +12,8 @@ Usage: {% include modootoday/markdown/components.html content=content lang=page.
|
|
|
12
12
|
`since:` is not rendered in 1.0 (checker error).
|
|
13
13
|
3) figure=true: a paragraph that is only an image, followed by a paragraph that is only *emphasis*
|
|
14
14
|
→ figure.mt-figure with figcaption. Images need alt text (checker). An .svg image (a diagram) becomes
|
|
15
|
-
figure.mt-figure-svg with a focusable
|
|
15
|
+
figure.mt-figure-svg with a focusable div.mt-figure-scroll named by diagram.label and the caption, not the alt text
|
|
16
|
+
(figure sheet: dark tone, horizontal scroll).
|
|
16
17
|
4) Always: `file:`, `progress:`, `embed:` and footnote labels (modootoday/markdown/inline.html).
|
|
17
18
|
Titles/labels: modootoday/i18n.html (site _data/i18n, theme catalog, English).
|
|
18
19
|
{%- endcomment -%}
|
|
@@ -45,14 +46,12 @@ Titles/labels: modootoday/i18n.html (site _data/i18n, theme catalog, English).
|
|
|
45
46
|
{%- endfor -%}{%- endcapture -%}
|
|
46
47
|
{%- endif -%}
|
|
47
48
|
{%- if include.badges -%}
|
|
48
|
-
{%- assign _st = "available
|
|
49
|
-
{%- for
|
|
50
|
-
{%- assign _kv = _pair | split: ":" -%}
|
|
51
|
-
{%- assign _k = _kv[0] -%}
|
|
49
|
+
{%- assign _st = "available,partial,planned" | split: "," -%}
|
|
50
|
+
{%- for _k in _st -%}
|
|
52
51
|
{%- case _k -%}{%- when "available" -%}{%- assign _label = mt_t_status_available -%}{%- when "partial" -%}{%- assign _label = mt_t_status_partial -%}{%- else -%}{%- assign _label = mt_t_status_planned -%}{%- endcase -%}
|
|
53
|
-
{%- capture _to %}<span class="mt-badge mt-badge-{{
|
|
54
|
-
{%- capture _from %}<code class="language-plaintext highlighter-rouge">status:{{
|
|
55
|
-
{%- capture _from2 %}<code>status:{{
|
|
52
|
+
{%- capture _to %}<span class="mt-badge mt-badge-{{ _k }}" data-variant="{{ _k }}">{{ _label }}</span>{% endcapture -%}
|
|
53
|
+
{%- capture _from %}<code class="language-plaintext highlighter-rouge">status:{{ _k }}</code>{% endcapture -%}
|
|
54
|
+
{%- capture _from2 %}<code>status:{{ _k }}</code>{% endcapture -%}
|
|
56
55
|
{%- assign _c = _c | replace: _from, _to | replace: _from2, _to -%}
|
|
57
56
|
{%- endfor -%}
|
|
58
57
|
{%- endif -%}
|
|
@@ -103,7 +102,8 @@ Titles/labels: modootoday/i18n.html (site _data/i18n, theme catalog, English).
|
|
|
103
102
|
{%- if _cap != "" -%}{%- assign _rest = _a2 | remove_first: "<p><em>" | remove_first: _cap | remove_first: "</em></p>" -%}
|
|
104
103
|
{%- assign _src = _im | split: 'src="' | last | split: '"' | first | split: "?" | first | split: "#" | first | downcase -%}
|
|
105
104
|
{%- assign _ext = _src | slice: -4, 4 -%}
|
|
106
|
-
{%- if _ext == ".svg" -%}{%- assign _alt =
|
|
105
|
+
{%- if _ext == ".svg" -%}{%- assign _alt = _cap | strip_html | strip | replace: '"', """ -%}
|
|
106
|
+
{%- if _alt != "" -%}{%- assign _alt = mt_t_region_named | replace: "[label]", mt_t_diagram_label | replace: "[name]", _alt -%}{%- endif -%}
|
|
107
107
|
<figure class="mt-figure mt-figure-svg"><div class="mt-figure-scroll" tabindex="0" role="region" aria-label="{{ _alt | default: mt_t_diagram_label }}"><img {{ _im }}</div><figcaption>{{ _cap }}</figcaption></figure>{{ _rest }}
|
|
108
108
|
{%- else -%}
|
|
109
109
|
<figure class="mt-figure"><img {{ _im }}<figcaption>{{ _cap }}</figcaption></figure>{{ _rest }}
|
|
@@ -112,10 +112,11 @@ Titles/labels: modootoday/i18n.html (site _data/i18n, theme catalog, English).
|
|
|
112
112
|
{%- endfor -%}{%- endcapture -%}
|
|
113
113
|
{%- endif -%}
|
|
114
114
|
{%- capture _c %}{% include modootoday/markdown/inline.html html=_c %}{% endcapture -%}
|
|
115
|
-
{%- comment -%}3) Accessibility fix-ups of kramdown output (found by
|
|
115
|
+
{%- comment -%}3) Accessibility fix-ups of kramdown output (found by test/system/audit.mjs + axe): focusable scrolling code
|
|
116
116
|
blocks, labelled task-list checkboxes, and no deprecated role="doc-endnote" on footnote items.{%- endcomment -%}
|
|
117
117
|
{%- assign _td = mt_t_task_done -%}{%- assign _topen = mt_t_task_open -%}
|
|
118
118
|
{%- capture _cbd %}class="task-list-item-checkbox" disabled="disabled" checked="checked" aria-label="{{ _td }}" />{% endcapture -%}
|
|
119
119
|
{%- capture _cbo %}class="task-list-item-checkbox" disabled="disabled" aria-label="{{ _topen }}" />{% endcapture -%}
|
|
120
|
-
{%-
|
|
120
|
+
{%- capture _c %}{% include modootoday/markdown/code.html html=_c %}{% endcapture -%}
|
|
121
|
+
{%- assign _c = _c | replace: 'class="task-list-item-checkbox" disabled="disabled" checked="checked" />', _cbd | replace: 'class="task-list-item-checkbox" disabled="disabled" />', _cbo | replace: ' role="doc-endnote">', '>' -%}
|
|
121
122
|
{{ _c }}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{%- comment -%}Static diagrams: the n-th ```mermaid fence becomes figure.mt-diagram with the n-th entry of page.diagrams, showing the
|
|
2
|
+
committed <dir><name>.svg and, with dark: true, <dir><name>.dark.svg; the figure sheet swaps them with the colour scheme. Both
|
|
3
|
+
images carry the alt text: CSS hides one, which leaves the accessibility tree. The scroll region is named by diagram.label
|
|
4
|
+
and the caption, not the alt text, so the image is not read twice. A fence with no entry stays as it is.
|
|
5
|
+
site.modootoday.diagrams: dir (default /assets/diagrams/), dark (default true), source: details (default) | none{%- endcomment -%}
|
|
6
|
+
{%- assign _mfd = site.modootoday.diagrams -%}
|
|
7
|
+
{%- assign _mfd_dir = _mfd.dir | default: "/assets/diagrams/" -%}
|
|
8
|
+
{%- assign _mfd_dark = true -%}{%- if _mfd.dark == false -%}{%- assign _mfd_dark = false -%}{%- endif -%}
|
|
9
|
+
{%- assign _mfd_x = include.html -%}
|
|
10
|
+
{%- assign _mfd_k = '<div class="language-mermaid highlighter-rouge">' -%}{%- assign _mfd_e = "</pre></div></div>" -%}
|
|
11
|
+
{%- unless _mfd_x contains _mfd_k -%}{%- assign _mfd_k = '<pre><code class="language-mermaid">' -%}{%- assign _mfd_e = "</code></pre>" -%}{%- endunless -%}
|
|
12
|
+
{%- if _mfd_x contains _mfd_k -%}
|
|
13
|
+
{%- assign _mfd_bits = _mfd_x | split: _mfd_k -%}
|
|
14
|
+
{%- capture _mfd_x -%}{{ _mfd_bits[0] }}{%- for _mfd_b in _mfd_bits offset: 1 -%}
|
|
15
|
+
{%- assign _mfd_d = page.diagrams[forloop.index0] -%}
|
|
16
|
+
{%- if _mfd_d.name and _mfd_d.name != "" and _mfd_b contains _mfd_e -%}
|
|
17
|
+
{%- assign _mfd_src = _mfd_b | split: _mfd_e | first -%}{%- assign _mfd_rest = _mfd_b | remove_first: _mfd_src | remove_first: _mfd_e -%}
|
|
18
|
+
{%- assign _mfd_alt = _mfd_d.alt | strip_html | escape -%}
|
|
19
|
+
{%- capture _mfd_size %}{% if _mfd_d.width and _mfd_d.height %} width="{{ _mfd_d.width }}" height="{{ _mfd_d.height }}"{% endif %}{% endcapture -%}
|
|
20
|
+
{%- assign _mfd_p = _mfd_dir | append: _mfd_d.name -%}
|
|
21
|
+
{%- assign _mfd_r = mt_t_diagram_label -%}{%- assign _mfd_c = _mfd_d.caption | markdownify | strip_html | strip | replace: '"', """ -%}
|
|
22
|
+
{%- if _mfd_c != "" -%}{%- assign _mfd_r = mt_t_region_named | replace: "[label]", mt_t_diagram_label | replace: "[name]", _mfd_c -%}{%- endif -%}
|
|
23
|
+
<figure class="mt-figure mt-figure-svg mt-diagram"><div class="mt-figure-scroll" tabindex="0" role="region" aria-label="{{ _mfd_r }}">
|
|
24
|
+
{%- if _mfd_dark -%}<img class="mt-diagram-light mt-no-filter" src="{{ _mfd_p | append: '.svg' | relative_url }}" alt="{{ _mfd_alt }}"{{ _mfd_size }} loading="lazy" decoding="async"><img class="mt-diagram-dark mt-no-filter" src="{{ _mfd_p | append: '.dark.svg' | relative_url }}" alt="{{ _mfd_alt }}"{{ _mfd_size }} loading="lazy" decoding="async">
|
|
25
|
+
{%- else -%}<img class="mt-diagram-light" src="{{ _mfd_p | append: '.svg' | relative_url }}" alt="{{ _mfd_alt }}"{{ _mfd_size }} loading="lazy" decoding="async">{%- endif -%}
|
|
26
|
+
</div>{%- if _mfd_d.caption -%}<figcaption>{{ _mfd_d.caption | markdownify | remove: "<p>" | remove: "</p>" | strip }}</figcaption>{%- endif -%}</figure>
|
|
27
|
+
{%- unless _mfd.source == "none" -%}<details class="mt-diagram-source"><summary>{{ mt_t_diagram_source }}</summary>{{ _mfd_k }}{{ _mfd_src }}{{ _mfd_e }}</details>{%- endunless -%}{{ _mfd_rest }}
|
|
28
|
+
{%- else -%}{{ _mfd_k }}{{ _mfd_b }}{%- endif -%}
|
|
29
|
+
{%- endfor -%}{%- endcapture -%}
|
|
30
|
+
{%- endif -%}
|
|
31
|
+
{{ _mfd_x }}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{%- comment -%}Static math (site.modootoday.math.mode: static): the n-th ```math fence or $$ block (kramdown prints \[ … \] at a line
|
|
2
|
+
start) becomes the html of the n-th entry of site.data.math[<key>] in a focusable region named math.label; a block with no
|
|
3
|
+
entry stays; figure.mt-figure gives the spacing. <key>: page.math_key, else the default-language source path without extension, / as -- (Figures.math_key).
|
|
4
|
+
Sets mt_math_html when an entry is KaTeX HTML output (class katex-html), so render/math.html links KaTeX's stylesheet.{%- endcomment -%}
|
|
5
|
+
{%- assign _mfm_k = page.math_key | append: "" -%}
|
|
6
|
+
{%- if _mfm_k == "" -%}
|
|
7
|
+
{%- capture _mfm_ls -%}|{{ site.modootoday.languages | join: "|" }}|{%- for _mfm_i in site.data.i18n -%}{{ _mfm_i[0] }}|{%- endfor -%}{%- endcapture -%}
|
|
8
|
+
{%- assign _mfm_def = site.lang | default: "en" | prepend: "|" | append: "|" -%}{%- assign _mfm_ls = _mfm_ls | replace: _mfm_def, "|" -%}
|
|
9
|
+
{%- assign _mfm_d = page.path | split: "/" -%}{%- assign _mfm_b = _mfm_d | last | split: "." -%}{%- assign _mfm_d = _mfm_d | pop -%}
|
|
10
|
+
{%- assign _mfm_s = "||" -%}{%- if _mfm_b.size > 2 -%}{%- assign _mfm_r = _mfm_b | reverse -%}{%- assign _mfm_s = _mfm_r[1] | prepend: "|" | append: "|" -%}{%- endif -%}
|
|
11
|
+
{%- assign _mfm_f0 = _mfm_d.first | prepend: "|" | append: "|" -%}
|
|
12
|
+
{%- if _mfm_s != "||" and _mfm_ls contains _mfm_s -%}{%- assign _mfm_b = _mfm_b | pop -%}{%- if _mfm_d.first == "home" -%}{%- assign _mfm_d = _mfm_d | shift -%}{%- endif -%}
|
|
13
|
+
{%- elsif _mfm_d.size > 0 and _mfm_ls contains _mfm_f0 -%}{%- assign _mfm_d = _mfm_d | shift -%}{%- endif -%}
|
|
14
|
+
{%- assign _mfm_b = _mfm_b | pop | join: "." -%}{%- assign _mfm_k = _mfm_d | push: _mfm_b | join: "--" -%}
|
|
15
|
+
{%- endif -%}
|
|
16
|
+
{%- assign _mfm_data = site.data.math[_mfm_k] -%}
|
|
17
|
+
{%- assign _mfm_x = include.html -%}
|
|
18
|
+
{%- if _mfm_data and _mfm_data.size > 0 -%}
|
|
19
|
+
{%- capture _mfm_nl %}
|
|
20
|
+
{% endcapture -%}{%- assign _mfm_t = _mfm_nl | append: "\[" -%}{%- assign _mfm_tn = _mfm_nl | append: "<!--mt-math-T-->" -%}
|
|
21
|
+
{%- assign _mfm_f = '<div class="language-math highlighter-rouge">' -%}{%- assign _mfm_fe = "</pre></div></div>" -%}
|
|
22
|
+
{%- unless _mfm_x contains _mfm_f -%}{%- assign _mfm_f = '<pre><code class="language-math">' -%}{%- assign _mfm_fe = "</code></pre>" -%}{%- endunless -%}
|
|
23
|
+
{%- assign _mfm_bits = _mfm_x | prepend: _mfm_nl | replace: _mfm_f, "<!--mt-math-F-->" | replace: _mfm_t, _mfm_tn | split: "<!--mt-math-" -%}
|
|
24
|
+
{%- capture _mfm_x -%}{{ _mfm_bits[0] | remove_first: _mfm_nl }}{%- for _mfm_raw in _mfm_bits offset: 1 -%}
|
|
25
|
+
{%- assign _mfm_e = _mfm_data[forloop.index0] -%}{%- assign _mfm_kind = _mfm_raw | slice: 0 -%}{%- assign _mfm_seg = _mfm_raw | slice: 4, _mfm_raw.size -%}
|
|
26
|
+
{%- if _mfm_kind == "F" -%}{%- assign _mfm_end = _mfm_fe -%}{%- assign _mfm_open = _mfm_f -%}{%- else -%}{%- assign _mfm_end = "\]" -%}{%- assign _mfm_open = "\[" -%}{%- endif -%}
|
|
27
|
+
{%- if _mfm_e.html and _mfm_seg contains _mfm_end -%}
|
|
28
|
+
{%- assign _mfm_src = _mfm_seg | split: _mfm_end | first -%}{%- assign _mfm_rest = _mfm_seg | remove_first: _mfm_src | remove_first: _mfm_end -%}
|
|
29
|
+
{%- if _mfm_e.html contains "katex-html" -%}{%- assign mt_math_html = true -%}{%- endif -%}
|
|
30
|
+
<figure class="mt-figure mt-math"><div class="mt-figure-scroll" tabindex="0" role="region" aria-label="{{ mt_t_math_label | replace: '[n]', forloop.index }}">{{ _mfm_e.html }}</div></figure>{{ _mfm_rest }}
|
|
31
|
+
{%- else -%}{{ _mfm_open }}{{ _mfm_seg }}{%- endif -%}
|
|
32
|
+
{%- endfor -%}{%- endcapture -%}
|
|
33
|
+
{%- endif -%}
|
|
34
|
+
{{ _mfm_x }}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{%- comment -%}Static figures: committed renders replace fenced sources (parts in markdown/figures/). Called by links/content.html on
|
|
2
|
+
every layout; a page without the front matter list or static math returns include.html unchanged.
|
|
3
|
+
diagrams: [{name, alt, caption, width, height}] the n-th ```mermaid fence becomes the n-th entry (figures/diagrams.html)
|
|
4
|
+
modootoday.math.mode: static the n-th math block becomes the n-th entry of _data/math (figures/math.html){%- endcomment -%}
|
|
5
|
+
{%- assign _mfg_h = include.html -%}
|
|
6
|
+
{%- if page.diagrams and page.diagrams.size > 0 -%}{%- capture _mfg_h %}{% include modootoday/markdown/figures/diagrams.html html=_mfg_h %}{% endcapture -%}{%- endif -%}
|
|
7
|
+
{%- if include.math -%}{%- capture _mfg_h %}{% include modootoday/markdown/figures/math.html html=_mfg_h %}{% endcapture -%}{%- endif -%}
|
|
8
|
+
{{ _mfg_h }}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{%- comment -%}md-components v1 — `chart:<type> [stacked] [horizontal]` alone in a paragraph right before a table → figure.mt-chart
|
|
2
|
+
(chart/figure.html) around that table; an emphasis-only paragraph right after the table is its figcaption. Called by
|
|
3
|
+
markdown/inline.html when modootoday.chart.enabled; anything else stays a code span, and modootoday-check reports it.{%- endcomment -%}
|
|
4
|
+
{%- assign _mch_x = include.html -%}
|
|
5
|
+
{%- assign _mch_types = "bar,line,area,pie,doughnut" | split: "," -%}
|
|
6
|
+
{%- assign _mch_opts = "stacked,horizontal" | split: "," -%}
|
|
7
|
+
{%- assign _mch_ops = '<code class="language-plaintext highlighter-rouge">|<code>' | split: "|" -%}
|
|
8
|
+
{%- for _mch_o in _mch_ops -%}
|
|
9
|
+
{%- assign _mch_key = "<p>" | append: _mch_o | append: "chart:" -%}
|
|
10
|
+
{%- if _mch_x contains _mch_key -%}{%- assign _mch_bits = _mch_x | split: _mch_key -%}
|
|
11
|
+
{%- capture _mch_x -%}{{ _mch_bits[0] }}{%- for _mch_b in _mch_bits offset: 1 -%}
|
|
12
|
+
{%- assign _mch_v = _mch_b | split: "</code></p>" | first -%}
|
|
13
|
+
{%- assign _mch_r = _mch_b | remove_first: _mch_v | remove_first: "</code></p>" | lstrip -%}
|
|
14
|
+
{%- assign _mch_w = _mch_v | split: " " -%}{%- assign _mch_ty = _mch_w | first -%}{%- assign _mch_ok = false -%}
|
|
15
|
+
{%- if _mch_types contains _mch_ty -%}{%- assign _mch_ok = true -%}{%- endif -%}
|
|
16
|
+
{%- for _mch_q in _mch_w offset: 1 -%}{%- unless _mch_opts contains _mch_q -%}{%- assign _mch_ok = false -%}{%- endunless -%}{%- endfor -%}
|
|
17
|
+
{%- assign _mch_h = _mch_r | slice: 0, 6 -%}
|
|
18
|
+
{%- if _mch_v contains "<" or _mch_v == _mch_b or _mch_h != "<table" or _mch_ok == false -%}{{ _mch_key }}{{ _mch_b }}
|
|
19
|
+
{%- else -%}{%- assign _mch_t = _mch_r | split: "</table>" | first | append: "</table>" -%}
|
|
20
|
+
{%- assign _mch_a = _mch_r | remove_first: _mch_t | lstrip -%}{%- assign _mch_cap = "" -%}
|
|
21
|
+
{%- assign _mch_h = _mch_a | slice: 0, 7 -%}
|
|
22
|
+
{%- if _mch_h == "<p><em>" -%}{%- assign _mch_e = _mch_a | remove_first: "<p><em>" -%}{%- assign _mch_cap = _mch_e | split: "</em></p>" | first -%}
|
|
23
|
+
{%- if _mch_cap contains "<p" or _mch_cap contains "</em>" or _mch_cap == _mch_e -%}{%- assign _mch_cap = "" -%}
|
|
24
|
+
{%- else -%}{%- assign _mch_a = _mch_a | remove_first: "<p><em>" | remove_first: _mch_cap | remove_first: "</em></p>" -%}{%- endif -%}
|
|
25
|
+
{%- endif -%}
|
|
26
|
+
{%- assign _mch_q = _mch_v | remove_first: _mch_ty | strip -%}
|
|
27
|
+
{% include modootoday/chart/figure.html table=_mch_t caption=_mch_cap type=_mch_ty opts=_mch_q %}{{ _mch_a }}
|
|
28
|
+
{%- endif -%}{%- endfor -%}{%- endcapture -%}{%- endif -%}
|
|
29
|
+
{%- endfor -%}
|
|
30
|
+
{{ _mch_x }}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{%- comment -%}md-components v1 — `widget:<element>` alone in a paragraph, where <element> is the element: of a modootoday.scripts
|
|
2
|
+
entry → that custom element with class mt-widget, data-props from front matter widget_props.<element> and the
|
|
3
|
+
widget.fallback sentence as its light-DOM fallback. Called by markdown/inline.html; other names stay code spans.{%- endcomment -%}
|
|
4
|
+
{%- assign _miw_x = include.html -%}{%- assign _miw_els = "|" -%}
|
|
5
|
+
{%- for _miw_s in site.modootoday.scripts -%}{%- assign _miw_el = _miw_s[1].element | append: "" -%}
|
|
6
|
+
{%- if _miw_el contains "-" -%}{%- assign _miw_els = _miw_els | append: _miw_el | append: "|" -%}{%- endif -%}{%- endfor -%}
|
|
7
|
+
{%- assign _miw_ops = '<code class="language-plaintext highlighter-rouge">|<code>' | split: "|" -%}
|
|
8
|
+
{%- for _miw_o in _miw_ops -%}
|
|
9
|
+
{%- assign _miw_key = "<p>" | append: _miw_o | append: "widget:" -%}
|
|
10
|
+
{%- if _miw_x contains _miw_key -%}{%- assign _miw_bits = _miw_x | split: _miw_key -%}
|
|
11
|
+
{%- capture _miw_x -%}{{ _miw_bits[0] }}{%- for _miw_b in _miw_bits offset: 1 -%}
|
|
12
|
+
{%- assign _miw_v = _miw_b | split: "</code></p>" | first -%}{%- assign _miw_k = "|" | append: _miw_v | append: "|" -%}
|
|
13
|
+
{%- assign _miw_ok = false -%}{%- if _miw_els contains _miw_k -%}{%- assign _miw_ok = true -%}{%- endif -%}
|
|
14
|
+
{%- if _miw_v contains "|" or _miw_v == _miw_b or _miw_ok == false -%}{{ _miw_key }}{{ _miw_b }}
|
|
15
|
+
{%- else -%}{%- assign _miw_p = page.widget_props[_miw_v] -%}
|
|
16
|
+
<{{ _miw_v }} class="mt-widget"{% if _miw_p %} data-props="{{ _miw_p | jsonify | escape }}"{% endif %}><div class="mt-widget-fallback"><p>{{ mt_t_widget_fallback }}</p></div></{{ _miw_v }}>{{ _miw_b | remove_first: _miw_v | remove_first: "</code></p>" }}
|
|
17
|
+
{%- endif -%}{%- endfor -%}{%- endcapture -%}{%- endif -%}
|
|
18
|
+
{%- endfor -%}
|
|
19
|
+
{{ _miw_x }}
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
`progress:<0-100>` → span.mt-progress > progress[max=100] labelled progress.label, plus "N%" as text.
|
|
4
4
|
`embed:https://… Title` alone in a paragraph → div.mt-embed > iframe (lazy; title = the words after the URL,
|
|
5
5
|
else embed.title). `loading:spinner|bar` and `skeleton:text|card|image|avatar|row` → role=status
|
|
6
|
-
placeholders labelled loading.label (optional loading sheet). Footnote back-links get aria-label footnote.back. modootoday-check validates the values.
|
|
6
|
+
placeholders labelled loading.label (optional loading sheet). Footnote back-links get aria-label footnote.back. modootoday-check validates the values.
|
|
7
|
+
With modootoday.chart.enabled, `chart:<type>` alone before a table → figure.mt-chart (inline/chart.html).
|
|
8
|
+
`widget:<element>` alone in a paragraph, for an element: of modootoday.scripts → that custom element (inline/widget.html).{%- endcomment -%}
|
|
7
9
|
{%- assign _x = include.html -%}
|
|
10
|
+
{%- if site.modootoday.chart.enabled == true and mt_components contains "chart" and _x contains "chart:" -%}{%- capture _x %}{% include modootoday/markdown/inline/chart.html html=_x %}{% endcapture -%}{%- endif -%}
|
|
11
|
+
{%- if site.modootoday.scripts and mt_components contains "widget" and _x contains "widget:" -%}{%- capture _x %}{% include modootoday/markdown/inline/widget.html html=_x %}{% endcapture -%}{%- endif -%}
|
|
8
12
|
{%- assign _ops = '<code class="language-plaintext highlighter-rouge">|<code>' | split: "|" -%}
|
|
9
13
|
{%- for _o in _ops -%}
|
|
10
14
|
{%- assign _key = "<p>" | append: _o | append: "file:" -%}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{%- comment -%}md-components v1: assigns _llms_pages = Markdown pages in the current page's directory tree and language (twin: false and README.md excluded), sorted by url.{%- endcomment -%}
|
|
1
|
+
{%- comment -%}md-components v1: assigns _llms_pages = Markdown pages in the current page's directory tree and language (twin: false, layout: error and README.md excluded), sorted by url.{%- endcomment -%}
|
|
2
2
|
{%- assign _llms_lang = page.lang | default: site.lang | default: "en" -%}
|
|
3
3
|
{%- assign _llms_dir = page.path | split: "/" | pop | join: "/" -%}
|
|
4
4
|
{%- if _llms_dir != "" -%}{%- assign _llms_dir = _llms_dir | append: "/" -%}{%- endif -%}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{%- assign _pext = _p.path | split: "." | last -%}
|
|
9
9
|
{%- assign _plang = _p.lang | default: site.lang | default: "en" -%}
|
|
10
10
|
{%- assign _pstart = _p.path | slice: 0, _llms_dir.size -%}
|
|
11
|
-
{%- if _pext == "md" and _p.name != "README.md" and _p.twin != false and _plang == _llms_lang and _pstart == _llms_dir -%}
|
|
11
|
+
{%- if _pext == "md" and _p.name != "README.md" and _p.twin != false and _p.layout != "error" and _plang == _llms_lang and _pstart == _llms_dir -%}
|
|
12
12
|
{%- assign _llms_pages = _llms_pages | push: _p -%}
|
|
13
13
|
{%- endif -%}
|
|
14
14
|
{%- endfor -%}
|