head.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <head>
  2. <meta charset="utf-8">
  3. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  4. <meta name="viewport" content="width=device-width,minimum-scale=1">
  5. <title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
  6. <meta name="description" content="{{ page.content | strip_html | strip_newlines | truncate: 160 }}">
  7. <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url | relative_url }}">
  8. <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url | relative_url }}">
  9. {% include fb_tags.html %}
  10. <script type="application/ld+json">
  11. {% include metadata.json %}
  12. </script>
  13. <link rel="stylesheet" href="{{ site.css_url | relative_url }}/styles.css">
  14. <!-- <link rel="manifest" href="/manifest.json"> -->
  15. <!-- <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#efae0a"> -->
  16. <meta name="msapplication-TileColor" content="#da532c">
  17. <meta name="msapplication-TileImage" content="/mstile-144x144.png">
  18. <meta name="theme-color" content="#233947">
  19. <!-- Favicon -->
  20. <link rel="shortcut icon" type="image/x-icon" href="{{ site.favicon_path | relative_url }}">
  21. <!-- MathJax Config -->
  22. {% include mathjax.html %}
  23. <!-- DOM updating function -->
  24. <script src="{{ site.js_url | relative_url }}/page/dom-update.js"></script>
  25. <!-- Selectors for elements on the page -->
  26. <script src="{{ site.js_url | relative_url }}/page/documentSelectors.js"></script>
  27. <!-- Define some javascript variables that will be useful in other javascript -->
  28. <script>
  29. const site_basename = '{{ site.baseurl | strip / }}';
  30. </script>
  31. <!-- Add AnchorJS to let headers be linked -->
  32. <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.2.0/anchor.min.js" async></script>
  33. <script src="{{ site.js_url | relative_url }}/page/anchors.js" async></script>
  34. <!-- Include Turbolinks to make page loads fast -->
  35. <!-- https://github.com/turbolinks/turbolinks -->
  36. <script src="https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.2.0/turbolinks.js" async></script>
  37. <meta name="turbolinks-cache-control" content="no-cache">
  38. <!-- Load nbinteract for widgets -->
  39. {% include js/nbinteract.html %}
  40. <!-- Load Thebelab for interactive widgets -->
  41. {% include js/thebelab.html %}
  42. <!-- Load the auto-generating TOC (non-async otherwise the TOC won't load w/ turbolinks) -->
  43. <script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.min.js" async></script>
  44. <script src="{{ site.js_url | relative_url }}/page/tocbot.js"></script>
  45. <!-- Google analytics -->
  46. {% include google_analytics.html %}
  47. <!-- Clipboard copy button -->
  48. <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" async></script>
  49. <!-- Load custom website scripts -->
  50. <script src="{{ site.js_url | relative_url }}/scripts.js" async></script>
  51. <!-- Load custom user CSS and JS -->
  52. <script src="{{ site.custom_static_url | relative_url }}/custom.js" async></script>
  53. <link rel="stylesheet" href="{{ site.custom_static_url | relative_url }}/custom.css">
  54. <!-- Update interact links w/ REST param, is defined in includes so we can use templates -->
  55. {% include js/interact-update.html %}
  56. <!-- Lunr search code - will only be executed on the /search page -->
  57. <script src="https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.6/lunr.min.js" async></script>
  58. <script>{% include search/lunr/lunr-en.js %}</script>
  59. <!-- Load JS that depends on site variables -->
  60. <script src="{{ site.js_url | relative_url }}/page/copy-button.js" async></script>
  61. <!-- Hide cell code -->
  62. <script src="{{ site.js_url | relative_url }}/page/hide-cell.js" async></script>
  63. <!-- Printing the screen -->
  64. {% include js/print.html %}
  65. </head>