diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 6ac9c868..00000000 --- a/.prettierignore +++ /dev/null @@ -1,11 +0,0 @@ -package-lock.json -_site -assets/css/just-the-docs-default.scss -assets/css/just-the-docs-light.scss -assets/css/just-the-docs-dark.scss -assets/js/vendor/lunr.min.js -assets/js/search-data.json -assets/js/zzzz-search-data.json -assets/js/just-the-docs.js -*.md -_includes/mermaid_config.js diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 71c3fc45..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cSpell.words": [ - "stefanzweifel" - ] -} \ No newline at end of file diff --git a/Gemfile b/Gemfile index 38014f27..528d9431 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,7 @@ source "https://rubygems.org" -gemspec + +gem "jekyll", ">= 3.8.5" +gem "jekyll-seo-tag", ">= 2.0" gem "base64" gem "csv" @@ -9,7 +11,5 @@ gem "jekyll-github-metadata", ">= 2.15" gem "jekyll-include-cache", group: :jekyll_plugins gem "jekyll-sitemap", group: :jekyll_plugins -gem "html-proofer", "~> 5.0", :group => :development - gem "jekyll-remote-theme", "~> 0.4.3" -gem 'jekyll-octicons' \ No newline at end of file +gem 'jekyll-octicons' diff --git a/README.md b/README.md index ffb5d1a3..87c2ec90 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ See the [search guide](/docs/search/README.md) for instructions on how to use th # 🏗️ Development ## Site structure - The main layout file is located at [`_layouts/minimal_search.html`](_layouts/minimal_search.html). +- The search page styles are in [`assets/css/search.css`](assets/css/search.css) and its behaviour is in the ES modules under [`assets/js/search/`](assets/js/search/), starting from `main.js`. +- The 404 page uses the [`MDLutoronto/jtd-theme`](https://github.com/MDLutoronto/jtd-theme) remote theme. - The tutorials data is stored in the [`_data/guides.yml`](_data/guides.yml) file. - The site configuration is in the [`_config.yml`](_config.yml) file. - The homepage is located at [`page.md`](page.md) and uses the `minimal_search` layout, powering the search interface. diff --git a/_config.yml b/_config.yml index 12bb9d4e..6c7c59a6 100644 --- a/_config.yml +++ b/_config.yml @@ -85,6 +85,7 @@ exclude: - README.md - CODE_OF_CONDUCT.md - docker-compose.yml + - skills-lock.json - Dockerfile # theme test code - fixtures/ diff --git a/_includes/_config.yml b/_includes/_config.yml deleted file mode 100644 index 29639c3a..00000000 --- a/_includes/_config.yml +++ /dev/null @@ -1,232 +0,0 @@ -## Site settings -title: "Map & Data Library just the Docs Theme" -description: "Workshops and guides from the Map & Data Library, University of Toronto" -url: "https://MDLutoronto.github.io/jtd-theme" # change the slug to the repo's name ('jtd-theme' in this case) -repository: "MDLutoronto/jtd-theme" # for github-metadata - -## Navigation footer logos and links -## Change it only if you want to use different logos or links -## Logos should be placed in the /assets/images/ directory, or you can use an external image link -nav_footer_logo_bottom: "/assets/images/UTL.png" -nav_footer_logo_bottom_href: "https://library.utoronto.ca/" -nav_footer_logo_top: "/assets/images/mdl_full_logo.png" -nav_footer_logo_top_href: "https://library.utoronto.ca/library/mdl" - -## License information -## If left empty, a default Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license will be used -license_name: "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International" -license_url: "https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en" # link to the license -license_image_url: "https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by-nc-sa.svg" # image Link or image file path for the license - -# # Aux links for the upper right search bar (optional) -# # Uncomment if you want to have the aux links (right side of the top nav bar) -# aux_links: -# "Map & Data Library": -# - "https://library.utoronto.ca/library/mdl" -# "U of T Libraries": -# - "https://library.utoronto.ca/" - -## Workshop series name to be displayed in the footer (optional) -# workshop_series_name: "Map & Data Library Workshop Series" - -## Custom footer content (HTML is allowed) -## If left empty, a default credit line will be used -# footer_content: '
Guide created by Map & Data Library, University of Toronto.
' - -################################################# -# 🚨 DANGER ZONE 🚨 -# ONLY CHANGE BELOW THIS LINE IF YOU KNOW WHAT YOU ARE DOING -################################################# - -baseurl: "" # the subpath of your site, e.g. /blog - -# # Makes Aux links open in a new tab. Default is false -aux_links_new_tab: true - -# # External navigation links that appear in the sidebar and shows after all the sub-pages -# # Each link must have a title and a url -nav_external_links: - - title: "Map & Data Library" - url: https://library.utoronto.ca/library/mdl - opens_in_new_tab: true # Optional, defaults to false -# - title: "U of T Libraries" -# url: https://library.utoronto.ca/ -# opens_in_new_tab: true # Optional, defaults to false - -# # Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define -color_scheme: mdl - -# # Remote theme -remote_theme: "MDLutoronto/jtd-theme" - -permalink: pretty - -defaults: - - scope: - path: "docs" # an empty string here means all files in the project - type: "pages" - values: - layout: "default" - -exclude: - # from https://github.com/jekyll/jekyll/blob/master/lib/site_template/_config.yml: - - .sass-cache/ - - .jekyll-cache/ - - gemfiles/ - - Gemfile - - Gemfile.lock - - node_modules/ - - vendor/bundle/ - - vendor/cache/ - - vendor/gems/ - - vendor/ruby/ - # specific to the theme website: - - bin/ - - lib/ - - "*.gemspec" - - "*.gem" - - LICENSE.txt - - package.json - - package-lock.json - - Rakefile - - README.md - - CODE_OF_CONDUCT.md - - docker-compose.yml - - Dockerfile - # theme test code - - fixtures/ - -# Set a path/url to a logo that will be displayed instead of the title -#logo: "/assets/images/just-the-docs.png" - -# Enable or disable the site search -# Supports true (default) or false -search_enabled: true -search: - # Split pages into sections that can be searched individually - # Supports 1 - 6, default: 2 - heading_level: 2 - # Maximum amount of previews per search result - # Default: 3 - previews: 2 - # Maximum amount of words to display before a matched word in the preview - # Default: 5 - preview_words_before: 3 - # Maximum amount of words to display after a matched word in the preview - # Default: 10 - preview_words_after: 3 - # Set the search token separator - # Default: /[\s\-/]+/ - # Example: enable support for hyphenated search words - tokenizer_separator: /[\s/]+/ - # Display the relative url in search results - # Supports true (default) or false - rel_url: true - # Enable or disable the search button that appears in the bottom right corner of every page - # Supports true or false (default) - button: false - # Focus the search input by pressing `ctrl + focus_shortcut_key` (or `cmd + focus_shortcut_key` on macOS) - focus_shortcut_key: "k" - -# For copy button on code -enable_copy_code_button: true - -# By default, consuming the theme as a gem leaves mermaid disabled; it is opt-in -mermaid: - # Version of mermaid library - # Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/ - version: "9.1.6" - # Put any additional configuration, such as setting the theme, in _includes/mermaid_config.js - # See also docs/ui-components/code - # To load mermaid from a local library, also use the `path` key to specify the location of the library; e.g. - # for (v10+): - # path: "/assets/js/mermaid.esm.min.mjs" - # for ( - - diff --git a/_includes/components/breadcrumbs.html b/_includes/components/breadcrumbs.html deleted file mode 100644 index 6bdcdad4..00000000 --- a/_includes/components/breadcrumbs.html +++ /dev/null @@ -1,96 +0,0 @@ -{%- comment -%} - Include as: {%- include components/breadcrumbs.html -%} - Depends on: page, site. - Includes: components/site_nav.html. - Results in: HTML for the breadcrumbs component. - Overwrites: - nav_list_link, site_nav, nav_list_simple, nav_list_link_class, nav_category, - nav_anchor_splits, nav_breadcrumbs, nav_split, nav_split_next, nav_split_test, - nav_breadcrumb_link, nav_list_end_less, nav_list_end_count, nav_end_index, nav_breadcrumb. -{%- endcomment -%} - -{%- if page.url != "/" and page.parent and page.title -%} - -{%- capture site_nav -%} -{%- include_cached components/site_nav.html all=true -%} -{%- endcapture -%} - -{%- capture nav_list_link -%} - -{%- endcapture -%} - -{%- capture nav_list_simple -%} -"s requires that number - of potential ancestors to be popped from the stack. - - The number of occurrences of a string in nav_split_next is computed by removing - them all, then dividing the resulting size difference by the length of the string. -{%- endcomment %} - -{%- assign nav_breadcrumbs = "" | split: "" -%} - -{%- for nav_split in nav_anchor_splits -%} -{%- unless forloop.last -%} - -{%- assign nav_split_next = nav_anchor_splits[forloop.index] | strip -%} - -{%- assign nav_split_test = - nav_split_next | remove_first: nav_list_simple | prepend: nav_list_simple -%} -{%- if nav_split_test == nav_split_next -%} - {%- assign nav_breadcrumb_link = - nav_split | split: "" | append: "" -%} - {%- assign nav_breadcrumbs = nav_breadcrumbs | push: nav_breadcrumb_link -%} -{%- endif -%} - -{%- if nav_split_next contains "" -%} - {%- assign nav_list_end_less = nav_split_next | remove: "" -%} - {%- assign nav_list_end_count = - nav_split_next.size | minus: nav_list_end_less.size | divided_by: 5 -%} - {% for nav_end_index in (1..nav_list_end_count) %} - {%- assign nav_breadcrumbs = nav_breadcrumbs | pop -%} - {%- endfor -%} -{%- endif -%} - -{%- endunless -%} -{%- endfor -%} - - - -{% if site.nav_error_report %} -{{ nav_error_report }} -{% endif %} - -{%- endif -%} diff --git a/_includes/components/children_nav.html b/_includes/components/children_nav.html deleted file mode 100644 index 617012a4..00000000 --- a/_includes/components/children_nav.html +++ /dev/null @@ -1,89 +0,0 @@ -{%- comment -%} - Include as: {%- include components/children_nav.html -%} - Depends on: page, site, nav_breadcrumbs. - Results in: HTML for the children-navigation component. - Includes: components/nav/sorted.html, toc_heading_custom.html. - Overwrites: - nav_ancestor_links, nav_top_node_titles, nav_child_candidates, nav_children, - nav_child, nav_child_ok, nav_child_ancestor, nav_sorted. -{%- endcomment -%} - -{%- comment -%} - Whether a page has any children is checked efficiently by inspecting the cached - site_nav. If the page has no children, nav_children is set to an empty array; - otherwise nav_children is left unset. (The site_nav is rendered the first time - it is included, and that may overwrite various variables.) -{%- endcomment -%} - -{%- if page.has_children == false -%} - {%- assign nav_children = "" | split: "" -%} -{%- else -%} - - {%- capture site_nav -%} - {%- include_cached components/site_nav.html all=true -%} - {%- endcapture -%} - - {%- assign nav_children = nil -%} - - {%- capture nav_list_link -%} - - {%- endcapture -%} - - {%- capture nav_list_simple -%} -