aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJieiku2023-05-22 22:31:34 -0700
committerJieiku2023-05-22 22:31:34 -0700
commit940b40688a7cf595eee061b696187e2fe4a578e2 (patch)
tree15f9ef4ea0170d61c263c26c32f13398a2ec348a
parent5c3cc8966834a0d140f82aa178ba26109f79dd8f (diff)
downloadabridge-940b40688a7cf595eee061b696187e2fe4a578e2.tar.gz
abridge-940b40688a7cf595eee061b696187e2fe4a578e2.tar.bz2
abridge-940b40688a7cf595eee061b696187e2fe4a578e2.zip
Json-Index and config.toml optional
-rw-r--r--config.toml371
-rw-r--r--sass/_imports.scss7
-rw-r--r--sass/abridge-auto.scss31
-rw-r--r--sass/abridge-blue-dark.scss21
-rw-r--r--sass/abridge-blue-light.scss21
-rw-r--r--sass/abridge-blue-switcher.scss34
-rw-r--r--sass/abridge-blue.scss36
-rw-r--r--sass/abridge-blueshade-dark.scss21
-rw-r--r--sass/abridge-blueshade-light.scss21
-rw-r--r--sass/abridge-blueshade-switcher.scss34
-rw-r--r--sass/abridge-blueshade.scss36
-rw-r--r--sass/abridge-dark.scss29
-rw-r--r--sass/abridge-light.scss29
-rw-r--r--sass/abridge-switcher.scss34
-rw-r--r--sass/abridge.scss59
-rw-r--r--sass/font.scss5
-rw-r--r--sass/fonts/_Abridge.scss7
-rw-r--r--sass/fonts/_Roboto-Mono.scss11
-rw-r--r--sass/include/_embedded.scss4
-rw-r--r--sass/include/_hr.scss2
-rw-r--r--sass/include/_icons.scss2
-rw-r--r--sass/include/_nav.scss2
-rw-r--r--sass/include/_sectioning.scss4
-rw-r--r--static/font/Roboto-Mono-Italic.woff2bin0 -> 13572 bytes
-rw-r--r--static/font/Roboto-Mono.woff2bin0 -> 12312 bytes
-rw-r--r--static/search.js20
-rw-r--r--templates/base.html19
-rw-r--r--templates/index.html3
-rw-r--r--templates/macros/head.html240
-rw-r--r--templates/macros/macros.html20
-rw-r--r--templates/macros/social.html2
-rw-r--r--templates/page.html3
32 files changed, 482 insertions, 646 deletions
diff --git a/config.toml b/config.toml
index aebb62b..715e18e 100644
--- a/config.toml
+++ b/config.toml
@@ -1,14 +1,14 @@
# do NOT include a trailing slash on the base URL for web urls
base_url = "https://abridge.netlify.app"
-#base_url = "/home/jieiku/.dev/abridge/public/" # for locally usable build directly from disk, also set in [extra] section uglyurls = true
-title = "Abridge"
-description = "Abridge is a fast and lightweight Zola theme using semantic html, abridge.css class-light CSS, and No Mandatory JS."
-default_language = "en"
+#base_url = "/home/jieiku/.dev/abridge/public/" # Usable site directly from disk, also set in [extra] uglyurls = true
+#title = "Abridge"
+#description = "Abridge is a fast and lightweight Zola theme using semantic html, abridge.css class-light CSS, and No Mandatory JS."
+#default_language = "en"
output_dir = "public"
compile_sass = true
-minify_html = false
-generate_feed = true
-feed_filename = "atom.xml"
+#minify_html = false
+#generate_feed = true
+#feed_filename = "atom.xml"
#ignored_content = ["*.{graphml,xlsx}", "temp.*"]
#hard_link_static = false # set to true to hard link instead of copying, useful for very large files.
taxonomies = [
@@ -20,202 +20,259 @@ taxonomies = [
build_search_index = true
[search] # Options specific to elasticlunr search.
+index_format = "elasticlunr_json"
include_title = true # include title of page/section in index
include_description = false # include description of page/section in index
include_content = true # include rendered content of page/section in index
-# Truncate content at nth character. Useful if index size significantly slows down the site.
-# truncate_content_length = 100
+# truncate_content_length = 100 # Truncate at nth character. May be useful if index is getting too large.
-[markdown]
-highlight_code = true
-highlight_theme = "css"
+#[markdown]
+#highlight_code = true
+#highlight_theme = "css"
-render_emoji = false
-external_links_target_blank = true # rel="noopener"
-external_links_no_follow = false # rel="nofollow"
-external_links_no_referrer = false # rel="noreferrer"
-smart_punctuation = false # `...` to `…`, `"quote"` to `“curly”` etc
+#render_emoji = false
+#external_links_target_blank = true # rel="noopener"
+#external_links_no_follow = false # rel="nofollow"
+#external_links_no_referrer = false # rel="noreferrer"
+#smart_punctuation = false # `...` to `…`, `"quote"` to `“curly”` etc
-[extra]
-uglyurls = false # if set to true then links are generated with the full path. eg https://abridge.netlify.app/index.html
-language_code = "en-US"
-title_separator = "|" # Separator between title and title_addition, set as |, -, _, etc
-# To disable title_addition but keep built in page additions eg, Posts page: "Posts | Abridge" set title_addition to an empty string
-# To always set the page title exactly eg "Abridge" then comment out the below line (not recommend, bad for SEO)
-title_addition = "Fast & Lightweight Zola Theme" # a default value for title addition
-recent = true # TOC / index
-recent_items = 9
-author = "Jake G" # Put Your Name here
+#[extra]
+#uglyurls = false # if set to true then links are generated with the full path. eg https://abridge.netlify.app/index.html
+#language_code = "en-US"
-title_size_index = "s85" # size: s95, s90, s85, s80, s75, s70, false(full size)
-meta_index = { position="bottom", size="s90", author=false, readtime=false, readstring="min", date=true, categories_tags=true, divider=" " }
-meta_post = { position="top", size="s95", author=true, readtime=false, readstring="min read", date=true, categories_tags=true, divider=" " }
-## position: top, bottom, both, false(hidden) ## size: s95, s90, s85, s80, s75, s70, false(full size)
-## divider: "·" "•" " "
-footer_size = "s90" # size: s95, s90, s85, s80, s75, s70, false(full size)
-footer_credit = true
+###############################################################################
+### meta/seo/analytic tags
+### To disable title_addition but keep built in page additions eg, Posts page: "Posts | Abridge" set title_addition to an empty string
+### To always set the page title exactly eg "Abridge" then comment out title_addition or set to false (not recommend, bad for SEO)
+###############################################################################
+
+#title_separator = "|" # Separator between title and title_addition, set as |, -, _, etc
+#title_addition = "Fast & Lightweight Zola Theme" # a default value for title addition
+#author = "Jake G" # Put Your Name here
+#keywords = "Abridge, Abridge.css, Zola, Theme, Zola Theme, getzola, Semantic Html, Fast, lightweight" # used for the primary site index
+#banner = "banner.png" # Used as default image for OpenGraph/Twitter if page specific image is undefined.
+#twitter = "your-user-name" # for SEO: twitter:site and twitter:creator
+#google = "Your Google Site verification code."
+#bing = "Your Bing Site verification code."
+#seo = true # enable or disable seo-related meta tags: opengraph, facebook, twitter
+
+
+###############################################################################
+### Layout & Format
+### position: top, bottom, both, false(hidden)
+### size: s95, s90, s85, s80, s75, s70, false(full size)
+### divider: " " "·" "•"
+###############################################################################
+
+#recent = true # TOC / index
+#recent_items = 9
+
+#meta_index = { position="bottom", size="s90", author=false, readtime=false, readstring="min", date=true, categories_tags=true, divider=" " }
+#meta_post = { position="top", size="s95", author=true, readtime=false, readstring="min read", date=true, categories_tags=true, divider=" " }
+
+#title_size_index = "s85" # size: s95, s90, s85, s80, s75, s70, false(full size)
+#footer_size = "s90" # size: s95, s90, s85, s80, s75, s70, false(full size)
+#footer_credit = false
#footer_credit_override = '<p class="s90">Powered by <a href="https://www.getzola.org/" target="_blank">Zola</a> &#38; <a href="https://github.com/Jieiku/abridge/" target="_blank">Abridge</a></p>'
-#uncomment one of the two lines, or neither, depending on which type of logo you want to use:
+### Uncomment one of the below lines, or neither, depending on which type of logo you want to use:
#logo = { file="logo.svg", width="32", height="32", alt="Abridge", text="bridge" }
#textlogo = '<font color="#f90">A</font>bridge'
-textlogo = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#f90" viewBox="0 0 96 96" width="32" height="32"><path stroke-width="14" d="M14 99 46 7h4l32 92"/><path stroke-width="9" d="M-3 82c43-26 59-26 102 0"/><path stroke-linecap="round" stroke-width="1.5" d="M94 72v7m-5-9.8v7m-5-9.8v7.1M79 64v7M63 57.7v7m-5-8.2v7m-5-7.8v7m-5-7.2v7m-5-6.7v7m-5-6.3v7m-5-5.8v7M17 64v7m-5-4.6v7m-5-4.2v7M2 72v7"/></svg>bridge'
+#textlogo = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#f90" viewBox="0 0 96 96" width="32" height="32"><path stroke-width="14" d="M14 99 46 7h4l32 92"/><path stroke-width="9" d="M-3 82c43-26 59-26 102 0"/><path stroke-linecap="round" stroke-width="1.5" d="M94 72v7m-5-9.8v7m-5-9.8v7.1M79 64v7M63 57.7v7m-5-8.2v7m-5-7.8v7m-5-7.2v7m-5-6.7v7m-5-6.3v7m-5-5.8v7M17 64v7m-5-4.6v7m-5-4.2v7M2 72v7"/></svg>bridge'
-sitedesc = false # enables or disables the display of the site description below the logo.
+#sitedesc = false # enables or disables the display of the site description below the logo.
#copyright_start_year = 2019 # optional
#copyright_end_year = 2020 # optional, recommend leaving unset, zola build will set this to current year by default
-headhr = false # show or hide horizontal rule below header
-foothr = true # show or hide horizontal rule above footer
+#headhr = false # show or hide horizontal rule below header
+#foothr = true # show or hide horizontal rule above footer
-menu = [
- {url = "/about/", name = "About", slash = true, blank = false},
- {url = "/posts/", name = "Posts", slash = true, blank = false},
- {url = "/categories/", name = "Categories", slash = true, blank = false},
- {url = "/tags/", name = "Tags", slash = true, blank = false},
-]
-menu_footer = [
- {url = "/about/", name = "About", slash = true, blank = false},
- {url = "/contact/", name = "Contact", slash = true, blank = false},
- {url = "/privacy/", name = "Privacy", slash = true, blank = false},
- {url = "/sitemap.xml", name = "Sitemap", slash = false, blank = true},
-]
+#menu = [
+# {url = "/about/", name = "About", slash = true, blank = false},
+# {url = "/posts/", name = "Posts", slash = true, blank = false},
+# {url = "/categories/", name = "Categories", slash = true, blank = false},
+# {url = "/tags/", name = "Tags", slash = true, blank = false},
+#]
+#menu_footer = [
+# {url = "/about/", name = "About", slash = true, blank = false},
+# {url = "/contact/", name = "Contact", slash = true, blank = false},
+# {url = "/privacy/", name = "Privacy", slash = true, blank = false},
+# {url = "/sitemap.xml", name = "Sitemap", slash = false, blank = true},
+#]
-# Security Headers should preferably be set by your webserver (Nginx, Apache) https://observatory.mozilla.org https://csp-evaluator.withgoogle.com/
-# If you are unable to load your security headers with your webserver, this will load a couple of them as meta tags.
-# There are many other security related headers most of which can only be set by the webserver method.
-# Comment out either of these meta headers and they wont be used.
-#security_header_referrer = "strict-origin-when-cross-origin"
+###############################################################################
+### Resource Files
+### You can load extra css files if you need to, just separate by comma:
+### stylesheets = [ "abridge.css", "extra.css" ]
+###############################################################################
-#security_header_csp = "default-src 'none'; frame-ancestors 'none'; object-src 'none'; base-uri 'self'; manifest-src 'self'; connect-src 'self'; form-action 'self'; script-src 'self'; img-src 'self' data: cdn.cloudflare.com; frame-src 'self' www.youtube-nocookie.com player.vimeo.com; media-src 'self' data: cdn.cloudflare.com www.youtube-nocookie.com player.vimeo.com; font-src 'self' cdn.cloudflare.com cdn.jsdelivr.net fonts.gstatic.com; style-src 'self' 'unsafe-inline' cdn.cloudflare.com cdn.jsdelivr.net fonts.googleapis.com;"
+#integrity = true # increases site security, should normally be true. (setting to false is useful during js development)
+#js_bundle = false # multiple javascript files combined into a single file (setting to false is useful during js development)
+
+#js_switcher = true # The button that allows manually changing between light/dark mode.
-#################
-# Resource Files
-#################
-integrity = true # setting this to false is useful for developing, should normally be true.
-js_bundle = true # multiple javascript files combined into a single file
-js_switcher = true
-js_search_facade = true # Do not load search until user interaction with search.
-# search library to use, valid values are: false, "elasticlunr", "tinysearch", "stork"
-search_library = false
+#search_library = false # search library to use, valid values are: false, "elasticlunr", "tinysearch", "stork" (false/elasticlunr causes issues)
-js_search_index = "search_index.en.js" # Separate Always, generated each build
-js_prestyle = "prestyle.js"# Bundleable - used to preload: FontAwesome, Katex, external Google Fonts
-js_codecopy = "codecopy.js"# Bundleable
-js_email = "email.js"# Bundleable
-js_theme = "theme.min.js" # Separate Always, comment out if using -auto/-light/-dark stylesheet. (required for switcher)
-js_themeButton = "theme_button.js"# Bundleable
+#js_search_index = "search_index.en.json" # Separate Always, generated each build
+#js_theme = "theme.min.js" # Separate Always, comment out if using -auto/-light/-dark stylesheet. (required for switcher)
+#js_themeButton = "theme_button.js"# Bundleable - light/dark switcher button
+#js_prestyle = "prestyle.js"# Bundleable - used to preload: FontAwesome, Katex, external Google Fonts
+#js_codecopy = "codecopy.js"# Bundleable - copy code block to clipboard button
+#js_email = "email.js"# Bundleable - obfuscates email address in footer
########## Switcher ########## (comment this block out if NOT using switcher):
-stylesheets = [ "abridge-switcher.css" ] # Orange Automatic Dark/Light Theme based on browser/system preference with switcher
-#stylesheets = [ "abridge-blue-switcher.css" ] # Blue Automatic Night/Light Theme based on browser/system preference with switcher
-#stylesheets = [ "abridge-blueshade-switcher.css" ] # BlueShade Automatic Night/Light Theme based on browser/system preference with switcher
-#stylesheets = [ "abridge-switcher.css", "font.css" ] # include your own font!
-#stylesheets = [ "abridge-switcher.css", "iconfont.css" ] # include your own font icons!
-#stylesheets = [ "abridge-switcher.css", "font.css", "iconfont.css" ] # include your own font, and font icons!
+#stylesheets = [ "abridge.css" ] # Orange Automatic Dark/Light Theme based on browser/system preference with switcher
########## No Switcher ##########
-#stylesheets = [ "abridge.css" ] # Orange Automatic Dark/Light Theme based on browser/system preference
-#stylesheets = [ "abridge-blue.css" ] # Blue Automatic Night/Light Theme based on browser/system preference
-#stylesheets = [ "abridge-blueshade.css" ] # BlueShade Automatic Night/Light Theme based on browser/system preference
+#stylesheets = [ "abridge-auto.css" ] # Orange Automatic Dark/Light Theme based on browser/system preference
#stylesheets = [ "abridge-dark.css" ] # Orange Dark Theme
#stylesheets = [ "abridge-light.css" ] # Orange Light Theme
-#stylesheets = [ "abridge-blue-dark.css" ] # Blue Dark Theme
-#stylesheets = [ "abridge-blue-light.css" ] # Blue Light Theme
-#stylesheets = [ "abridge-blueshade-dark.css" ] # BlueShade Dark Theme
-#stylesheets = [ "abridge-blueshade-light.css" ] # BlueShade Light Theme
-#stylesheets = [ "abridge.css", "extra.css" ] # example loading extra css
-#stylesheets = [ "abridge.css", "syntax/syntax-abridge.css" ]
-banner = "banner.png" # Used as default image for OpenGraph/Twitter if page specific image is undefined.
-# favicons, comment out a line to disable loading some or all of these.
-favicon_theme_color = "#333333"
-favicon_ms_color = "#333333"
-favicon_webmanifest = "site.webmanifest" # Used for android-chrome-512x512.png and android-chrome-192x192.png
-favicon_mask = "safari-pinned-tab.svg" # safari-pinned-tab.svg
-favicon_mask_color = "#ff9900"
-favicon180 = "apple-touch-icon.png" # apple-touch-icon.png
-favicon32 = "favicon-32x32.png" # favicon-32x32.png
-favicon16 = "favicon-16x16.png" # favicon-16x16.png
-icon_search = "svgs search" # Search button in search box.
-icon_adjust = "svgs adjust" # Theme Switcher button in top menu. (add class svgh to change colors on hover)
-icon_first = "svgs svgh angll" # Pagination First Page.
-icon_prev = "svgs svgh angl" # Pagination Previous Page.
-icon_next = "svgs svgh angr" # Pagination Next Page.
-icon_last = "svgs svgh angrr" # Pagination Last Page.
-icon_top = "svgs svgh angu" # Back to Top Button.
+###############################################################################
+### Favicons, comment out a line to disable loading some or all of these if needed.
+###############################################################################
-# Uncomment below line to load fontawesome, eg: <i class="fa-solid fa-heart"></i>
-#fontawesome = "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.1/css/all.min.css"
+#favicon_theme_color = "#333333"
+#favicon_ms_color = "#333333"
+#favicon_webmanifest = "site.webmanifest" # Used for android-chrome-512x512.png and android-chrome-192x192.png
+#favicon_mask = "safari-pinned-tab.svg" # safari-pinned-tab.svg
+#favicon_mask_color = "#ff9900"
+#favicon180 = "apple-touch-icon.png" # apple-touch-icon.png
+#favicon32 = "favicon-32x32.png" # favicon-32x32.png
+#favicon16 = "favicon-16x16.png" # favicon-16x16.png
+
+
+###############################################################################
+### Icons
+### Loading the entire fontawesome icon collection will negatively impact your sites performance.
+### For a lightweight solution consider adding only the icons that you need to the following file:
+### https://github.com/Jieiku/abridge/blob/master/sass/include/_icons.scss
+###############################################################################
+
+### To disable any of these icons set them to "false" (will default to unicode icons instead)
+#icon_search = "svgs search" # Search button in search box.
+#icon_adjust = "svgs adjust" # Theme Switcher button in top menu. (add class svgh to change colors on hover)
+#icon_first = "svgs svgh angll" # Pagination First Page.
+#icon_prev = "svgs svgh angl" # Pagination Previous Page.
+#icon_next = "svgs svgh angr" # Pagination Next Page.
+#icon_last = "svgs svgh angrr" # Pagination Last Page.
+#icon_top = "svgs svgh angu" # Back to Top Button.
-# Icons, by default fontawesome classes, but you can specify any icon you want here.
#icon_read = "svgs fa-solid fa-glasses" # displayed in metadata on index and below title on page.
#icon_date = "svgs fa-solid fa-calendar" # displayed in metadata on index and below title on page.
#icon_info = "svgs fa-solid fa-circle-info" # displayed in metadata on index and below title on page for categories/tags
#icon_author = "svgs fa-solid fa-pen-fancy" # displayed in metadata on index and below title on page.
-# For externally loaded Fonts, make sure to include the FULL url including the http/https prefix
-#fonts = [ {url = "https://fonts.googleapis.com/css?family=Montserrat:400,700,italic|Fira+Code:400,italic"} ]
+### Uncomment below line to load fontawesome, eg: <i class="fa-solid fa-heart"></i>
+#fontawesome = "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.1/css/all.min.css"
+#icon_read = "svgs fa-solid fa-glasses" # displayed in metadata on index and below title on page.
+#icon_date = "svgs fa-solid fa-calendar" # displayed in metadata on index and below title on page.
+#icon_info = "svgs fa-solid fa-circle-info" # displayed in metadata on index and below title on page for categories/tags
+#icon_author = "svgs fa-solid fa-pen-fancy" # displayed in metadata on index and below title on page.
+
+
+###############################################################################
+### Footer social links; these are used in macros/social.html
+### https://github.com/Jieiku/abridge/blob/master/templates/macros/social.html
+###############################################################################
+
+#[extra.social]
+#feed = true # this adds the RSS feed icon in the footer.
+#mail_encode = true # This obfuscates your email address, javascript is used to decode it at page load.
+#mail = "name@example.com"
+#mastodon = "@your-user-name"
+#element = "matrix.example.com"
+#matrix = "matrix.example.com"
+#buymeacoffee = "your-user-name"
+#discord = "your-discord" # Everything after https://discord.com/ eg: invite/my-server *or* servers/my-server-id
+#twitter = "your-user-name"
+#facebook = "your-user-name"
+#linkedin = "your-user-name"
+#gitlab = "your-user-name"
+#github = "your-user-name"
+#codeberg = "your-user-name" # Everything after https://codeberg.org/ eg: username *or* username/repository
+#github_sponsor = "your-user-name"
+#bitbucket = "your-user-name"
+#python = "your-user-name"
+#docker = "your-user-name"
+#stack = "your-user-name"
+#instagram = "your-user-name"
+#pinterest = "your-user-name"
+#twitch = "your-user-name"
+#youtube = "channel/your-channel-id"
+#researchgate = "your-profile-id"
+
+
+###############################################################################
+### Security Settings
+### Security Headers should preferably be set by your webserver (Nginx, Apache)
+### https://observatory.mozilla.org https://csp-evaluator.withgoogle.com/
+### If you are unable to load your security headers with your webserver, this will load a couple of them as meta tags.
+### There are many other security related headers most of which can only be set by the webserver method.
+### If you happen to use Netlify, you can define all the headers in your netlify.toml file:
+### https://github.com/Jieiku/abridge/blob/master/netlify.toml
+### UnComment any of these lines to enable their meta tags.
+###############################################################################
+
+#security_header_referrer = "strict-origin-when-cross-origin"
+
+#security_header_csp = "default-src 'none'; frame-ancestors 'none'; object-src 'none'; base-uri 'self'; manifest-src 'self'; connect-src 'self'; form-action 'self'; script-src 'self'; img-src 'self' data: cdn.cloudflare.com; frame-src 'self' www.youtube-nocookie.com player.vimeo.com; media-src 'self' data: cdn.cloudflare.com www.youtube-nocookie.com player.vimeo.com; font-src 'self' cdn.cloudflare.com cdn.jsdelivr.net fonts.gstatic.com; style-src 'self' 'unsafe-inline' cdn.cloudflare.com cdn.jsdelivr.net fonts.googleapis.com;"
+
+
+###############################################################################
+### FONTS
+### Abridge by default uses the System Font Stack:
+### https://css-tricks.com/snippets/css/system-font-stack/
+### The System Font Stack offers the best performance, but if you need you can load a specific font.
+###############################################################################
+
+### For externally loaded Fonts, make sure to include the FULL url including the https prefix:
+
+#fonts = [ {url = "https://fonts.googleapis.com/css?family=Roboto:400,700,italic|Roboto+Mono:400,italic"} ]
+
+### Local fonts are defined in the css, https://github.com/Jieiku/abridge/blob/master/sass/fonts/_Roboto.scss
+### To import one include in the imports file: https://github.com/Jieiku/abridge/blob/master/sass/_imports.scss
+
+### After importing them in the CSS, You can also define them below and it will add the preload tag to the head.
+### preloading fonts will eliminate Content Layout Shift, but will hurt with page load time. (not recommended)
-# Local fonts are defined in the css, defining them here only adds the preload tag to the head.
-# preload will eliminate Content Layout Shift, but will hurt with page load time. (not recommended)
#fonts = [
-# {url = "font/FiraCode.woff2"},
+# {url = "font/Roboto-Mono.woff2"},
+# {url = "font/Roboto-Mono-Italic.woff2"},
# {url = "font/Roboto.woff2"},
# {url = "font/Roboto-Italic.woff2"},
# {url = "font/Roboto-Bold.woff2"},
#]
-math = false # katex math js library, used to to render mathematical notations, requires javascript
-math_auto_render = false
+###############################################################################
+### Katex - math js library, used to to render mathematical notations
+### It's best to enable katex on a per page bases as I did here:
+### https://abridge.netlify.app/overview-math/
+### https://github.com/Jieiku/abridge/blob/master/content/overview-math.md?plain=1#L11-L13
+### Otherwise you will load the katex related javascript on every page!
+###############################################################################
+
+#katex_options = "katexoptions.js"
+#katex_bundle = "katexbundle.min.js"
+
+### Load Katex Local Resources
+#katex_css = "katex.min.css" # Fonts - load the css/fonts locally
+#katex_js = "katex.min.js" # use local js, so that we dont have to whitelist cdn.jsdelivr.net for script src in CSP
+#mathtex_js = "mathtex-script-type.min.js" # use local js, so that we dont have to whitelist cdn.jsdelivr.net for script src in CSP
+#katex_autorender_js = "auto-render.min.js"
+
+### Load Katex External Resources
#katex_css = "https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.css" # Fonts - use remote fonts
+#katex_css_integrity = "sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs"
#katex_js = "https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.js"
+#katex_js_integrity = "sha384-ljao5I1l+8KYFXG7LNEA7DyaFvuvSCmedUf6Y6JI7LJqiu8q5dEivP2nDdFH31V4"
#katex_autorender_js = "https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/contrib/auto-render.min.js"
+#katex_autorender_js_integrity = "sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR"
#mathtex_js = "https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/contrib/mathtex-script-type.min.js"
+#mathtex_js_integrity = "sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT"
-katex_css = "katex.min.css" # Fonts - to load the css locally, you also need to have all the fonts.
-katex_js = "katex.min.js" # use local js, so that we dont have to whitelist cdn.jsdelivr.net for script src in CSP
-mathtex_js = "mathtex-script-type.min.js" # use local js, so that we dont have to whitelist cdn.jsdelivr.net for script src in CSP
-katex_autorender_js = "auto-render.min.js"
-katex_options = "katexoptions.js"
-katex_bundle = "katexbundle.min.js"
-
-
-##########################
-# meta/seo/analytic tags
-##########################
-keywords = "Abridge, Abridge.css, Zola, Theme, Zola Theme, getzola, Semantic Html, Fast, lightweight" # used for the primary site index
-twitter = "your-user-name" # used for twitter related
-#google = "Your Google Site verification code."
-#bing = "Your Bing Site verification code."
-seo = true # enable or disable seo-related meta tags: opengraph, facebook, twitter
-
-# Footer social links; full options listed in macros/social.html
-[extra.social]
-feed = true
-mail_encode = true # This obfuscates your email address, javascript is used to decode it at page load.
-mail = "name@example.com"
-mastodon = "@your-user-name"
-element = "matrix.example.com"
-#matrix = "matrix.example.com"
-buymeacoffee = "your-user-name"
-discord = "your-discord" # Everything after https://discord.com/ eg: invite/my-server *or* servers/my-server-id
-twitter = "your-user-name"
-facebook = "your-user-name"
-linkedin = "your-user-name"
-gitlab = "your-user-name"
-github = "your-user-name"
-codeberg = "your-user-name" # Everything after https://codeberg.org/ eg: username *or* username/repository
-github_sponsor = "your-user-name"
-bitbucket = "your-user-name"
-python = "your-user-name"
-docker = "your-user-name"
-stack = "your-user-name"
-instagram = "your-user-name"
-pinterest = "your-user-name"
-twitch = "your-user-name"
-youtube = "channel/your-channel-id"
-researchgate = "your-profile-id"
+#math = false # Recommended setting false, and enable on per page bases instead.
+#math_auto_render = false # Recommended setting false, and enable on per page bases instead.
diff --git a/sass/_imports.scss b/sass/_imports.scss
index 6e61b8e..3c2630c 100644
--- a/sass/_imports.scss
+++ b/sass/_imports.scss
@@ -15,6 +15,13 @@
// Config
@import "variables";
+//@import "fonts/Roboto";
+//@import "fonts/Roboto-Mono"; // Monospaced
+//@import "fonts/Arimo";
+//@import "fonts/Lato";
+//@import "fonts/FiraCode"; // Monospaced
+//@import "fonts/Abridge"; // Icon Font (don't recommend, CSS only icons are in my opinion better.)
+
// Includes - Sorted by importance/category (includes at top are needed most frequently)
@import "include/document"; // html
@import "include/typography"; // a, headings, p, ul, blockquote, ...
diff --git a/sass/abridge-auto.scss b/sass/abridge-auto.scss
new file mode 100644
index 0000000..93440c8
--- /dev/null
+++ b/sass/abridge-auto.scss
@@ -0,0 +1,31 @@
+@import "imports";
+@import "syntax/syntax-abridge";
+// In parenthesis at the end of each comment are tested colors separated by commma, the first value is the default.
+:root {
+ --f1: #ccc;// Font Color Primary (ccc)
+ --f2: #ddd;// Font color Headers (ddd)
+ --c1: #111;// Background Color Primary (111)
+ --c2: #222;// Background Color Secondary (222,123)
+ --c3: #333;// Table Rows, Block quote edge, Borders (333,345)
+ --c4: #888;// Disabled Buttons, Borders, mark background (888,789)
+ --a1: #f90;// link color (f90,09f)
+ --a2: #fb0;// link hover/focus color (fb0,0bf)
+ --a3: #f90;// link h1-h2 hover/focus color (f90,0af)
+ --cg: #593;// ins green, success (593)
+ --cr: #e33;// del red, errors (e33)
+}
+@media (prefers-color-scheme: light) {
+ :root {
+ --f1: #444;// Font Color Primary (444)
+ --f2: #333;// Font color Headers (333)
+ --c1: #fff;// Background Color Primary (fff)
+ --c2: #eee;// Background Color Secondary (eee,def)
+ --c3: #ddd;// Table Rows, Block quote edge, Borders (ddd,137)
+ --c4: #677;// Disabled Buttons, Borders, mark background (677,013)
+ --a1: #c40;// link color (c40,06e)
+ --a2: #e60;// link hover/focus color (e60,09f)
+ --a3: #f90;// link h1-h2 hover/focus color (f90,07f)
+ --cg: #373;// ins green, success (373)
+ --cr: #d33;// del red, errors (d33)
+ }
+}
diff --git a/sass/abridge-blue-dark.scss b/sass/abridge-blue-dark.scss
deleted file mode 100644
index 7b7a352..0000000
--- a/sass/abridge-blue-dark.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
-@import "imports";
-@import "syntax/syntax-abridge-dark";
-
-:root {
- --f1: #ccc;// Font Color Primary
- --f2: #ddd;// Font color Headers
- --c1: #111;// Background Color Primary
- --c2: #222;// Background Color Secondary
- --c3: #333;// Table Rows, Block quote edge, Borders
- --c4: #888;// Disabled Buttons, Borders, mark background
- --a1: #09f;// link color
- --a2: #0bf;// link hover/focus color
- --a3: #0af;// link h1-h2 hover/focus color
- --cg: #593; // ins green, success
- --cr: #e33; // del red, errors
-}
diff --git a/sass/abridge-blue-light.scss b/sass/abridge-blue-light.scss
deleted file mode 100644
index 1ae982b..0000000
--- a/sass/abridge-blue-light.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
-@import "imports";
-@import "syntax/syntax-abridge-light";
-
-:root {
- --f1: #444;// Font Color Primary
- --f2: #333;// Font color Headers
- --c1: #fff;// Background Color Primary
- --c2: #eee;// Background Color Secondary
- --c3: #ddd;// Table Rows, Block quote edge, Borders
- --c4: #677;// Disabled Buttons, Borders, mark background
- --a1: #06e;// link color
- --a2: #09f;// link hover/focus color
- --a3: #07f;// link h1-h2 hover/focus color
- --cg: #373; // ins green, success
- --cr: #d33; // del red, errors
-}
diff --git a/sass/abridge-blue-switcher.scss b/sass/abridge-blue-switcher.scss
deleted file mode 100644
index bed7958..0000000
--- a/sass/abridge-blue-switcher.scss
+++ /dev/null
@@ -1,34 +0,0 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
-@import "imports";
-@import "syntax/syntax-abridge-switcher";
-
-:root:not(.light) {
- --f1: #ccc;// Font Color Primary
- --f2: #ddd;// Font color Headers
- --c1: #111;// Background Color Primary
- --c2: #222;// Background Color Secondary
- --c3: #333;// Table Rows, Block quote edge, Borders
- --c4: #888;// Disabled Buttons, Borders, mark background
- --a1: #09f;// link color
- --a2: #0bf;// link hover/focus color
- --a3: #0af;// link h1-h2 hover/focus color
- --cg: #593; // ins green, success
- --cr: #e33; // del red, errors
-}
-:root.light {
- --f1: #444;// Font Color Primary
- --f2: #333;// Font color Headers
- --c1: #fff;// Background Color Primary
- --c2: #eee;// Background Color Secondary
- --c3: #ddd;// Table Rows, Block quote edge, Borders
- --c4: #677;// Disabled Buttons, Borders, mark background
- --a1: #06e;// link color
- --a2: #09f;// link hover/focus color
- --a3: #07f;// link h1-h2 hover/focus color
- --cg: #373; // ins green, success
- --cr: #d33; // del red, errors
-}
diff --git a/sass/abridge-blue.scss b/sass/abridge-blue.scss
deleted file mode 100644
index 02cb58f..0000000
--- a/sass/abridge-blue.scss
+++ /dev/null
@@ -1,36 +0,0 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
-@import "imports";
-@import "syntax/syntax-abridge";
-
-:root {
- --f1: #ccc;// Font Color Primary
- --f2: #ddd;// Font color Headers
- --c1: #111;// Background Color Primary
- --c2: #222;// Background Color Secondary
- --c3: #333;// Table Rows, Block quote edge, Borders
- --c4: #888;// Disabled Buttons, Borders, mark background
- --a1: #09f;// link color
- --a2: #0bf;// link hover/focus color
- --a3: #0af;// link h1-h2 hover/focus color
- --cg: #593; // ins green, success
- --cr: #e33; // del red, errors
-}
-@media (prefers-color-scheme: light) {
- :root {
- --f1: #444;// Font Color Primary
- --f2: #333;// Font color Headers
- --c1: #fff;// Background Color Primary
- --c2: #eee;// Background Color Secondary
- --c3: #ddd;// Table Rows, Block quote edge, Borders
- --c4: #677;// Disabled Buttons, Borders, mark background
- --a1: #06e;// link color
- --a2: #09f;// link hover/focus color
- --a3: #07f;// link h1-h2 hover/focus color
- --cg: #373; // ins green, success
- --cr: #d33; // del red, errors
- }
-}
diff --git a/sass/abridge-blueshade-dark.scss b/sass/abridge-blueshade-dark.scss
deleted file mode 100644
index 627f777..0000000
--- a/sass/abridge-blueshade-dark.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
-@import "imports";
-@import "syntax/syntax-abridge-dark";
-
-:root {
- --f1: #ccc;// Font Color Primary
- --f2: #ddd;// Font color Headers
- --c1: #111;// Background Color Primary
- --c2: #123;// Background Color Secondary
- --c3: #345;// Table Rows, Block quote edge, Borders
- --c4: #789;// Disabled Buttons, Borders, mark background
- --a1: #09f;// link color
- --a2: #0bf;// link hover/focus color
- --a3: #0af;// link h1-h2 hover/focus color
- --cg: #593; // ins green, success
- --cr: #e33; // del red, errors
-}
diff --git a/sass/abridge-blueshade-light.scss b/sass/abridge-blueshade-light.scss
deleted file mode 100644
index 8fdf66c..0000000
--- a/sass/abridge-blueshade-light.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
-@import "imports";
-@import "syntax/syntax-abridge-light";
-
-:root {
- --f1: #444;// Font Color Primary
- --f2: #333;// Font color Headers
- --c1: #fff;// Background Color Primary
- --c2: #def;// Background Color Secondary
- --c3: #137;// Table Rows, Block quote edge, Borders
- --c4: #013;// Disabled Buttons, Borders, mark background
- --a1: #06e;// link color
- --a2: #09f;// link hover/focus color
- --a3: #07f;// link h1-h2 hover/focus color
- --cg: #373; // ins green, success
- --cr: #d33; // del red, errors
-}
diff --git a/sass/abridge-blueshade-switcher.scss b/sass/abridge-blueshade-switcher.scss
deleted file mode 100644
index 379468b..0000000
--- a/sass/abridge-blueshade-switcher.scss
+++ /dev/null
@@ -1,34 +0,0 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
-@import "imports";
-@import "syntax/syntax-abridge-switcher";
-
-:root:not(.light) {
- --f1: #ccc;// Font Color Primary
- --f2: #ddd;// Font color Headers
- --c1: #111;// Background Color Primary
- --c2: #123;// Background Color Secondary
- --c3: #345;// Table Rows, Block quote edge, Borders
- --c4: #789;// Disabled Buttons, Borders, mark background
- --a1: #09f;// link color
- --a2: #0bf;// link hover/focus color
- --a3: #0af;// link h1-h2 hover/focus color
- --cg: #593; // ins green, success
- --cr: #e33; // del red, errors
-}
-:root.light {
- --f1: #444;// Font Color Primary
- --f2: #333;// Font color Headers
- --c1: #fff;// Background Color Primary
- --c2: #def;// Background Color Secondary
- --c3: #137;// Table Rows, Block quote edge, Borders
- --c4: #013;// Disabled Buttons, Borders, mark background
- --a1: #06e;// link color
- --a2: #09f;// link hover/focus color
- --a3: #07f;// link h1-h2 hover/focus color
- --cg: #373; // ins green, success
- --cr: #d33; // del red, errors
-}
diff --git a/sass/abridge-blueshade.scss b/sass/abridge-blueshade.scss
deleted file mode 100644
index 93f47e0..0000000
--- a/sass/abridge-blueshade.scss
+++ /dev/null
@@ -1,36 +0,0 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
-@import "imports";
-@import "syntax/syntax-abridge";
-
-:root {
- --f1: #ccc;// Font Color Primary
- --f2: #ddd;// Font color Headers
- --c1: #111;// Background Color Primary
- --c2: #123;// Background Color Secondary
- --c3: #345;// Table Rows, Block quote edge, Borders
- --c4: #789;// Disabled Buttons, Borders, mark background
- --a1: #09f;// link color
- --a2: #0bf;// link hover/focus color
- --a3: #0af;// link h1-h2 hover/focus color
- --cg: #593; // ins green, success
- --cr: #e33; // del red, errors
-}
-@media (prefers-color-scheme: light) {
- :root {
- --f1: #444;// Font Color Primary
- --f2: #333;// Font color Headers
- --c1: #fff;// Background Color Primary
- --c2: #def;// Background Color Secondary
- --c3: #137;// Table Rows, Block quote edge, Borders
- --c4: #013;// Disabled Buttons, Borders, mark background
- --a1: #06e;// link color
- --a2: #09f;// link hover/focus color
- --a3: #07f;// link h1-h2 hover/focus color
- --cg: #373; // ins green, success
- --cr: #d33; // del red, errors
- }
-}
diff --git a/sass/abridge-dark.scss b/sass/abridge-dark.scss
index 212b4fc..eaf1474 100644
--- a/sass/abridge-dark.scss
+++ b/sass/abridge-dark.scss
@@ -1,21 +1,16 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
@import "imports";
@import "syntax/syntax-abridge-dark";
-
+// In parenthesis at the end of each comment are tested colors separated by commma, the first value is the default.
:root {
- --f1: #ccc;// Font Color Primary
- --f2: #ddd;// Font color Headers
- --c1: #111;// Background Color Primary
- --c2: #222;// Background Color Secondary
- --c3: #333;// Table Rows, Block quote edge, Borders
- --c4: #888;// Disabled Buttons, Borders, mark background
- --a1: #f90;// link color
- --a2: #fb0;// link hover/focus color
- --a3: #f90;// link h1-h2 hover/focus color
- --cg: #593; // ins green, success
- --cr: #e33; // del red, errors
+ --f1: #ccc;// Font Color Primary (ccc)
+ --f2: #ddd;// Font color Headers (ddd)
+ --c1: #111;// Background Color Primary (111)
+ --c2: #222;// Background Color Secondary (222,123)
+ --c3: #333;// Table Rows, Block quote edge, Borders (333,345)
+ --c4: #888;// Disabled Buttons, Borders, mark background (888,789)
+ --a1: #f90;// link color (f90,09f)
+ --a2: #fb0;// link hover/focus color (fb0,0bf)
+ --a3: #f90;// link h1-h2 hover/focus color (f90,0af)
+ --cg: #593;// ins green, success (593)
+ --cr: #e33;// del red, errors (e33)
}
diff --git a/sass/abridge-light.scss b/sass/abridge-light.scss
index d0f204c..34c9bbc 100644
--- a/sass/abridge-light.scss
+++ b/sass/abridge-light.scss
@@ -1,21 +1,16 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
@import "imports";
@import "syntax/syntax-abridge-light";
-
+// In parenthesis at the end of each comment are tested colors separated by commma, the first value is the default.
:root {
- --f1: #444;// Font Color Primary
- --f2: #333;// Font color Headers
- --c1: #fff;// Background Color Primary
- --c2: #eee;// Background Color Secondary
- --c3: #ddd;// Table Rows, Block quote edge, Borders
- --c4: #677;// Disabled Buttons, Borders, mark background
- --a1: #c40;// link color
- --a2: #e60;// link hover/focus color
- --a3: #f90;// link h1-h2 hover/focus color
- --cg: #373; // ins green, success
- --cr: #d33; // del red, errors
+ --f1: #444;// Font Color Primary (444)
+ --f2: #333;// Font color Headers (333)
+ --c1: #fff;// Background Color Primary (fff)
+ --c2: #eee;// Background Color Secondary (eee,def)
+ --c3: #ddd;// Table Rows, Block quote edge, Borders (ddd,137)
+ --c4: #677;// Disabled Buttons, Borders, mark background (677,013)
+ --a1: #c40;// link color (c40,06e)
+ --a2: #e60;// link hover/focus color (e60,09f)
+ --a3: #f90;// link h1-h2 hover/focus color (f90,07f)
+ --cg: #373;// ins green, success (373)
+ --cr: #d33;// del red, errors (d33)
}
diff --git a/sass/abridge-switcher.scss b/sass/abridge-switcher.scss
deleted file mode 100644
index 37e0cef..0000000
--- a/sass/abridge-switcher.scss
+++ /dev/null
@@ -1,34 +0,0 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
-@import "imports";
-@import "syntax/syntax-abridge-switcher";
-
-:root:not(.light) {
- --f1: #ccc;// Font Color Primary
- --f2: #ddd;// Font color Headers
- --c1: #111;// Background Color Primary
- --c2: #222;// Background Color Secondary
- --c3: #333;// Table Rows, Block quote edge, Borders
- --c4: #888;// Disabled Buttons, Borders, mark background
- --a1: #f90;// link color
- --a2: #fb0;// link hover/focus color
- --a3: #f90;// link h1-h2 hover/focus color
- --cg: #593; // ins green, success
- --cr: #e33; // del red, errors
-}
-:root.light {
- --f1: #444;// Font Color Primary
- --f2: #333;// Font color Headers
- --c1: #fff;// Background Color Primary
- --c2: #eee;// Background Color Secondary
- --c3: #ddd;// Table Rows, Block quote edge, Borders
- --c4: #677;// Disabled Buttons, Borders, mark background
- --a1: #c40;// link color
- --a2: #e60;// link hover/focus color
- --a3: #f90;// link h1-h2 hover/focus color
- --cg: #373; // ins green, success
- --cr: #d33; // del red, errors
-}
diff --git a/sass/abridge.scss b/sass/abridge.scss
index e99e5d9..af1bf5d 100644
--- a/sass/abridge.scss
+++ b/sass/abridge.scss
@@ -1,36 +1,29 @@
-//@import "fonts/Abridge";
-//@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced
@import "imports";
-@import "syntax/syntax-abridge";
-
-:root {
- --f1: #ccc;// Font Color Primary
- --f2: #ddd;// Font color Headers
- --c1: #111;// Background Color Primary
- --c2: #222;// Background Color Secondary
- --c3: #333;// Table Rows, Block quote edge, Borders
- --c4: #888;// Disabled Buttons, Borders, mark background
- --a1: #f90;// link color
- --a2: #fb0;// link hover/focus color
- --a3: #f90;// link h1-h2 hover/focus color
- --cg: #593; // ins green, success
- --cr: #e33; // del red, errors
+@import "syntax/syntax-abridge-switcher";
+// In parenthesis at the end of each comment are tested colors separated by commma, the first value is the default.
+:root:not(.light) {
+ --f1: #ccc;// Font Color Primary (ccc)
+ --f2: #ddd;// Font color Headers (ddd)
+ --c1: #111;// Background Color Primary (111)
+ --c2: #222;// Background Color Secondary (222,123)
+ --c3: #333;// Table Rows, Block quote edge, Borders (333,345)
+ --c4: #888;// Disabled Buttons, Borders, mark background (888,789)
+ --a1: #f90;// link color (f90,09f)
+ --a2: #fb0;// link hover/focus color (fb0,0bf)
+ --a3: #f90;// link h1-h2 hover/focus color (f90,0af)
+ --cg: #593;// ins green, success (593)
+ --cr: #e33;// del red, errors (e33)
}
-@media (prefers-color-scheme: light) {
- :root {
- --f1: #444;// Font Color Primary
- --f2: #333;// Font color Headers
- --c1: #fff;// Background Color Primary
- --c2: #eee;// Background Color Secondary
- --c3: #ddd;// Table Rows, Block quote edge, Borders
- --c4: #677;// Disabled Buttons, Borders, mark background
- --a1: #c40;// link color
- --a2: #e60;// link hover/focus color
- --a3: #f90;// link h1-h2 hover/focus color
- --cg: #373; // ins green, success
- --cr: #d33; // del red, errors
- }
+:root.light {
+ --f1: #444;// Font Color Primary (444)
+ --f2: #333;// Font color Headers (333)
+ --c1: #fff;// Background Color Primary (fff)
+ --c2: #eee;// Background Color Secondary (eee,def)
+ --c3: #ddd;// Table Rows, Block quote edge, Borders (ddd,137)
+ --c4: #677;// Disabled Buttons, Borders, mark background (677,013)
+ --a1: #c40;// link color (c40,06e)
+ --a2: #e60;// link hover/focus color (e60,09f)
+ --a3: #f90;// link h1-h2 hover/focus color (f90,07f)
+ --cg: #373;// ins green, success (373)
+ --cr: #d33;// del red, errors (d33)
}
diff --git a/sass/font.scss b/sass/font.scss
deleted file mode 100644
index 56d7b54..0000000
--- a/sass/font.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-//@import "fonts/Abridge";
-@import "fonts/Roboto";
-//@import "fonts/Arimo";
-//@import "fonts/Lato";
-//@import "fonts/FiraCode"; // Monospaced \ No newline at end of file
diff --git a/sass/fonts/_Abridge.scss b/sass/fonts/_Abridge.scss
index 3085236..6626626 100644
--- a/sass/fonts/_Abridge.scss
+++ b/sass/fonts/_Abridge.scss
@@ -1,3 +1,8 @@
+// This is for the Abridge icon font, the css for this is adapted from fontello.
+// I experimented using this, it is still here for those that want it, but not used by default.
+// It is a pretty lightweight solution, but still not as good as svg icons directly in the css.
+// The loading of icon fonts is blocked by noscript type browser addons, but css icons are not.
+
@font-face {
font-family: 'Abridge';
src: url('font/Abridge.woff2') format('woff2');
@@ -23,4 +28,4 @@
.i-last:before { content: '\f101'; } // pagination last page
.i-prev:before { content: '\f104'; } // pagination previous page
.i-next:before { content: '\f105'; } // pagination next page
-.i-up:before { content: '\f106'; } // back to top button \ No newline at end of file
+.i-up:before { content: '\f106'; } // back to top button
diff --git a/sass/fonts/_Roboto-Mono.scss b/sass/fonts/_Roboto-Mono.scss
new file mode 100644
index 0000000..0685c3d
--- /dev/null
+++ b/sass/fonts/_Roboto-Mono.scss
@@ -0,0 +1,11 @@
+@font-face {
+ font-family: 'Roboto Mono';
+ src: local("Roboto Mono"), local("Roboto-Mono"), local("RobotoMono"), local("Roboto-Mono-Regular"), local("RobotoMono-Regular"), url("font/Roboto-Mono.woff2");//latin regular
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Roboto Mono';
+ src: local("Roboto Mono Italic"), local("Roboto-Mono-Italic"), local("RobotoMono-Italic"), url("font/Roboto-Mono-Italic.woff2");//latin italic
+ font-style: italic;
+ font-display: swap;
+}
diff --git a/sass/include/_embedded.scss b/sass/include/_embedded.scss
index 93de17d..fc1dd3c 100644
--- a/sass/include/_embedded.scss
+++ b/sass/include/_embedded.scss
@@ -2,13 +2,13 @@
.yvi {//youtube and vimeo iframe
position: absolute;
top: 0;
- left: 0;
+ left: 0
}
.yv {//youtube and vimeo div
position: relative;
padding-bottom: 56.25%;
height: 0;
- overflow: hidden;
+ overflow: hidden
}
img,
video,
diff --git a/sass/include/_hr.scss b/sass/include/_hr.scss
index 98e536e..aaa9f4e 100644
--- a/sass/include/_hr.scss
+++ b/sass/include/_hr.scss
@@ -10,6 +10,6 @@ hr {
height: 0; // 1
overflow: visible; // 2
border: none;
- border-top: 1px solid var(--f1);
+ border-top: 1px solid var(--f1)
}
header hr, footer hr {border-top: 1px solid var(--c4)}
diff --git a/sass/include/_icons.scss b/sass/include/_icons.scss
index 10a2c05..df0f5d3 100644
--- a/sass/include/_icons.scss
+++ b/sass/include/_icons.scss
@@ -116,7 +116,7 @@
display: inline-block;
//overflow: hidden;
text-align: center;
- vertical-align: middle;
+ vertical-align: middle
}
.svgs {
width: var(--fs);
diff --git a/sass/include/_nav.scss b/sass/include/_nav.scss
index 08f1ec1..f3a9b29 100644
--- a/sass/include/_nav.scss
+++ b/sass/include/_nav.scss
@@ -106,7 +106,7 @@ footer nav {
margin: var(--s2) 0 var(--s1);
}
div {
- margin: auto; // keeps top menu/search centered in mobile view
+ margin: auto // keeps top menu/search centered in mobile view
}
}
}
diff --git a/sass/include/_sectioning.scss b/sass/include/_sectioning.scss
index cd5540d..dd1026e 100644
--- a/sass/include/_sectioning.scss
+++ b/sass/include/_sectioning.scss
@@ -77,12 +77,12 @@ header, main {
padding-bottom: 0;
margin-bottom: 0;
hr {
- margin:0.1rem 0;
+ margin:0.1rem 0
}
}
footer{
line-height: var(--lhh);
hr, p {
- margin: 0.1rem 0 .3rem;
+ margin: 0.1rem 0 .3rem
}
} \ No newline at end of file
diff --git a/static/font/Roboto-Mono-Italic.woff2 b/static/font/Roboto-Mono-Italic.woff2
new file mode 100644
index 0000000..ece53bd
--- /dev/null
+++ b/static/font/Roboto-Mono-Italic.woff2
Binary files differ
diff --git a/static/font/Roboto-Mono.woff2 b/static/font/Roboto-Mono.woff2
new file mode 100644
index 0000000..f8894ba
--- /dev/null
+++ b/static/font/Roboto-Mono.woff2
Binary files differ
diff --git a/static/search.js b/static/search.js
index 61c67c0..e6adedf 100644
--- a/static/search.js
+++ b/static/search.js
@@ -165,11 +165,24 @@ Source:
- https://github.com/aaranxu/adidoks/blob/main/static/js/search.js
*/
(function(){
- var index = elasticlunr.Index.load(window.searchIndex);
+ //var index = elasticlunr.Index.load(window.searchIndex);
+ var index;
searchinput.addEventListener('input', show_results, true);
suggestions.addEventListener('click', accept_suggestion, true);
- function show_results(){
+ async function show_results(){
+ var initIndex = async function () {
+ if (index === undefined) {
+ index = fetch("/search_index.en.json")
+ .then(
+ async function(response) {
+ return await elasticlunr.Index.load(await response.json());
+ }
+ );
+ }
+ let res = await index;
+ return res;
+ }
var value = this.value.trim();
var options = {
bool: "OR",
@@ -178,7 +191,8 @@ Source:
body: {boost: 1},
}
};
- var results = index.search(value, options);
+ //var results = index.search(value, options);
+ var results = (await initIndex()).search(value, options);
var entry, childs = suggestions.childNodes;
var i = 0, len = results.length;
diff --git a/templates/base.html b/templates/base.html
index 0177ea1..642239b 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -51,20 +51,27 @@
</div>
<div>
<ul>
+ {%- set js_theme=config.extra.js_theme | default(value=true) -%}
+ {%- if config.extra.menu or js_theme %}
+ {%- if config.extra.menu %}
{%- for i in config.extra.menu -%}
<li> <h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}"{% if i.blank %} target="_blank"{% endif %}>{{ i.name | safe }}</a></h2> </li>
{%- endfor -%}
- {%- if config.extra.js_theme -%}
- <li class="js">{%- if config.extra.icon_adjust -%}<i type="reset" id="mode" class="{{ config.extra.icon_adjust }}"></i>{%- else -%}<i type="reset" id="mode" class="mode">&#9728;</i>{%- endif -%}</li>
+ {%- endif -%}
+ {%- if js_theme -%}
+ {%- set icon_adjust=config.extra.icon_adjust | default(value="svgs adjust") -%}
+ <li class="js">{%- if icon_adjust -%}<i type="reset" id="mode" class="{{ icon_adjust }}"></i>{%- else -%}<i type="reset" id="mode" class="mode">&#9728;</i>{%- endif -%}</li>
+ {%- endif -%}
{%- endif -%}
</ul>
</div>
{%- if config.build_search_index %}
+ {%- set icon_search=config.extra.icon_search | default(value="svgs search") -%}
<div>
<form autocomplete=off class="js" name="goSearch" id="searchbox">
<div class="searchd">
<input id="searchinput" type="text" placeholder="Search" title="Search"{% if config.extra.search_library %}{% if config.extra.search_library == "stork" %} data-stork="stork" {% endif %}{% endif %} />
- <button type="submit" title="Search">{%- if config.extra.icon_search -%}<i class="{{ config.extra.icon_search }}"></i>{%- else -%}<span class="si">&#8981;</span>{%- endif -%}</button>
+ <button type="submit" title="Search">{%- if icon_search -%}<i class="{{ icon_search }}"></i>{%- else -%}<span class="si">&#8981;</span>{%- endif -%}</button>
</div>
<div><div id="suggestions"{% if config.extra.search_library %}{% if config.extra.search_library == "stork" %} data-stork="stork-output" {% endif %}{% endif %}></div></div>
</form>
@@ -91,7 +98,9 @@
<hr />
{%- endif %}
<div class="c">
+ {%- if config.extra.social %}
{{- social_macros::social_links(social_config=config.extra.social, config=config) }}
+ {%- endif %}
{#- Copyright START #}
{%- set copyright_start_year=config.extra.copyright_start_year | default(value="") %}
@@ -99,6 +108,7 @@
{%- set copyright_end_year=config.extra.copyright_end_year | default(value=now() | date(format="%Y")) %}
<p{%- if config.extra.footer_size %} class="{{ config.extra.footer_size }}"{% endif %}>Copyright &copy; {{ copyright_start_year ~ copyright_end_year }} {{ config.title }}</p>
{#- Copyright END #}
+ {%- if config.extra.menu_footer %}
<nav>
<ul>
{%- for i in config.extra.menu_footer -%}
@@ -106,6 +116,7 @@
{%- endfor -%}
</ul>
</nav>
+ {%- endif %}
{%- if config.extra.footer_credit | default(value=true) %}
{%- if config.extra.footer_credit_override %}
{{ config.extra.footer_credit_override | safe }}
@@ -119,4 +130,4 @@
{%- block gotop %}
{%- endblock gotop %}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/templates/index.html b/templates/index.html
index 7c8c45a..4702e16 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -59,7 +59,8 @@
<div class="toc">
<div class="toc-sticky">
<h1><span class="s75">Recent Posts</span></h1>
- {%- for page in section_item.pages | slice(end=config.extra.recent_items) %}
+ {%- set recent_items=config.extra.recent_items | default(value=9) -%}
+ {%- for page in section_item.pages | slice(end=recent_items) %}
{{- page_macros::page_listing(page=page, config=config) }}
{%- endfor %}
</div>
diff --git a/templates/macros/head.html b/templates/macros/head.html
index 528577a..3767a16 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -1,20 +1,24 @@
{#- Theme Switcher Button to toggle between dark/light #}
{%- macro theme(config) %}
- {%- if config.extra.js_theme %}
- {%- if config.extra.js_themeButton or config.extra.js_bundle %}
- <script src="{{ get_url(path=config.extra.js_theme, trailing_slash=false) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_theme, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- if config.extra.js_switcher | default(value=true) %}
+ {%- set js_theme=config.extra.js_theme | default(value="theme.min.js") -%}
+ {%- if js_theme %}
+ <script src="{{ get_url(path=js_theme, trailing_slash=false) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_theme, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
{%- endmacro %}
-{%- macro stylesheets(config) %}
- {%- if config.extra.stylesheets %}{%- for i in config.extra.stylesheets %}
+
+{%- macro stylesheets(config) %}
+ {%- set stylesheets=config.extra.stylesheets | default(value=[ "abridge.css" ]) -%}
+ {%- if stylesheets %}{%- for i in stylesheets %}
<link rel="stylesheet" href="{{ get_url(path=i, trailing_slash=false, cachebust=true) | safe }}" />
{%- endfor %}{%- endif %}
-
{%- endmacro %}
+
+
{%- macro stylesheets_preload(config) %}
{%- if config.extra.fonts %}{%- for i in config.extra.fonts %}
@@ -31,10 +35,11 @@
{%- if config.extra.math or page.extra.math %}
- {%- if config.extra.katex_css %}{%- if config.extra.katex_css is matching("^http[s]?://") %}
- <link rel="preload" as="style" class="preStyle" href="{{ config.extra.katex_css | safe }}"{%- if config.extra.integrity %} integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs"{%- endif %} crossorigin="anonymous" />
+ {%- set katex_css=config.extra.katex_css | default(value="katex.min.css") -%}
+ {%- if katex_css %}{%- if katex_css is matching("^http[s]?://") %}
+ <link rel="preload" as="style" class="preStyle" href="{{ katex_css | safe }}"{%- if config.extra.integrity | default(value=true) and config.extra.katex_css_integrity %} integrity="{{ config.extra.katex_css_integrity | safe }}"{%- endif %} crossorigin="anonymous" />
{%- else %}
- <link rel="preload" as="style" class="preStyle" href="{{ get_url(path=config.extra.katex_css, trailing_slash=false) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_css, sha_type=384, base64=true) | safe }}"{%- endif %} />
+ <link rel="preload" as="style" class="preStyle" href="{{ get_url(path=katex_css, trailing_slash=false) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_css, sha_type=384, base64=true) | safe }}"{%- endif %} />
{%- endif %}{%- endif %}
{%- endif %}
@@ -51,7 +56,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
{%- macro js(config) %}
+ {%- set search_library=config.extra.search_library | default(value="elasticlunr") -%}
{%- set preStyle = false %}
@@ -66,141 +85,60 @@
{%- endif %}
{%- if config.extra.math or page.extra.math %}
- {%- if config.extra.katex_css %}
+ {%- set katex_css=config.extra.katex_css | default(value="katex.min.css") -%}
+ {%- if katex_css %}
{%- set preStyle = true %}
{%- endif %}
{%- endif %}
-{%- if config.extra.js_bundle and config.build_search_index or config.extra.js_bundle and config.extra.search_library %}
-
- {%- if config.extra.js_search_facade %}
- {#- dont load the index #}
- {%- elif config.extra.search_library == "tinysearch" or config.extra.search_library == "stork" %}
- {#- dont load the index #}
- {%- elif config.extra.js_search_index %}
- <script defer src="{{ get_url(path=config.extra.js_search_index, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_search_index, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-
- {%- if not config.extra.js_search_facade %}
+{%- if config.extra.js_bundle %}
+ <script defer src="{{ get_url(path='abridge.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='abridge.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- if config.extra.js_switcher %}
- <script defer src="{{ get_url(path='abridge-bundle-nofacade.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-nofacade.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- else %}
- <script defer src="{{ get_url(path='abridge-bundle-noswitcher.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-nofacade.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-
- {%- elif config.extra.search_library == "tinysearch" %}
- <script defer src="{{ get_url(path='abridge-bundle-tinysearch.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-tinysearch.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- elif config.extra.search_library == "stork" %}
- <script defer src="{{ get_url(path='abridge-bundle-stork.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-stork.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- else %}
-
- {%- if config.extra.js_switcher %}
- <script defer src="{{ get_url(path='abridge-bundle.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- else %}
- <script defer src="{{ get_url(path='abridge.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-
- {%- endif %}
-
-
-{%- elif config.build_search_index or config.extra.search_library %}
-
- {#- no bundle #}
+{%- else %}
{%- if preStyle == true %}
- {%- if config.extra.js_prestyle %}
- <script defer src="{{ get_url(path=config.extra.js_prestyle, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_prestyle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- set js_prestyle=config.extra.js_prestyle | default(value="prestyle.js") -%}
+ {%- if js_prestyle %}
+ <script defer src="{{ get_url(path=js_prestyle, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_prestyle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
- {%- if config.extra.js_theme %}
- {%- if config.extra.js_themeButton %}
- <script defer src="{{ get_url(path=config.extra.js_themeButton, trailing_slash=false) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_themeButton, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- if config.extra.js_switcher | default(value=true) %}
+ {%- set js_theme=config.extra.js_theme | default(value="theme.min.js") -%}
+ {%- if js_theme %}
+ {%- set js_themeButton=config.extra.js_themeButton | default(value="theme_button.js") -%}
+ {%- if js_themeButton %}
+ <script defer src="{{ get_url(path=js_themeButton, trailing_slash=false) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_themeButton, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
-
- {%- if config.extra.js_email %}
- {%- if config.extra.social.mail_encode %}
- <script defer src="{{ get_url(path=config.extra.js_email, trzailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_email, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- endif %}
-
- {%- if config.extra.js_codecopy %}
- <script defer src="{{ get_url(path=config.extra.js_codecopy, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_codecopy, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
- {%- if config.extra.js_search_facade %}
- {%- if config.extra.search_library %}
- {%- if config.extra.search_library == "tinysearch" %}
- <script defer src="{{ get_url(path='search_facade_tinysearch.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='search_facade_tinysearch.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- elif config.extra.search_library == "stork" %}
- <script defer src="{{ get_url(path='search_facade_stork.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='search_facade_stork.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- set js_email=config.extra.js_email | default(value="email.js") -%}
+ {%- if js_email %}
+ {%- if config.extra.social.mail_encode | default(value=true) %}
+ <script defer src="{{ get_url(path=js_email, trzailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_email, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
- <script defer src="{{ get_url(path='search_facade.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='search_facade.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- if config.extra.js_search_facade or config.extra.search_library %}
- {#- dont load the index/search #}
- {%- elif config.extra.js_search_index %}
- <script defer src="{{ get_url(path=config.extra.js_search_index, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_search_index, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- set js_codecopy=config.extra.js_codecopy | default(value="codecopy.js") -%}
+ {%- if js_codecopy %}
+ <script defer src="{{ get_url(path=js_codecopy, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_codecopy, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
- {%- if config.extra.js_search_facade %}
- {#- dont load the index/search #}
- {%- else %}
- {%- if config.extra.search_library == "tinysearch" %}
- <script defer type="module" src="{{ get_url(path='tinysearch.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='tinysearch.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- elif config.extra.search_library == "stork" %}
- <script defer type="module" src="{{ get_url(path='stork.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='stork.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- if search_library == "tinysearch" %}
+ <script defer type="module" src="{{ get_url(path='tinysearch.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='tinysearch.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- elif search_library == "stork" %}
+ <script defer type="module" src="{{ get_url(path='stork.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='stork.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- else %}
- <script defer src="{{ get_url(path='elasticlunr.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='elasticlunr.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- <script defer src="{{ get_url(path='search.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='search.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
+ <script defer src="{{ get_url(path='elasticlunr.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='elasticlunr.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path='search.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='search.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
-{%- elif config.extra.js_bundle %}
-
- {#- no search #}
-
- {%- if config.extra.js_switcher %}
-
- <script defer src="{{ get_url(path='abridge-bundle-nosearch.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-nosearch.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- else %}
-
- <script defer src="{{ get_url(path='abridge-bundle-noswitchernosearch.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-noswitchernosearch.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-
-{%- else %}
-
- {#- no bundle or search #}
-
- {%- if preStyle == true %}
- {%- if config.extra.js_prestyle %}
- <script defer src="{{ get_url(path=config.extra.js_prestyle, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_prestyle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- endif %}
-
- {%- if config.extra.js_theme %}
- {%- if config.extra.js_themeButton or config.extra.js_bundle %}
- <script defer src="{{ get_url(path=config.extra.js_themeButton, trailing_slash=false) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_themeButton, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- endif %}
-
- {%- if config.extra.js_email %}
- {%- if config.extra.social.mail_encode %}
- <script defer src="{{ get_url(path=config.extra.js_email, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_email, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- endif %}
+{%- endif %}
- {%- if config.extra.js_codecopy %}
- <script defer src="{{ get_url(path=config.extra.js_codecopy, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_codecopy, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-{%- endif %}
{#- https://katex.org/docs/autorender.html #}
@@ -208,31 +146,38 @@
{#- https://github.com/KaTeX/KaTeX/tree/main/contrib/mathtex-script-type/ #}
{%- if config.extra.math or page.extra.math %}
-{%- if config.extra.katex_bundle %}
- <script defer src="{{ get_url(path=config.extra.katex_bundle, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_bundle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+{%- set katex_bundle=config.extra.katex_bundle | default(value="katexbundle.min.js") -%}
+{%- if katex_bundle %}
+ <script defer src="{{ get_url(path=katex_bundle, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_bundle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- else %}
- {%- if config.extra.katex_js %}{%- if config.extra.katex_js is matching("^http[s]?://") %}
- <script defer src="{{ config.extra.katex_js | safe }}"{%- if config.extra.integrity %} integrity="sha384-ljao5I1l+8KYFXG7LNEA7DyaFvuvSCmedUf6Y6JI7LJqiu8q5dEivP2nDdFH31V4"{%- endif %} crossorigin="anonymous"></script>
+ {%- set katex_js=config.extra.katex_js | default(value="katex.min.js") -%}
+ {%- if katex_js %}{%- if katex_js is matching("^http[s]?://") %}
+ <script defer src="{{ katex_js | safe }}"{%- if config.extra.integrity | default(value=true) and config.extra.katex_js_integrity %} integrity="{{ config.extra.katex_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script>
{%- else %}
- <script defer src="{{ get_url(path=config.extra.katex_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path=katex_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}{%- endif %}
- {%- if config.extra.mathtex_js %}{%- if config.extra.mathtex_js is matching("^http[s]?://") %}
- <script defer src="{{ config.extra.mathtex_js | safe }}"{%- if config.extra.integrity %} integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT"{%- endif %} crossorigin="anonymous"></script>
+ {%- set mathtex_js=config.extra.mathtex_js | default(value="mathtex-script-type.min.js") -%}
+ {%- if mathtex_js %}{%- if mathtex_js is matching("^http[s]?://") %}
+ <script defer src="{{ mathtex_js | safe }}"{%- if config.extra.integrity | default(value=true) and config.extra.mathtex_js_integrity %} integrity="{{ config.extra.mathtex_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script>
{%- else %}
- <script defer src="{{ get_url(path=config.extra.mathtex_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.mathtex_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path=mathtex_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=mathtex_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}{%- endif %}
{%- if config.extra.math_auto_render or page.extra.math_auto_render %}
- {%- if config.extra.katex_autorender_js %}
- {%- if config.extra.katex_autorender_js is matching("^http[s]?://") %}
- <script defer src="{{ config.extra.katex_autorender_js | safe }}"{%- if config.extra.integrity %} integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR"{%- endif %} crossorigin="anonymous"></script>
+ {%- set katex_autorender_js=config.extra.katex_autorender_js | default(value="auto-render.min.js") -%}
+ {%- if katex_autorender_js %}
+ {%- if katex_autorender_js is matching("^http[s]?://") %}
+ <script defer src="{{ katex_autorender_js | safe }}"{%- if config.extra.integrity | default(value=true) and config.extra.katex_autorender_js_integrity %} integrity="{{ config.extra.katex_autorender_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script>
{%- else %}
- <script defer src="{{ get_url(path=config.extra.katex_autorender_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_autorender_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path=katex_autorender_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_autorender_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- endif %}
{%- endif %}
+ {%- set katex_options=config.extra.katex_options | default(value="katexoptions.js") -%}
+ {%- if katex_options %}
+ <script defer src="{{ get_url(path=katex_options, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_options, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
- <script defer src="{{ get_url(path=config.extra.katex_options, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_options, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
@@ -242,6 +187,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{%- macro favicons(config) %}
{%- if config.extra.favicon_theme_color %}
<meta name="theme-color" content="{{ config.extra.favicon_theme_color }}" />
@@ -321,9 +293,11 @@
<meta name="description" content="{{ config.description }}" />
{%- endif %}
<link rel="canonical" href="{{ page_url | safe }}" />
-{%- if page.extra.keywords %}
+{%- if page.extra.keywords and config.extra.keywords %}
<meta name="keywords" content="{{ page.extra.keywords }}, {{ config.extra.keywords }}" />
-{%- else %}
+{%- elif page.extra.keywords %}
+ <meta name="keywords" content="{{ page.extra.keywords }}" />
+{%- elif config.extra.keywords %}
<meta name="keywords" content="{{ config.extra.keywords }}" />
{%- endif %}
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index 2c17530..95c922c 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -142,15 +142,19 @@
{%- endif %}
<nav>
<ul>
+ {%- set icon_first=config.extra.icon_first | default(value="svgs svgh angll") -%}
+ {%- set icon_prev=config.extra.icon_prev | default(value="svgs svgh angl") -%}
+ {%- set icon_next=config.extra.icon_next | default(value="svgs svgh angr") -%}
+ {%- set icon_last=config.extra.icon_last | default(value="svgs svgh angrr") -%}
{%- if paginator.previous -%}
<li><a class="on outp" href="{{ paginator.first | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="First Page">
- {%- if config.extra.icon_first -%}<i class="{{ config.extra.icon_first }}" alt="First Page"></i>
+ {%- if icon_first -%}<i class="{{ icon_first }}" alt="First Page"></i>
{%- else -%}&#10096;
{%- endif -%}
</a></li>
{%- else -%}
<li><span class="off outp">
- {%- if config.extra.icon_first -%}<i class="{{ config.extra.icon_first }}" alt="First Page"></i>
+ {%- if icon_first -%}<i class="{{ icon_first }}" alt="First Page"></i>
{%- else -%}&#10096;
{%- endif -%}
</span></li>
@@ -158,13 +162,13 @@
{%- if paginator.previous -%}
<li><a class="on outp" href="{{ paginator.previous | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="Previous Page">
- {%- if config.extra.icon_prev -%}<i class="{{ config.extra.icon_prev }}" alt="Previous Page"></i>
+ {%- if icon_prev -%}<i class="{{ icon_prev }}" alt="Previous Page"></i>
{%- else -%}&#10092;
{%- endif -%}
</a></li>
{%- else -%}
<li><span class="off outp">
- {%- if config.extra.icon_prev -%}<i class="{{ config.extra.icon_prev }}" alt="Previous Page"></i>
+ {%- if icon_prev -%}<i class="{{ icon_prev }}" alt="Previous Page"></i>
{%- else -%}&#10092;
{%- endif -%}
</span></li>
@@ -184,13 +188,13 @@
{%- if paginator.next -%}
<li><a class="on outp" href="{{ paginator.next | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="Next Page">
- {%- if config.extra.icon_next -%}<i class="{{ config.extra.icon_next }}" alt="Next Page"></i>
+ {%- if icon_next -%}<i class="{{ icon_next }}" alt="Next Page"></i>
{%- else -%}&#10093;
{%- endif -%}
</a></li>
{%- else -%}
<li><span class="off outp">
- {%- if config.extra.icon_next -%}<i class="{{ config.extra.icon_next }}" alt="Next Page"></i>
+ {%- if icon_next -%}<i class="{{ icon_next }}" alt="Next Page"></i>
{%- else -%}&#10093;
{%- endif -%}
</span></li>
@@ -198,13 +202,13 @@
{%- if paginator.next -%}
<li><a class="on outp" href="{{ paginator.last | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="Last Page">
- {%- if config.extra.icon_last -%}<i class="{{ config.extra.icon_last }}" alt="Last Page"></i>
+ {%- if icon_last -%}<i class="{{ icon_last }}" alt="Last Page"></i>
{%- else -%}&#10097;
{%- endif -%}
</a></li>
{%- else -%}
<li><span class="off outp">
- {%- if config.extra.icon_last -%}<i class="{{ config.extra.icon_last }}" alt="Last Page"></i>
+ {%- if icon_last -%}<i class="{{ icon_last }}" alt="Last Page"></i>
{%- else -%}&#10097;
{%- endif -%}
</span></li>
diff --git a/templates/macros/social.html b/templates/macros/social.html
index 36be051..67e05a3 100644
--- a/templates/macros/social.html
+++ b/templates/macros/social.html
@@ -5,7 +5,7 @@
{%- if config.generate_feed -%}{%- if config.extra.social.feed -%}
<li><a href="{{ get_url(path=config.feed_filename, trailing_slash=false) | safe }}" target="_blank" title="Atom/RSS Feed"><i type="Button" class="svg rss" title="Atom/RSS Feed"></i></a></li>{% endif -%}{% endif -%}
{%- if social_config.mail -%}
- {%- if social_config.mail_encode -%}
+ {%- if social_config.mail_encode | default(value=true) -%}
{%- set base64_email = social_config.mail -%}
<li class="js"><a class="m-protected" href="#{{ base64_email | base64_encode }}" target="_blank" title="Mail"><i type="Button" class="svg mail" title="Mail"></i></a></li>
{%- else -%}
diff --git a/templates/page.html b/templates/page.html
index f92cdea..da4fdd6 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -81,8 +81,9 @@
{%- if page.reading_time %}
{%- if page.reading_time > 2 %}
+{%- set icon_top=config.extra.icon_top | default(value="svgs svgh angu") -%}
<span class="topout">
-<span class="topleft"> </span><a href="#" class="top" title="Back to Top">{%- if config.extra.icon_top %}<i class="{{ config.extra.icon_top }}"></i>{%- else %}&cuwed;{%- endif %}</a>
+<span class="topleft"> </span><a href="#" class="top" title="Back to Top">{%- if icon_top %}<i class="{{ icon_top }}"></i>{%- else %}&cuwed;{%- endif %}</a>
</span>
{%- endif %}
{%- endif %}