Resolve conflicts with remote-tracking branch 'refs/remotes/halogenica/master'

# Conflicts:
#	exampleSite/config.toml
#	exampleSite/content/page/about.md
#	layouts/_default/list.html
#	layouts/partials/disqus.html
#	layouts/partials/head.html
#	layouts/partials/header.html
#	layouts/partials/page.html
#	layouts/partials/post.html
This commit is contained in:
Li-Wen Yip 2017-03-08 19:03:10 +00:00
commit 027faa06a2
17 changed files with 304 additions and 232 deletions

View file

@ -11,17 +11,10 @@ pygmentCodeFences = true
subtitle = "Build a beautiful and simple website in minutes"
logo = "img/avatar-icon.png"
favicon = "img/favicon.ico"
commit = false
dateFormat = "January 2, 2006"
[[Params.bigimg]]
src = "img/path.jpg"
desc = "Path"
# if you add more than one bigimg they will cycle through every 10 seconds
#[[Params.bigimg]]
# src = "img/path.jpg"
# desc = "Another Path"
commit = false
rss = true
comments = true
[Author]
name = "Some Person"
@ -57,15 +50,23 @@ pygmentCodeFences = true
name = "Samples"
weight = 2
[[menu.main]]
parent = "samples"
name = "Math Sample"
url = "/post/2017-03-05-math-sample"
weight = 1
[[menu.main]]
parent = "samples"
name = "Code Sample"
url = "/post/2016-03-08-code-sample"
weight = 2
[[menu.main]]
parent = "samples"
name = "Test Markdown"
url = "/post/2015-02-20-test-markdown"
weight = 3
[[menu.main]]
name = "Tags"

View file

@ -25,16 +25,7 @@ How about a yummy crepe?
![Crepe](http://s3-media3.fl.yelpcdn.com/bphoto/cQ1Yoa75m2yUFFbY2xwuqw/348s.jpg)
Here's a code chunk:
~~~
var foo = function(x) {
return(x + 5);
}
foo(3)
~~~
And here is the same code with syntax highlighting:
Here's a code chunk with syntax highlighting:
```javascript
var foo = function(x) {
@ -42,12 +33,3 @@ var foo = function(x) {
}
foo(3)
```
And here is the same code yet again but with line numbers:
{{< highlight python linenos >}}
var foo = function(x) {
return(x + 5);
}
foo(3)
{{</ highlight >}}

View file

@ -1,6 +1,6 @@
---
title: Code Sample
subtitle: Using Pygments or Highlight.js
subtitle: Using Hugo or Pygments
date: 2016-03-08
tags: ["example", "code"]
---
@ -9,6 +9,17 @@ The following are two code samples using syntax highlighting.
<!--more-->
The following is a code sample using triple backticks ( ``` ) code fencing provided in Hugo. This is client side highlighting and does not require any special installation.
```javascript
var num1, num2, sum
num1 = prompt("Enter first number")
num2 = prompt("Enter second number")
sum = parseInt(num1) + parseInt(num2) // "+" means "add"
alert("Sum = " + sum) // "+" means combine into a string
```
The following is a code sample using the "highlight" shortcode provided in Hugo. This is server side highlighting and requires Python and Pygments to be installed.
{{< highlight javascript >}}
@ -20,12 +31,12 @@ The following is a code sample using the "highlight" shortcode provided in Hugo.
{{</ highlight >}}
The following is a code sample using triple backticks ( ``` ) code fencing provided in Hugo. This is client side highlighting and does not require any special installation.
And here is the same code with line numbers:
```javascript
{{< highlight javascript "linenos=inline">}}
var num1, num2, sum
num1 = prompt("Enter first number")
num2 = prompt("Enter second number")
sum = parseInt(num1) + parseInt(num2) // "+" means "add"
alert("Sum = " + sum) // "+" means combine into a string
```
{{</ highlight >}}

View file

@ -0,0 +1,49 @@
---
title: Math Sample
subtitle: Using KaTeX
date: 2017-03-05
tags: ["example", "math"]
---
KaTeX can be used to generate complex math formulas server-side.
$$
\phi = \frac{(1+\sqrt{5})}{2} = 1.6180339887\cdots
$$
Additional details can be found on [GitHub](https://github.com/Khan/KaTeX) or on the [Wiki](http://tiddlywiki.com/plugins/tiddlywiki/katex/).
<!--more-->
### Example 1
If the text between $$ contains newlines it will rendered in display mode:
```
$$
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
$$
```
$$
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
$$
### Example 2
```
$$
\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }
$$
```
$$
\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }
$$
### Example 3
```
$$
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1.
$$
```
$$
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1.
$$