Fix: clean theme mess, move submod to themes folder
This commit is contained in:
parent
39dfb59e51
commit
3c19b16dd0
75 changed files with 3 additions and 5072 deletions
5
.gitmodules
vendored
5
.gitmodules
vendored
|
@ -1,3 +1,4 @@
|
|||
[submodule "beautifulhugo"]
|
||||
path = beautifulhugo
|
||||
[submodule "themes/beautifulhugo"]
|
||||
path = themes/beautifulhugo
|
||||
url = https://github.com/halogenica/beautifulhugo.git
|
||||
branch = master
|
||||
|
|
17
themes/beautifulhugo/.gitattributes
vendored
17
themes/beautifulhugo/.gitattributes
vendored
|
@ -1,17 +0,0 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
50
themes/beautifulhugo/.gitignore
vendored
50
themes/beautifulhugo/.gitignore
vendored
|
@ -1,50 +0,0 @@
|
|||
# Themes directory of example site; ignored so that we can clone the repo
|
||||
# inside the themes directory and test the example site with "hugo server".
|
||||
exampleSite/themes/
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# Vim swap files
|
||||
*.swp
|
||||
|
||||
# =========================
|
||||
# Operating System Files
|
||||
# =========================
|
||||
|
||||
# OSX
|
||||
# =========================
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear on external disk
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
|
@ -1,22 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Original work Copyright (c) 2015 Dean Attali
|
||||
Modified work Copyright (c) 2017 Michael Romero
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,67 +0,0 @@
|
|||
# Beautiful Hugo - A port of Beautiful Jekyll Theme
|
||||
|
||||
![Beautiful Hugo Theme Screenshot](https://github.com/halogenica/beautifulhugo/blob/master/images/screenshot.png)
|
||||
|
||||
## Installation
|
||||
|
||||
$ mkdir themes
|
||||
$ cd themes
|
||||
$ git clone https://github.com/halogenica/beautifulhugo.git beautifulhugo
|
||||
|
||||
See [the Hugo documentation](http://gohugo.io/themes/installing/) for more information.
|
||||
|
||||
## Extra Features
|
||||
|
||||
### Responsive
|
||||
|
||||
This theme is designed to look great on both large-screen and small-screen (mobile) devices.
|
||||
|
||||
### Syntax highlighting
|
||||
|
||||
This theme has support for both server side and client side highlighting.
|
||||
|
||||
#### Server side syntax highlighting
|
||||
|
||||
Use the `highlight` shortcode (with Pygments),
|
||||
see [the Hugo documentation](http://gohugo.io/extras/highlighting/) for more information.
|
||||
|
||||
To use this feature install Pygments (`pip install Pygments`) and add `pygmentsuseclasses = true` to your `config.toml`.
|
||||
|
||||
#### Client side syntax highlighting
|
||||
|
||||
Use triple backticks ( ``` ) or triple tilde ( ~~~ ) around code blocks.
|
||||
|
||||
Client side highlighting does not require pygments to be installed.
|
||||
|
||||
### Disqus support
|
||||
|
||||
To use this feature, uncomment and fill out the `disqusShortname` parameter in `config.toml`.
|
||||
|
||||
### Google Analytics
|
||||
|
||||
To add Google Analytics, simply sign up to [Google Analytics](http://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`.
|
||||
|
||||
### Commit SHA on the footer
|
||||
|
||||
If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two environment variables have to be set (`GIT_COMMIT_SHA` and `GIT_COMMIT_SHA_SHORT`) and parameter `commit` has to be defined in the config file:
|
||||
|
||||
```
|
||||
[Params]
|
||||
commit = "https://github.com/<username>/<siterepo>/tree/"
|
||||
```
|
||||
|
||||
This can be achieved by running the next command prior to calling Hugo:
|
||||
|
||||
```
|
||||
GIT_COMMIT_SHA=`git rev-parse --verify HEAD` GIT_COMMIT_SHA_SHORT=`git rev-parse --short HEAD`
|
||||
```
|
||||
|
||||
See at [xor-gate/xor-gate.org](https://github.com/xor-gate/xor-gate.org) an example of how to add it to a continuous integration system.
|
||||
|
||||
## About
|
||||
|
||||
This is a port of the Jekyll theme [Beautiful Jekyll](http://deanattali.com/beautiful-jekyll/) by [Dean Attali](http://deanattali.com/aboutme#contact). It supports most of the features of the original theme.
|
||||
|
||||
## License
|
||||
|
||||
MIT Licensed, see [LICENSE](https://github.com/halogenica/Hugo-BeautifulHugo/blob/master/LICENSE).
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: "{{ replace .TranslationBaseName "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
subtitle: ""
|
||||
tags: []
|
||||
---
|
|
@ -1 +0,0 @@
|
|||
./beautifulhugo
|
|
@ -1,125 +0,0 @@
|
|||
[[social_icons]]
|
||||
id = "email"
|
||||
url = "mailto:%s"
|
||||
title = "Email me"
|
||||
icon = "fa-envelope"
|
||||
|
||||
[[social_icons]]
|
||||
id = "facebook"
|
||||
url = "https://www.facebook.com/%s"
|
||||
title = "Facebook"
|
||||
icon = "fa-facebook"
|
||||
|
||||
[[social_icons]]
|
||||
id = "googleplus"
|
||||
url = "https://plus.google.com/%s"
|
||||
title = "Google+"
|
||||
icon = "fa-google-plus"
|
||||
|
||||
[[social_icons]]
|
||||
id = "github"
|
||||
url = "https://github.com/%s"
|
||||
title = "GitHub"
|
||||
icon = "fa-github"
|
||||
|
||||
[[social_icons]]
|
||||
id = "gitlab"
|
||||
url = "https://gitlab.com/%s"
|
||||
title = "GitLab"
|
||||
icon = "fa-gitlab"
|
||||
|
||||
[[social_icons]]
|
||||
id = "twitter"
|
||||
url = "https://twitter.com/%s"
|
||||
title = "Twitter"
|
||||
icon = "fa-twitter"
|
||||
|
||||
[[social_icons]]
|
||||
id = "reddit"
|
||||
url = "https://reddit.com/u/%s"
|
||||
title = "Reddit"
|
||||
icon = "fa-reddit-alien"
|
||||
|
||||
[[social_icons]]
|
||||
id = "linkedin"
|
||||
url = "https://linkedin.com/in/%s"
|
||||
title = "LinkedIn"
|
||||
icon = "fa-linkedin"
|
||||
|
||||
[[social_icons]]
|
||||
id = "xing"
|
||||
url = "https://www.xing.com/profile/%s"
|
||||
title = "Xing"
|
||||
icon = "fa-xing"
|
||||
|
||||
[[social_icons]]
|
||||
id = "stackoverflow"
|
||||
url = "https://stackoverflow.com/%s"
|
||||
title = "StackOverflow"
|
||||
icon = "fa-stack-overflow"
|
||||
|
||||
[[social_icons]]
|
||||
id = "snapchat"
|
||||
url = "https://www.snapchat.com/add/%s"
|
||||
title = "Snapchat"
|
||||
icon = "fa-snapchat-ghost"
|
||||
|
||||
[[social_icons]]
|
||||
id = "instagram"
|
||||
url = "https://www.instagram.com/%s"
|
||||
title = "Instagram"
|
||||
icon = "fa-instagram"
|
||||
|
||||
[[social_icons]]
|
||||
id = "youtube"
|
||||
url = "https://www.youtube.com/%s"
|
||||
title = "Youtube"
|
||||
icon = "fa-youtube"
|
||||
|
||||
[[social_icons]]
|
||||
id = "soundcloud"
|
||||
url = "https://soundcloud.com/%s"
|
||||
title = "SoundCloud"
|
||||
icon = "fa-soundcloud"
|
||||
|
||||
[[social_icons]]
|
||||
id = "spotify"
|
||||
url = "https://open.spotify.com/user/%s"
|
||||
title = "Spotify"
|
||||
icon = "fa-spotify"
|
||||
|
||||
[[social_icons]]
|
||||
id = "bandcamp"
|
||||
url = "https://%s.bandcamp.com/"
|
||||
title = "Bandcamp"
|
||||
icon = "fa-bandcamp"
|
||||
|
||||
[[social_icons]]
|
||||
id = "itchio"
|
||||
url = "https://itch.io/profile/%s"
|
||||
title = "Itch.io"
|
||||
icon = "fa-gamepad"
|
||||
|
||||
[[social_icons]]
|
||||
id = "keybase"
|
||||
url = "https://keybase.io/%s"
|
||||
title = "Keybase"
|
||||
icon = "fa-key"
|
||||
|
||||
[[social_icons]]
|
||||
id = "vk"
|
||||
url = "https://vk.com/%s"
|
||||
title = "VK"
|
||||
icon = "fa-vk"
|
||||
|
||||
[[social_icons]]
|
||||
id = "paypal"
|
||||
url = "https://paypal.me/%s"
|
||||
title = "PayPal"
|
||||
icon = "fa-paypal"
|
||||
|
||||
[[social_icons]]
|
||||
id = "telegram"
|
||||
url = "https://telegram.me/%s"
|
||||
title = "Telegram"
|
||||
icon = "fa-telegram"
|
|
@ -1,92 +0,0 @@
|
|||
baseurl = "https://username.github.io"
|
||||
DefaultContentLanguage = "en"
|
||||
#DefaultContentLanguage = "ja"
|
||||
title = "Beautiful Hugo"
|
||||
theme = "beautifulhugo"
|
||||
metaDataFormat = "yaml"
|
||||
pygmentsUseClasses = true
|
||||
pygmentCodeFences = true
|
||||
#disqusShortname = "XXX"
|
||||
#googleAnalytics = "XXX"
|
||||
|
||||
[Params]
|
||||
subtitle = "Build a beautiful and simple website in minutes"
|
||||
logo = "img/avatar-icon.png"
|
||||
favicon = "img/favicon.ico"
|
||||
dateFormat = "January 2, 2006"
|
||||
commit = false
|
||||
rss = true
|
||||
comments = true
|
||||
# gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic"
|
||||
|
||||
#[[Params.bigimg]]
|
||||
# src = "img/triangle.jpg"
|
||||
# desc = "Triangle"
|
||||
#[[Params.bigimg]]
|
||||
# src = "img/sphere.jpg"
|
||||
# desc = "Sphere"
|
||||
#[[Params.bigimg]]
|
||||
# src = "img/hexagon.jpg"
|
||||
# desc = "Hexagon"
|
||||
|
||||
[Author]
|
||||
name = "Some Person"
|
||||
website = "yourwebsite.com"
|
||||
email = "youremail@domain.com"
|
||||
facebook = "username"
|
||||
googleplus = "+username" # or xxxxxxxxxxxxxxxxxxxxx
|
||||
github = "username"
|
||||
gitlab = "username"
|
||||
twitter = "username"
|
||||
reddit = "username"
|
||||
linkedin = "username"
|
||||
xing = "username"
|
||||
stackoverflow = "users/XXXXXXX/username"
|
||||
snapchat = "username"
|
||||
instagram = "username"
|
||||
youtube = "user/username" # or channel/channelname
|
||||
soundcloud = "username"
|
||||
spotify = "username"
|
||||
bandcamp = "username"
|
||||
itchio = "username"
|
||||
vk = "username"
|
||||
paypal = "username"
|
||||
telegram = "username"
|
||||
|
||||
[[menu.main]]
|
||||
name = "Blog"
|
||||
url = ""
|
||||
weight = 1
|
||||
|
||||
[[menu.main]]
|
||||
name = "About"
|
||||
url = "page/about/"
|
||||
weight = 3
|
||||
|
||||
[[menu.main]]
|
||||
identifier = "samples"
|
||||
name = "Samples"
|
||||
weight = 2
|
||||
|
||||
[[menu.main]]
|
||||
parent = "samples"
|
||||
name = "Big Image Sample"
|
||||
url = "post/2017-03-07-bigimg-sample"
|
||||
weight = 1
|
||||
|
||||
[[menu.main]]
|
||||
parent = "samples"
|
||||
name = "Math Sample"
|
||||
url = "post/2017-03-05-math-sample"
|
||||
weight = 2
|
||||
|
||||
[[menu.main]]
|
||||
parent = "samples"
|
||||
name = "Code Sample"
|
||||
url = "post/2016-03-08-code-sample"
|
||||
weight = 3
|
||||
|
||||
[[menu.main]]
|
||||
name = "Tags"
|
||||
url = "tags"
|
||||
weight = 3
|
|
@ -1,2 +0,0 @@
|
|||
## Front Page Content
|
||||
`beautifulhugo` supports content on your front page. Edit `/content/_index.md` to change what appears here. Delete `/content/_index.md` if you don't want any content here.
|
|
@ -1,16 +0,0 @@
|
|||
---
|
||||
title: About me
|
||||
subtitle: Why you'd want to go on a date with me
|
||||
comments: false
|
||||
---
|
||||
|
||||
My name is Inigo Montoya. I have the following qualities:
|
||||
|
||||
- I rock a great mustache
|
||||
- I'm extremely loyal to my family
|
||||
|
||||
What else do you need?
|
||||
|
||||
### my history
|
||||
|
||||
To be honest, I'm having some trouble remembering right now, so why don't you just watch [my movie](http://en.wikipedia.org/wiki/The_Princess_Bride_%28film%29) and it will answer **all** your questions.
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: First post!
|
||||
date: 2015-01-05
|
||||
---
|
||||
|
||||
This is my first post, how exciting!
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: Pirates arrrr
|
||||
date: 2015-01-15
|
||||
---
|
||||
|
||||
Piracy is typically an act of robbery or criminal violence at sea. The term can include acts committed on land, in the air, or in other major bodies of water or on a shore. It does not normally include crimes committed against persons traveling on the same vessel as the perpetrator (e.g. one passenger stealing from others on the same vessel). The term has been used throughout history to refer to raids across land borders by non-state agents.
|
|
@ -1,11 +0,0 @@
|
|||
---
|
||||
title: Soccer
|
||||
subtitle: Best sport ever!
|
||||
date: 2015-01-19
|
||||
---
|
||||
|
||||
From Wikipedia:
|
||||
|
||||
Association football, more commonly known as football or soccer,[2] is a sport played between two teams of eleven players with a spherical ball. It is played by 250 million players in over 200 countries, making it the world's most popular sport.[3][4][5][6] The game is played on a rectangular field with a goal at each end. The object of the game is to score by getting the ball into the opposing goal.
|
||||
|
||||
The goalkeepers are the only players allowed to touch the ball with their hands or arms while it is in play and then only in their penalty area. Outfield players mostly use their feet to strike or pass the ball, but may use their head or torso to strike the ball instead. The team that scores the most goals by the end of the match wins. If the score is level at the end of the game, either a draw is declared or the game goes into extra time and/or a penalty shootout depending on the format of the competition. The Laws of the Game were originally codified in England by The Football Association in 1863. Association football is governed internationally by the International Federation of Association Football (FIFA; French: Fédération Internationale de Football Association) which organises a World Cup every four years.[7]
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: Dear diary
|
||||
date: 2015-01-27
|
||||
---
|
||||
|
||||
What is it with that Mary girl? Dragging me to school every day. As if I had a choice. What you don't hear in those nursery rhymes is that she starves me if I don't go to school with her; it's the only way I can stay alive! I'm thinking about being adopted by Little Bo Peep, sure I may get lost, but anything is better than being with Mary and those little brats at school (shudder, shudder).
|
|
@ -1,41 +0,0 @@
|
|||
---
|
||||
title: To be
|
||||
subtitle: ... or not to be?
|
||||
date: 2015-02-13
|
||||
---
|
||||
|
||||
To be, or not to be--that is the question:
|
||||
Whether 'tis nobler in the mind to suffer
|
||||
The slings and arrows of outrageous fortune
|
||||
Or to take arms against a sea of troubles
|
||||
And by opposing end them. To die, to sleep--
|
||||
No more--and by a sleep to say we end
|
||||
The heartache, and the thousand natural shocks
|
||||
That flesh is heir to. 'Tis a consummation
|
||||
Devoutly to be wished. To die, to sleep--
|
||||
To sleep--perchance to dream: ay, there's the rub,
|
||||
For in that sleep of death what dreams may come
|
||||
When we have shuffled off this mortal coil,
|
||||
Must give us pause. There's the respect
|
||||
That makes calamity of so long life.
|
||||
For who would bear the whips and scorns of time,
|
||||
Th' oppressor's wrong, the proud man's contumely
|
||||
The pangs of despised love, the law's delay,
|
||||
The insolence of office, and the spurns
|
||||
That patient merit of th' unworthy takes,
|
||||
When he himself might his quietus make
|
||||
With a bare bodkin? Who would fardels bear,
|
||||
To grunt and sweat under a weary life,
|
||||
But that the dread of something after death,
|
||||
The undiscovered country, from whose bourn
|
||||
No traveller returns, puzzles the will,
|
||||
And makes us rather bear those ills we have
|
||||
Than fly to others that we know not of?
|
||||
Thus conscience does make cowards of us all,
|
||||
And thus the native hue of resolution
|
||||
Is sicklied o'er with the pale cast of thought,
|
||||
And enterprise of great pitch and moment
|
||||
With this regard their currents turn awry
|
||||
And lose the name of action. -- Soft you now,
|
||||
The fair Ophelia! -- Nymph, in thy orisons
|
||||
Be all my sins remembered.
|
|
@ -1,35 +0,0 @@
|
|||
---
|
||||
title: Test markdown
|
||||
subtitle: Each post also has a subtitle
|
||||
date: 2015-02-20
|
||||
tags: ["example", "markdown"]
|
||||
---
|
||||
|
||||
You can write regular [markdown](http://markdowntutorial.com/) here and Jekyll will automatically convert it to a nice webpage. I strongly encourage you to [take 5 minutes to learn how to write in markdown](http://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc.
|
||||
|
||||
**Here is some bold text**
|
||||
|
||||
## Here is a secondary heading
|
||||
|
||||
Here's a useless table:
|
||||
|
||||
| Number | Next number | Previous number |
|
||||
| :------ |:--- | :--- |
|
||||
| Five | Six | Four |
|
||||
| Ten | Eleven | Nine |
|
||||
| Seven | Eight | Six |
|
||||
| Two | Three | One |
|
||||
|
||||
|
||||
How about a yummy crepe?
|
||||
|
||||
![Crepe](http://s3-media3.fl.yelpcdn.com/bphoto/cQ1Yoa75m2yUFFbY2xwuqw/348s.jpg)
|
||||
|
||||
Here's a code chunk with syntax highlighting:
|
||||
|
||||
```javascript
|
||||
var foo = function(x) {
|
||||
return(x + 5);
|
||||
}
|
||||
foo(3)
|
||||
```
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
title: Flake it till you make it
|
||||
subtitle: Excerpt from Soulshaping by Jeff Brown
|
||||
date: 2015-02-26
|
||||
bigimg: [{src: "/img/path.jpg", desc: "Path"}]
|
||||
---
|
||||
|
||||
Under what circumstances should we step off a path? When is it essential that we finish what we start? If I bought a bag of peanuts and had an allergic reaction, no one would fault me if I threw it out. If I ended a relationship with a woman who hit me, no one would say that I had a commitment problem. But if I walk away from a seemingly secure route because my soul has other ideas, I am a flake?
|
||||
|
||||
The truth is that no one else can definitively know the path we are here to walk. It’s tempting to listen—many of us long for the omnipotent other—but unless they are genuine psychic intuitives, they can’t know. All others can know is their own truth, and if they’ve actually done the work to excavate it, they will have the good sense to know that they cannot genuinely know anyone else’s. Only soul knows the path it is here to walk. Since you are the only one living in your temple, only you can know its scriptures and interpretive structure.
|
||||
|
||||
At the heart of the struggle are two very different ideas of success—survival-driven and soul-driven. For survivalists, success is security, pragmatism, power over others. Success is the absence of material suffering, the nourishing of the soul be damned. It is an odd and ironic thing that most of the material power in our world often resides in the hands of younger souls. Still working in the egoic and material realms, they love the sensations of power and focus most of their energy on accumulation. Older souls tend not to be as materially driven. They have already played the worldly game in previous lives and they search for more subtle shades of meaning in this one—authentication rather than accumulation. They are often ignored by the culture at large, although they really are the truest warriors.
|
||||
|
||||
A soulful notion of success rests on the actualization of our innate image. Success is simply the completion of a soul step, however unsightly it may be. We have finished what we started when the lesson is learned. What a fear-based culture calls a wonderful opportunity may be fruitless and misguided for the soul. Staying in a passionless relationship may satisfy our need for comfort, but it may stifle the soul. Becoming a famous lawyer is only worthwhile if the soul demands it. It is an essential failure if you are called to be a monastic this time around. If you need to explore and abandon ten careers in order to stretch your soul toward its innate image, then so be it. Flake it till you make it.
|
|
@ -1,42 +0,0 @@
|
|||
---
|
||||
title: Code Sample
|
||||
subtitle: Using Hugo or Pygments
|
||||
date: 2016-03-08
|
||||
tags: ["example", "code"]
|
||||
---
|
||||
|
||||
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 >}}
|
||||
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 >}}
|
||||
|
||||
|
||||
And here is the same code with line numbers:
|
||||
|
||||
{{< 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 >}}
|
|
@ -1,49 +0,0 @@
|
|||
---
|
||||
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.
|
||||
$$
|
|
@ -1,40 +0,0 @@
|
|||
---
|
||||
title: Big Image Sample
|
||||
subtitle: Using Multiple Images
|
||||
date: 2017-03-07
|
||||
tags: ["example", "bigimg"]
|
||||
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}, {src: "/img/sphere.jpg", desc: "Sphere"}, {src: "/img/hexagon.jpg", desc: "Hexagon"}]
|
||||
---
|
||||
|
||||
The image banners at the top of the page are refered to as "bigimg" in this theme. They are optional, and one more more can be specified. If more than one is specified, the images rotate every 10 seconds. In the front matter, bigimgs are specified using an array of hashes.
|
||||
|
||||
<!--more-->
|
||||
|
||||
A single bigimg can be specified in the front matter by the following YAML:
|
||||
```
|
||||
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}]
|
||||
```
|
||||
|
||||
Multiple bigimgs can be specified in the front matter by the following YAML:
|
||||
```
|
||||
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"},
|
||||
{src: "/img/sphere.jpg", desc: "Sphere"},
|
||||
{src: "/img/hexagon.jpg", desc: "Hexagon"}]
|
||||
```
|
||||
|
||||
Also note that the description field is optional, and images could instead be specified by:
|
||||
```
|
||||
bigimg: [{src: "/img/triangle.jpg"},
|
||||
{src: "/img/sphere.jpg"},
|
||||
{src: "/img/hexagon.jpg"}]
|
||||
```
|
||||
|
||||
The above YAML array of hashes were written in "flow" style. However when generating a new page or post with `hugo new post/mypost.md`, hugo may interpret the archetype for bigimg in the default YAML style. Defining multiple bigimg's complete with descriptions in this style would be specified by:
|
||||
```
|
||||
bigimg:
|
||||
- {src: "/img/triangle.jpg", desc: "Triangle"}
|
||||
- {src: "/img/sphere.jpg", desc: "Sphere"}
|
||||
- {src: "/img/hexagon.jpg", desc: "Hexagon"}
|
||||
```
|
||||
|
||||
Additional information can be found [in this YAML tutorial](https://rhnh.net/2011/01/31/yaml-tutorial/).
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
title: Photoswipe Gallery Sample
|
||||
subtitle: Making a Gallery
|
||||
date: 2017-03-20
|
||||
tags: ["example", "photoswipe"]
|
||||
---
|
||||
|
||||
Beautiful Hugo adds a few custom shortcodes created by [Li-Wen Yip](https://www.liwen.id.au/heg/) and [Gert-Jan van den Berg](https://github.com/GjjvdBurg/HugoPhotoSwipe) for making galleries with [PhotoSwipe](http://photoswipe.com) .
|
||||
|
||||
{{< gallery caption-effect="fade" >}}
|
||||
{{< figure thumb="-thumb" link="/img/hexagon.jpg" >}}
|
||||
{{< figure thumb="-thumb" link="/img/sphere.jpg" caption="Sphere" >}}
|
||||
{{< figure thumb="-thumb" link="/img/triangle.jpg" caption="Triangle" alt="This is a long comment about a triangle" >}}
|
||||
{{< /gallery >}}
|
||||
|
||||
<!--more-->
|
||||
## Example
|
||||
The above gallery was created using the following shortcodes:
|
||||
```
|
||||
{{</* gallery caption-effect="fade" */>}}
|
||||
{{</* figure thumb="-thumb" link="/img/hexagon.jpg" */>}}
|
||||
{{</* figure thumb="-thumb" link="/img/sphere.jpg" caption="Sphere" */>}}
|
||||
{{</* figure thumb="-thumb" link="/img/triangle.jpg" caption="Triangle" alt="This is a long comment about a triangle" */>}}
|
||||
{{</* /gallery */>}}
|
||||
```
|
||||
|
||||
## Usage
|
||||
For full details please see the [hugo-easy-gallery GitHub](https://github.com/liwenyip/hugo-easy-gallery/) page. Basic usages from above are:
|
||||
|
||||
- Create a gallery with open and close tags `{{</* gallery */>}}` and `{{</* /gallery */>}}`
|
||||
- `{{</* figure src="image.jpg" */>}}` will use `image.jpg` for thumbnail and lightbox
|
||||
- `{{</* figure src="thumb.jpg" link="image.jpg" */>}}` will use `thumb.jpg` for thumbnail and `image.jpg` for lightbox
|
||||
- `{{</* figure thumb="-small" link="image.jpg" */>}}` will use `image-small.jpg` for thumbnail and `image.jpg` for lightbox
|
||||
- All the [features/parameters](https://gohugo.io/extras/shortcodes) of Hugo's built-in `figure` shortcode work as normal, i.e. src, link, title, caption, class, attr (attribution), attrlink, alt
|
||||
- `{{</* gallery caption-effect="fade" */>}}` will fade in captions for all figures in this gallery instead of the default slide-up behavior
|
||||
- Many gallery styles for captions and hover effects exist; view the [hugo-easy-gallery GitHub](https://github.com/liwenyip/hugo-easy-gallery/) for all options
|
||||
- Note that this theme will load the photoswipe gallery theme and scripts by default, no need to load photoswipe on your individual pages
|
|
@ -1,7 +0,0 @@
|
|||
<!--
|
||||
If you want to include any custom html just before </body>, put it in this file.
|
||||
Or you can delete these file if you don't need it.
|
||||
-->
|
||||
<!-- for example, you could include some js libraries:
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.19.1/vis.js" integrity="sha256-HdIuWBZj4eftihsoDCJoMYjZi6aNVaw7YlUpzKT3ZxI=" crossorigin="anonymous"></script>
|
||||
-->
|
|
@ -1,18 +0,0 @@
|
|||
<!--
|
||||
If you want to include any custom html just before </head>, put it in this file.
|
||||
Or you can delete these file if you don't need it.
|
||||
-->
|
||||
<!-- for example, you could insert this custom css, which makes the bigimg not stretch:
|
||||
<style>
|
||||
.intro-header.big-img, .intro-header.big-img .big-img-transition {
|
||||
-webkit-background-size: contain !important;
|
||||
-moz-background-size: contain !important;
|
||||
background-size: contain !important;
|
||||
-o-background-size: contain !important;
|
||||
background-color: lightgrey;
|
||||
}
|
||||
</style>
|
||||
-->
|
||||
<!-- or you could include some additional css libraries:
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.19.1/vis.css" integrity="sha256-I1UoFd33KHIydu88R9owFaQWzwkiZV4hXXug5aYaM28=" crossorigin="anonymous" />
|
||||
-->
|
|
@ -1,39 +0,0 @@
|
|||
# Content
|
||||
- id: dateFormat
|
||||
translation: "02.01.2006"
|
||||
- id: postedOnDate
|
||||
translation: "Gepostet am {{ .Count }}"
|
||||
- id: translationsLabel
|
||||
translation: "Andere Sprachen: "
|
||||
- id: translationsSeparator
|
||||
translation: ", "
|
||||
- id: readMore
|
||||
translation: "Mehr"
|
||||
- id: olderPosts
|
||||
translation: "Ältere Posts"
|
||||
- id: newerPosts
|
||||
translation: "Neuere Posts"
|
||||
- id: previousPost
|
||||
translation: "Letzter Post"
|
||||
- id: nextPost
|
||||
translation: "Nächster Post"
|
||||
|
||||
# 404 page
|
||||
- id: pageNotFound
|
||||
translation: "Ups, diese Seite existiert nicht. (404 Error)"
|
||||
|
||||
# Footer
|
||||
- id: poweredBy # Accepts HTML
|
||||
translation: '<a href="http://gohugo.io">Hugo v{{ .Hugo.Version }}</a> powered • Theme by <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapted to <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>'
|
||||
|
||||
# Navigation
|
||||
- id: toggleNavigation
|
||||
translation: "Navigation"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "Sprache"
|
||||
- id: gcseLabelShort
|
||||
translation: "Suche"
|
||||
- id: gcseLabelLong
|
||||
translation: "Suche {{ .Site.Title }}"
|
||||
- id: gcseClose
|
||||
translation: "Schließen"
|
|
@ -1,40 +0,0 @@
|
|||
# Content
|
||||
- id: dateFormat
|
||||
translation: "January 2, 2006"
|
||||
- id: postedOnDate
|
||||
translation: "Posted on {{ .Count }}"
|
||||
- id: translationsLabel
|
||||
translation: "Other languages: "
|
||||
- id: translationsSeparator
|
||||
translation: ", "
|
||||
- id: readMore
|
||||
translation: "Read More"
|
||||
- id: olderPosts
|
||||
translation: "Older Posts"
|
||||
- id: newerPosts
|
||||
translation: "Newer Posts"
|
||||
- id: previousPost
|
||||
translation: "Previous Post"
|
||||
- id: nextPost
|
||||
translation: "Next Post"
|
||||
|
||||
# 404 page
|
||||
- id: pageNotFound
|
||||
translation: "Whoops, this page doesn't exist. Move along. (404 error)"
|
||||
|
||||
# Footer
|
||||
- id: poweredBy # Accepts HTML
|
||||
translation: '<a href="http://gohugo.io">Hugo v{{ .Hugo.Version }}</a> powered • Theme by <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapted to <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>'
|
||||
|
||||
# Navigation
|
||||
- id: toggleNavigation
|
||||
translation: "Toggle navigation"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "Language"
|
||||
- id: gcseLabelShort
|
||||
translation: "Search"
|
||||
- id: gcseLabelLong
|
||||
translation: "Search {{ .Site.Title }}"
|
||||
- id: gcseClose
|
||||
translation: "Close"
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
# Content
|
||||
- id: dateFormat
|
||||
translation: "2006年1月2日"
|
||||
- id: postedOnDate
|
||||
translation: "{{ .Count }}に投稿"
|
||||
- id: translationsLabel
|
||||
translation: "翻訳:"
|
||||
- id: translationsSeparator
|
||||
translation: "・"
|
||||
- id: readMore
|
||||
translation: "続きを読む"
|
||||
- id: olderPosts
|
||||
translation: "古いページ"
|
||||
- id: newerPosts
|
||||
translation: "新しいページ"
|
||||
- id: previousPost
|
||||
translation: "前ページ"
|
||||
- id: nextPost
|
||||
translation: "次ページ"
|
||||
|
||||
# 404 page
|
||||
- id: pageNotFound
|
||||
translation: "おっと、このページが存在しない。他にあたってください。(404エラー)"
|
||||
|
||||
# Footer
|
||||
- id: poweredBy # Accepts HTML
|
||||
translation: '起動力に<a href="http://gohugo.io">Hugo v{{ .Hugo.Version }}</a> • テーマに<a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>に基づいている<a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>'
|
||||
|
||||
# Navigation
|
||||
- id: toggleNavigation
|
||||
translation: "メニューを切り替え"
|
||||
- id: gcseLabelShort
|
||||
translation: "検索"
|
||||
- id: gcseLabelLong
|
||||
translation: "{{ .Site.Title }}を検索"
|
||||
- id: gcseClose
|
||||
translation: "閉じる"
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
# Content
|
||||
- id: dateFormat
|
||||
translation: "Январь 2, 2006"
|
||||
- id: postedOnDate
|
||||
translation: "Опубликовано {{ .Count }}"
|
||||
- id: translationsLabel
|
||||
translation: "Другие языки: "
|
||||
- id: translationsSeparator
|
||||
translation: ", "
|
||||
- id: readMore
|
||||
translation: "Далее"
|
||||
- id: olderPosts
|
||||
translation: "Предыдущие записи"
|
||||
- id: newerPosts
|
||||
translation: "Новые записи"
|
||||
- id: previousPost
|
||||
translation: "Предыдущий"
|
||||
- id: nextPost
|
||||
translation: "Следующий"
|
||||
|
||||
# 404 page
|
||||
- id: pageNotFound
|
||||
translation: "Уууупс, страница не найдена. Поищите ещё. (ошибка 404)"
|
||||
|
||||
# Footer
|
||||
- id: poweredBy # Accepts HTML
|
||||
translation: 'На базе <a href="http://gohugo.io">Hugo v{{ .Hugo.Version }}</a> • Тема <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> на базе <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||
|
||||
# Navigation
|
||||
- id: toggleNavigation
|
||||
translation: "Навигация"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "Язык"
|
||||
- id: gcseLabelShort
|
||||
translation: "Поиск"
|
||||
- id: gcseLabelLong
|
||||
translation: "Поиск по {{ .Site.Title }}"
|
||||
- id: gcseClose
|
||||
translation: "Закрыть"
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
# Content
|
||||
- id: dateFormat
|
||||
translation: "January 2, 2006"
|
||||
- id: postedOnDate
|
||||
translation: "发表于 {{ .Count }}"
|
||||
- id: translationsLabel
|
||||
translation: "其它语言: "
|
||||
- id: translationsSeparator
|
||||
translation: ", "
|
||||
- id: readMore
|
||||
translation: "阅读全文"
|
||||
- id: olderPosts
|
||||
translation: "下一页"
|
||||
- id: newerPosts
|
||||
translation: "上一页"
|
||||
- id: previousPost
|
||||
translation: "前一篇"
|
||||
- id: nextPost
|
||||
translation: "后一篇"
|
||||
|
||||
# 404 page
|
||||
- id: pageNotFound
|
||||
translation: "啊哦,这篇文章不存在。 (404 错误)"
|
||||
|
||||
# Footer
|
||||
- id: poweredBy # Accepts HTML
|
||||
translation: '由 <a href="http://gohugo.io">Hugo v{{ .Hugo.Version }}</a> 强力驱动 • 主题 <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> 移植自 <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||
|
||||
# Navigation
|
||||
- id: toggleNavigation
|
||||
translation: "切换导航"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "语言"
|
||||
- id: gcseLabelShort
|
||||
translation: "搜索"
|
||||
- id: gcseLabelLong
|
||||
translation: "搜索 {{ .Site.Title }}"
|
||||
- id: gcseClose
|
||||
translation: "关闭"
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 100 KiB |
Binary file not shown.
Before Width: | Height: | Size: 74 KiB |
|
@ -1,11 +0,0 @@
|
|||
{{ define "header" }}<!-- No header on 404 pages -->{{ end }}
|
||||
{{ define "main" }}
|
||||
<div role="main" class="container main-content">
|
||||
<div class="text-center">
|
||||
<h1>{{ i18n "pageNotFound" }}</h1>
|
||||
<br/>
|
||||
<img src="{{ .Site.BaseURL }}/img/404-southpark.jpg" />
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Lang }}">
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ partial "nav.html" . }}
|
||||
{{ block "header" . }}{{ partial "header.html" . }}{{ end }}
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
{{ define "header" }}
|
||||
<header class="header-section ">
|
||||
<div class="intro-header no-img">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="page-heading">
|
||||
<h1>{{ if .Data.Singular }}#{{ end }}{{ .Title }}</h1>
|
||||
<hr class="small">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ define "main" }}
|
||||
<div class="container" role="main">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
{{ with .Content }}
|
||||
<div class="well">
|
||||
{{.}}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="posts-list">
|
||||
{{ range .Paginator.Pages }}
|
||||
<article class="post-preview">
|
||||
<a href="{{ .Permalink }}">
|
||||
<h2 class="post-title">{{ .Title }}</h2>
|
||||
|
||||
{{ if .Params.subtitle }}
|
||||
<h3 class="post-subtitle">
|
||||
{{ .Params.subtitle }}
|
||||
</h3>
|
||||
{{ end }}
|
||||
</a>
|
||||
|
||||
<p class="post-meta">
|
||||
{{ default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format | i18n "postedOnDate" }}
|
||||
</p>
|
||||
<div class="post-entry">
|
||||
{{ if .Truncated }}
|
||||
{{ .Summary }}
|
||||
<a href="{{ .Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a>
|
||||
{{ else }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-meta">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ $.Site.LanguagePrefix | absURL }}tags/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<ul class="pager main-pager">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li class="previous">
|
||||
<a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}">← {{ i18n "newerPosts" }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li class="next">
|
||||
<a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}">{{ i18n "olderPosts" }} →</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
{{ define "main" }}
|
||||
<div class="container" role="main">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<article role="main" class="blog-post">
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
<ul class="pager blog-pager">
|
||||
{{ if .PrevInSection }}
|
||||
<li class="previous">
|
||||
<a href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">← {{ i18n "previousPost" }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if .NextInSection }}
|
||||
<li class="next">
|
||||
<a href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title }}">{{ i18n "nextPost" }} →</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
|
||||
{{ if .Site.DisqusShortname }}
|
||||
<div class="disqus-comments">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -1,14 +0,0 @@
|
|||
{{ define "main" }}
|
||||
{{ $data := .Data }}
|
||||
<div class="container" role="main">
|
||||
<article class="post-preview">
|
||||
<div class="list-group col-lg-4 col-lg-offset-4 col-md-6 col-md-offset-3">
|
||||
{{ range $key, $value := .Data.Terms.ByCount }}
|
||||
<a href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/" class="list-group-item">
|
||||
{{ $value.Name }}<span class="badge">{{ $value.Count }}</span></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
{{ define "main" }}
|
||||
<div role="main" class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
{{ with .Content }}
|
||||
<div class="well">
|
||||
{{.}}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="posts-list">
|
||||
{{ $pag := .Paginate (where .Data.Pages "Type" "post") }}
|
||||
{{ range $pag.Pages }}
|
||||
<article class="post-preview">
|
||||
<a href="{{ .Permalink }}">
|
||||
<h2 class="post-title">{{ .Title }}</h2>
|
||||
{{ if .Params.subtitle }}
|
||||
<h3 class="post-subtitle">
|
||||
{{ .Params.subtitle }}
|
||||
</h3>
|
||||
{{ end }}
|
||||
</a>
|
||||
|
||||
{{ partial "post_meta.html" . }}
|
||||
<div class="post-entry">
|
||||
{{ if .Truncated }}
|
||||
{{ .Summary }}
|
||||
<a href="{{ .Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a>
|
||||
{{ else }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-meta">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ $.Site.LanguagePrefix | absURL }}tags/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<ul class="pager main-pager">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li class="previous">
|
||||
<a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}">← {{ i18n "newerPosts" }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li class="next">
|
||||
<a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}">{{ i18n "olderPosts" }} →</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
|
||||
{{ if .Site.DisqusShortname }}
|
||||
<div class="comments">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -1,82 +0,0 @@
|
|||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<ul class="list-inline text-center footer-links">
|
||||
{{ range .Site.Data.beautifulhugo.social.social_icons }}
|
||||
{{- if isset $.Site.Author .id }}
|
||||
<li>
|
||||
<a href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa {{ .icon }} fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.rss }}
|
||||
<li>
|
||||
<a href="{{ "index.xml" | absLangURL }}" title="RSS">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-rss fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<p class="credits copyright text-muted">
|
||||
{{ if .Site.Author.name }}
|
||||
{{ if .Site.Author.website }}
|
||||
<a href="{{ .Site.Author.website }}">{{ .Site.Author.name }}</a>
|
||||
{{ else }}
|
||||
{{ .Site.Author.name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
•
|
||||
{{ .Site.LastChange.Format "2006" }}
|
||||
|
||||
{{ if .Site.Title }}
|
||||
•
|
||||
<a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
<!-- Please don't remove this, keep my open source work credited :) -->
|
||||
<p class="credits theme-by text-muted">
|
||||
{{ i18n "poweredBy" . | safeHTML }}
|
||||
{{ with .Site.Params.commit }} • [<a href="{{.}}{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT" }}</a>]{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.js" integrity="sha384-/y1Nn9+QQAipbNQWU65krzJralCnuOasHncUFXGkdwntGeSvQicrYkiUBwsgUqc1" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/contrib/auto-render.min.js" integrity="sha384-dq1/gEHSxPZQ7DdrM82ID4YVol9BYyU7GbWlIwnwyPzotpoc57wDw/guX8EaYGPx" crossorigin="anonymous"></script>
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
<script src="{{ "js/main.js" | absURL }}"></script>
|
||||
<script src="{{ "js/highlight.min.js" | absURL }}"></script>
|
||||
<script> hljs.initHighlightingOnLoad(); </script>
|
||||
<script> renderMathInElement(document.body); </script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js" integrity="sha256-UplRCs9v4KXVJvVY+p+RSo5Q4ilAUXh7kpjyIP5odyc=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe-ui-default.min.js" integrity="sha256-PWHOlUzc96pMc8ThwRIXPn8yH4NOLu42RQ0b9SpnpFk=" crossorigin="anonymous"></script>
|
||||
<script src="{{ "js/load-photoswipe.js" | absURL }}"></script>
|
||||
<!-- Google Custom Search Engine -->
|
||||
{{ if .Site.Params.gcse }}
|
||||
<script>
|
||||
(function() {
|
||||
var cx = '{{ .Site.Params.gcse }}';
|
||||
var gcse = document.createElement('script');
|
||||
gcse.type = 'text/javascript';
|
||||
gcse.async = true;
|
||||
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(gcse, s);
|
||||
})();
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{- partial "footer_custom.html" . }}
|
|
@ -1,4 +0,0 @@
|
|||
<!--
|
||||
If you want to include any custom html just before </body>, put it in /layouts/footer_custom.html
|
||||
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/footer_custom.html doesn't exist.
|
||||
-->
|
|
@ -1,52 +0,0 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<!-- Site Title, Description, Author, and Favicon -->
|
||||
{{- with .Title | default .Site.Title }}
|
||||
<title>{{ . }}</title>
|
||||
<meta property="og:title" content="{{ . }}" />
|
||||
<meta name="twitter:title" content="{{ . | truncate 70 }}" />
|
||||
{{- end }}
|
||||
{{- with .Description | default .Params.subtitle | default .Summary }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
<meta property="og:description" content="{{ . }}">
|
||||
<meta name="twitter:description" content="{{ . | truncate 200 }}">
|
||||
{{- end }}
|
||||
<meta name="author" content="{{ .Site.Author.name }}"/>
|
||||
{{- with .Site.Params.favicon }}
|
||||
<link href='{{ . | absURL }}' rel='icon' type='image/x-icon'/>
|
||||
{{- end -}}
|
||||
<!-- Social Media Tags -->
|
||||
{{- with .Params.share_img | default .Params.image | default .Site.Params.logo }}
|
||||
<meta property="og:image" content="{{ . | absURL }}" />
|
||||
<meta name="twitter:image" content="{{ . | absURL }}" />
|
||||
{{- end }}
|
||||
<meta name="twitter:card" content="summary" />
|
||||
{{- with .Site.Author.twitter }}
|
||||
<meta name="twitter:site" content="@{{ . }}" />
|
||||
<meta name="twitter:creator" content="@{{ . }}" />
|
||||
{{- end }}
|
||||
{{- with .Site.Params.fb_app_id }}
|
||||
<meta property="fb:app_id" content="{{ . }}" />
|
||||
{{- end }}
|
||||
<meta property="og:url" content="{{ .URL | absLangURL }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||
<!-- Hugo Version number -->
|
||||
{{ .Hugo.Generator -}}
|
||||
<!-- Links and stylesheets -->
|
||||
<link rel="canonical" href="{{ .URL | absLangURL }}" />
|
||||
<link rel="alternate" href="{{ "index.xml" | absLangURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css" integrity="sha384-wITovz90syo1dJWVh32uuETPVEtGigN07tkttEqPv+uR2SE/mbQcG7ATL28aI9H0" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" />
|
||||
<link rel="stylesheet" href="{{ "css/pygment_highlights.css" | absURL }}" />
|
||||
<link rel="stylesheet" href="{{ "css/highlight.min.css" | absURL }}" />
|
||||
{{- partial "head_custom.html" . }}
|
||||
{{- partial "load-photoswipe-theme.html" . }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
</head>
|
|
@ -1,4 +0,0 @@
|
|||
<!--
|
||||
If you want to include any custom html just before </head>, put it in /layouts/head_custom.html
|
||||
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/head_custom.html doesn't exist.
|
||||
-->
|
|
@ -1,70 +0,0 @@
|
|||
{{ if .IsHome }}
|
||||
{{ $.Scratch.Set "title" .Site.Title }}
|
||||
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
||||
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "title" .Title }}
|
||||
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
||||
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
||||
{{ end }}
|
||||
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
||||
|
||||
{{ if or $bigimg ($.Scratch.Get "title") }}
|
||||
{{ if $bigimg }}
|
||||
<div id="header-big-imgs" data-num-img={{len $bigimg}} {{range $i, $img := $bigimg}}data-img-src-{{add $i 1}}="{{$img.src | absURL }}" {{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}{{end}}></div>
|
||||
{{ end }}
|
||||
|
||||
<header class="header-section {{ if $bigimg }}has-img{{ end }}">
|
||||
{{ if $bigimg }}
|
||||
<div class="intro-header big-img">
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<hr class="small">
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="img-desc" style="display: inline;"></span>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="intro-header no-img">
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<hr class="small">
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||