forked from jeffreytse/jekyll-theme-yat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
General code reformat through pre-commit
- Loading branch information
1 parent
27f1e34
commit d38895f
Showing
78 changed files
with
2,102 additions
and
2,384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
name: Github Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master # Here source code branch is `master`, it could be other branch | ||
push: | ||
branches: | ||
- master # Here source code branch is `master`, it could be other branch | ||
|
||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Use GitHub Actions' cache to cache dependencies on servers | ||
- uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
# Use GitHub Actions' cache to cache dependencies on servers | ||
- uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
# Use GitHub Deploy Action to build and deploy to Github | ||
- uses: jeffreytse/jekyll-deploy-action@master | ||
with: | ||
provider: 'github' | ||
token: ${{ secrets.GITHUB_TOKEN }} # It's your Personal Access Token(PAT) | ||
repository: '' # Default is current repository | ||
branch: 'gh-pages' # Default is gh-pages for github provider | ||
jekyll_src: './' # Default is root directory | ||
jekyll_cfg: '_config.yml' # Default is _config.yml | ||
jekyll_baseurl: '/jekyll-theme-yat' # Default is empty | ||
cname: '' # Default is to not use a cname | ||
actor: '' # Default is the GITHUB_ACTOR | ||
# Use GitHub Deploy Action to build and deploy to Github | ||
- uses: jeffreytse/jekyll-deploy-action@master | ||
with: | ||
provider: "github" | ||
token: ${{ secrets.GITHUB_TOKEN }} # It's your Personal Access Token(PAT) | ||
repository: "" # Default is current repository | ||
branch: "gh-pages" # Default is gh-pages for github provider | ||
jekyll_src: "./" # Default is root directory | ||
jekyll_cfg: "_config.yml" # Default is _config.yml | ||
jekyll_baseurl: "/jekyll-theme-yat" # Default is empty | ||
cname: "" # Default is to not use a cname | ||
actor: "" # Default is the GITHUB_ACTOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
|
||
source "https://rubygems.org" | ||
gemspec | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
home: | ||
heading: "Yet Another TurtleBot" | ||
subheading: "Two-wheeled mobile robot based on SoC Zynq 7000" | ||
banner: "Your image url" | ||
heading: "Yet Another TurtleBot" | ||
subheading: "Two-wheeled mobile robot based on SoC Zynq 7000" | ||
banner: "Your image url" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{% comment %} | ||
Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons: | ||
|
||
1. Head over to https://realfavicongenerator.net/ to add your own favicons. | ||
2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet. | ||
{% endcomment %} | ||
{% comment %} Placeholder to allow defining custom head, in principle, you can | ||
add anything here, e.g. favicons: 1. Head over to | ||
https://realfavicongenerator.net/ to add your own favicons. 2. Customize default | ||
_includes/custom-head.html in your source directory and insert the given code | ||
snippet. {% endcomment %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<div id="click-to-top" class="click-to-top"> | ||
<i class="fa fa-arrow-up"></i> | ||
<i class="fa fa-arrow-up"></i> | ||
</div> | ||
<script> | ||
(function () { | ||
const clickToTop = document.getElementById('click-to-top'); | ||
window.addEventListener('scroll', () => { | ||
if (window.scrollY > 100) { | ||
clickToTop.classList.add('show') | ||
}else { | ||
clickToTop.classList.remove('show') | ||
} | ||
}); | ||
clickToTop.addEventListener('click', () => { | ||
window.smoothScrollTo(0); | ||
}); | ||
})(); | ||
;(function () { | ||
const clickToTop = document.getElementById("click-to-top") | ||
window.addEventListener("scroll", () => { | ||
if (window.scrollY > 100) { | ||
clickToTop.classList.add("show") | ||
} else { | ||
clickToTop.classList.remove("show") | ||
} | ||
}) | ||
clickToTop.addEventListener("click", () => { | ||
window.smoothScrollTo(0) | ||
}) | ||
})() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,90 @@ | ||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/default.min.css"> | ||
<link | ||
rel="stylesheet" | ||
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/default.min.css" | ||
/> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js"></script> | ||
<!-- and it's easy to individually load additional languages --> | ||
<script charset="UTF-8" | ||
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/languages/go.min.js" | ||
async></script> | ||
<script | ||
charset="UTF-8" | ||
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/languages/go.min.js" | ||
async | ||
></script> | ||
|
||
{%- assign name = 'code_badge.enabled' -%} | ||
{%- include functions.html func='get_value' default='true' -%} | ||
{%- assign badge_enabled = return -%} | ||
|
||
{%- assign name = 'code_badge.color' -%} | ||
{%- include functions.html func='get_value' default='#fff' -%} | ||
{%- assign badge_color = return -%} | ||
|
||
{%- assign name = 'code_badge.background_color' -%} | ||
{%- include functions.html func='get_value' default='#ff4e00' -%} | ||
{%- assign badge_background_color = return -%} | ||
|
||
{%- assign name = 'code_badge.text_transform' -%} | ||
{%- include functions.html func='get_value' default='uppercase' -%} | ||
{%- assign badge_text_transform = return -%} | ||
{%- assign name = 'code_badge.enabled' -%} {%- include functions.html | ||
func='get_value' default='true' -%} {%- assign badge_enabled = return -%} {%- | ||
assign name = 'code_badge.color' -%} {%- include functions.html func='get_value' | ||
default='#fff' -%} {%- assign badge_color = return -%} {%- assign name = | ||
'code_badge.background_color' -%} {%- include functions.html func='get_value' | ||
default='#ff4e00' -%} {%- assign badge_background_color = return -%} {%- assign | ||
name = 'code_badge.text_transform' -%} {%- include functions.html | ||
func='get_value' default='uppercase' -%} {%- assign badge_text_transform = | ||
return -%} | ||
|
||
<script> | ||
// Init highlight js | ||
document.addEventListener('DOMContentLoaded', function(event) { | ||
var els = document.querySelectorAll('pre code') | ||
// Init highlight js | ||
document.addEventListener("DOMContentLoaded", function (event) { | ||
var els = document.querySelectorAll("pre code") | ||
|
||
function addLangData(block) { | ||
var outer = block.parentElement.parentElement.parentElement; | ||
var lang = block.getAttribute('data-lang'); | ||
for (var i = 0; i < outer.classList.length; i++) { | ||
var cls = outer.classList[i]; | ||
if (cls.startsWith('language-')) { | ||
lang = cls; | ||
break; | ||
} | ||
} | ||
if (!lang) { | ||
cls = block.getAttribute('class'); | ||
lang = cls ? cls.replace('hljs ', '') : ''; | ||
} | ||
if (lang.startsWith('language-')) { | ||
lang = lang.substr(9); | ||
} | ||
block.setAttribute('class', 'hljs ' + lang); | ||
block.parentNode.setAttribute('data-lang', lang); | ||
} | ||
function addLangData(block) { | ||
var outer = block.parentElement.parentElement.parentElement | ||
var lang = block.getAttribute("data-lang") | ||
for (var i = 0; i < outer.classList.length; i++) { | ||
var cls = outer.classList[i] | ||
if (cls.startsWith("language-")) { | ||
lang = cls | ||
break | ||
} | ||
} | ||
if (!lang) { | ||
cls = block.getAttribute("class") | ||
lang = cls ? cls.replace("hljs ", "") : "" | ||
} | ||
if (lang.startsWith("language-")) { | ||
lang = lang.substr(9) | ||
} | ||
block.setAttribute("class", "hljs " + lang) | ||
block.parentNode.setAttribute("data-lang", lang) | ||
} | ||
|
||
function addBadge(block) { | ||
var enabled = ('{{ badge_enabled }}' || 'true').toLowerCase(); | ||
if (enabled == 'true') { | ||
var pre = block.parentElement; | ||
pre.classList.add('badge'); | ||
} | ||
} | ||
function addBadge(block) { | ||
var enabled = ("{{ badge_enabled }}" || "true").toLowerCase() | ||
if (enabled == "true") { | ||
var pre = block.parentElement | ||
pre.classList.add("badge") | ||
} | ||
} | ||
|
||
function handle(block) { | ||
addLangData(block); | ||
addBadge(block) | ||
hljs.highlightBlock(block); | ||
} | ||
function handle(block) { | ||
addLangData(block) | ||
addBadge(block) | ||
hljs.highlightBlock(block) | ||
} | ||
|
||
for (var i = 0; i < els.length; i++) { | ||
var el = els[i]; | ||
handle(el); | ||
} | ||
}); | ||
for (var i = 0; i < els.length; i++) { | ||
var el = els[i] | ||
handle(el) | ||
} | ||
}) | ||
</script> | ||
|
||
<style> | ||
/* code language badge */ | ||
pre.badge::before { | ||
content: attr(data-lang); | ||
color: {{badge_color}}; | ||
background-color: {{badge_background_color}}; | ||
padding: 0 .5em; | ||
border-radius: 0 2px; | ||
text-transform: {{badge_text_transform}}; | ||
text-align: center; | ||
min-width: 32px; | ||
display: inline-block; | ||
position: absolute; | ||
right: 0; | ||
} | ||
/* code language badge */ | ||
pre.badge::before { | ||
content: attr(data-lang); | ||
color: {{badge_color}}; | ||
background-color: {{badge_background_color}}; | ||
padding: 0 .5em; | ||
border-radius: 0 2px; | ||
text-transform: {{badge_text_transform}}; | ||
text-align: center; | ||
min-width: 32px; | ||
display: inline-block; | ||
position: absolute; | ||
right: 0; | ||
} | ||
|
||
/* fix wrong badge display for firefox browser */ | ||
code > table pre::before { | ||
display: none; | ||
} | ||
/* fix wrong badge display for firefox browser */ | ||
code > table pre::before { | ||
display: none; | ||
} | ||
</style> |
Oops, something went wrong.