Reorder Code Sample to show default method first

Reorder Code Sample to show default method first
This commit is contained in:
Michael Romero 2017-03-05 14:45:10 -08:00
parent 04617ddabb
commit 51f33ac94b

View File

@ -1,6 +1,6 @@
--- ---
title: Code Sample title: Code Sample
subtitle: Using Pygments or Highlight.js subtitle: Using Hugo or Pygments
date: 2016-03-08 date: 2016-03-08
tags: ["example", "code"] tags: ["example", "code"]
--- ---
@ -9,17 +9,6 @@ The following are two code samples using syntax highlighting.
<!--more--> <!--more-->
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 >}}
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 >}}
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. 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 ```javascript
@ -29,3 +18,14 @@ The following is a code sample using triple backticks ( ``` ) code fencing provi
sum = parseInt(num1) + parseInt(num2) // "+" means "add" sum = parseInt(num1) + parseInt(num2) // "+" means "add"
alert("Sum = " + sum) // "+" means combine into a string 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 >}}
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 >}}