changeset 57:002d154531d4 kai

Added MathJax. Use absolute_url and relative_url insted of prepend.
author Kai T. Ohlhus <k.ohlhus@gmail.com>
date Tue, 11 Oct 2016 15:57:58 +0200
parents d27153539857
children 2e2e9feba1f3
files _includes/head.html _includes/header.html _posts/2015-09-23-oct-conf-darmstadt.markdown feed.xml support-expectations.md
diffstat 5 files changed, 23 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/_includes/head.html	Tue Oct 11 15:55:32 2016 +0200
+++ b/_includes/head.html	Tue Oct 11 15:57:58 2016 +0200
@@ -3,11 +3,21 @@
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1">
 
-  <title>{% if page.title %}{{ site.title }} :: {{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
+  <title>{{ site.title }}{% if page.title %} :: {{ page.title }}{% endif %}</title>
   <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
 
-  <link rel="stylesheet" href="{{ "/css/octave.css" | prepend: site.baseurl }}">
+  <link rel="stylesheet" href="{{ "/css/octave.css" | relative_url }}">
+
+  <link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
+  <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | relative_url }}">
 
-  <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
-  <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl }}">
+  <script type="text/x-mathjax-config">
+  MathJax.Hub.Config({
+    tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] },
+    TeX: { equationNumbers: { autoNumber: 'all' } }
+  });
+  </script>
+  <script type="text/javascript" async
+    src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
+  </script>
 </head>
--- a/_includes/header.html	Tue Oct 11 15:55:32 2016 +0200
+++ b/_includes/header.html	Tue Oct 11 15:57:58 2016 +0200
@@ -1,7 +1,7 @@
 <div id="logo">
   <p>
-    <img src="{{ "/img/logo.png" | prepend: site.baseurl }}" alt="GNU Octave Logo">
-    <span>{{ site.title }}</span>
+    <img src="{{ "/img/logo.png" | relative_url }}" alt="GNU Octave Logo">
+    <span>GNU Octave</span>
   </p>
 </div>
 
--- a/_posts/2015-09-23-oct-conf-darmstadt.markdown	Tue Oct 11 15:55:32 2016 +0200
+++ b/_posts/2015-09-23-oct-conf-darmstadt.markdown	Tue Oct 11 15:57:58 2016 +0200
@@ -8,4 +8,4 @@
 The presentation slides are available at
 [wiki.octave.org/OctConf_2015](http://wiki.octave.org/OctConf_2015).
 
-![OctConf 2015]({{ site.url }}{{ site.baseurl }}/img/octconf-2015.png)
+![OctConf 2015]({{ "/img/octconf-2015.png" | absolute_url}})
--- a/feed.xml	Tue Oct 11 15:55:32 2016 +0200
+++ b/feed.xml	Tue Oct 11 15:57:58 2016 +0200
@@ -6,8 +6,8 @@
   <channel>
     <title>{{ site.title | xml_escape }}</title>
     <description>{{ site.description | xml_escape }}</description>
-    <link>{{ site.url }}{{ site.baseurl }}/</link>
-    <atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
+    <link>{{ "/" | absolute_url }}</link>
+    <atom:link href="{{ "/feed.xml" | absolute_url }}" rel="self" type="application/rss+xml"/>
     <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
     <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
     <generator>Jekyll v{{ jekyll.version }}</generator>
@@ -16,8 +16,8 @@
         <title>{{ post.title | xml_escape }}</title>
         <description>{{ post.content | xml_escape }}</description>
         <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
-        <link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
-        <guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
+        <link>{{ post.url | absolute_url }}</link>
+        <guid isPermaLink="true">{{ post.url | absolute_url }}</guid>
         {% for tag in post.tags %}
         <category>{{ tag | xml_escape }}</category>
         {% endfor %}
--- a/support-expectations.md	Tue Oct 11 15:55:32 2016 +0200
+++ b/support-expectations.md	Tue Oct 11 15:57:58 2016 +0200
@@ -57,7 +57,7 @@
 you might also noticed the number of problems that have been *fixed*.
 Nearly all of these problems have been fixed by volunteers.
 If you find a problem, you are encouraged to
-[report it]({{ "/bugs.html" | prepend: site.baseurl }}).
+[report it]({{ "/bugs.html" | relative_url }}).
 Your report can help to improve Octave,
 but you should not think of the bug tracker as your personal support line.
 
@@ -103,4 +103,4 @@
 or donate to the project so that an Octave developer can spend the
 time needed to do the job.
 
-[commercial support]: {{ "/commercial-support.html" | prepend: site.baseurl }}
+[commercial support]: {{ "/commercial-support.html" | relative_url }}