mirror of
https://github.com/netz39/www.netz39.de.git
synced 2025-01-31 17:43:19 +01:00
fix: remove sample posts that were included
This commit is contained in:
parent
383db3250f
commit
353fd8eebf
11 changed files with 0 additions and 858 deletions
|
@ -1,12 +0,0 @@
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: >
|
|
||||||
Blogging with title
|
|
||||||
tags: [Test, Image]
|
|
||||||
---
|
|
||||||
|
|
||||||
# I am a BIG title
|
|
||||||
|
|
||||||
This is a very tiny tiny post with less than 250 letters.
|
|
||||||
|
|
||||||
|
|
|
@ -1,100 +0,0 @@
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: "Markup: Syntax Highlighting"
|
|
||||||
author: mmistakes
|
|
||||||
tags: [Highlight, Markdown]
|
|
||||||
categories: Syntax
|
|
||||||
---
|
|
||||||
|
|
||||||
Syntax highlighting[^1] is a feature that displays source code.
|
|
||||||
This feature facilitates writing in a structured language such as a programming language or a markup language as it makes import things visually distinct.
|
|
||||||
|
|
||||||
|
|
||||||
### GFM Code Blocks
|
|
||||||
|
|
||||||
GitHub Flavored Markdown [fenced code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) are supported. To modify styling and highlight colors edit `/_sass/syntax.scss`.
|
|
||||||
|
|
||||||
```css
|
|
||||||
#container {
|
|
||||||
float: left;
|
|
||||||
margin: 0 -240px 0 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
{% highlight scss linenos %}
|
|
||||||
.highlight {
|
|
||||||
margin: 0;
|
|
||||||
padding: 1em;
|
|
||||||
font-family: $monospace;
|
|
||||||
font-size: $type-size-7;
|
|
||||||
line-height: 1.8;
|
|
||||||
}
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
```html
|
|
||||||
{% raw %}<nav class="pagination" role="navigation">
|
|
||||||
{% if page.previous %}
|
|
||||||
<a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
|
|
||||||
{% endif %}
|
|
||||||
{% if page.next %}
|
|
||||||
<a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
|
|
||||||
{% endif %}
|
|
||||||
</nav><!-- /.pagination -->{% endraw %}
|
|
||||||
```
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
module Jekyll
|
|
||||||
class TagIndex < Page
|
|
||||||
def initialize(site, base, dir, tag)
|
|
||||||
@site = site
|
|
||||||
@base = base
|
|
||||||
@dir = dir
|
|
||||||
@name = 'index.html'
|
|
||||||
self.process(@name)
|
|
||||||
self.read_yaml(File.join(base, '_layouts'), 'tag_index.html')
|
|
||||||
self.data['tag'] = tag
|
|
||||||
tag_title_prefix = site.config['tag_title_prefix'] || 'Tagged: '
|
|
||||||
tag_title_suffix = site.config['tag_title_suffix'] || '–'
|
|
||||||
self.data['title'] = "#{tag_title_prefix}#{tag}"
|
|
||||||
self.data['description'] = "An archive of posts tagged #{tag}."
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
### Code Blocks in Lists
|
|
||||||
|
|
||||||
Indentation matters. Be sure the indent of the code block aligns with the first non-space character after the list item marker (e.g., `1.`). Usually this will mean indenting 3 spaces instead of 4.
|
|
||||||
|
|
||||||
1. Do step 1.
|
|
||||||
2. Now do this:
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
def print_hi(name)
|
|
||||||
puts "Hi, #{name}"
|
|
||||||
end
|
|
||||||
print_hi('Tom')
|
|
||||||
#=> prints 'Hi, Tom' to STDOUT.
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Now you can do this.
|
|
||||||
|
|
||||||
### GitHub Gist Embed
|
|
||||||
|
|
||||||
An example of a Gist embed below:
|
|
||||||
|
|
||||||
<script defer src="https://gist.github.com/sylhare/dad7ed1ef3d13614c77c4ebadf8a11c3.js"></script>
|
|
||||||
|
|
||||||
Here is how it looks like:
|
|
||||||
|
|
||||||
{% highlight html %}
|
|
||||||
{% raw %}
|
|
||||||
<script src="https://gist.github.com/sylhare/dad7ed1ef3d13614c77c4ebadf8a11c3.js">
|
|
||||||
</script>
|
|
||||||
{% endraw %}
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
[^1]: {% include citation.html key="highlight" %}
|
|
|
@ -1,41 +0,0 @@
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: The Real Lorem Ipsum
|
|
||||||
tags: [Image, Color]
|
|
||||||
color: turquoise
|
|
||||||
excerpt_separator: <!--more-->
|
|
||||||
categories: Demo
|
|
||||||
---
|
|
||||||
|
|
||||||
## Lorem Ipsum
|
|
||||||
|
|
||||||
from _"de Finibus Bonorum et Malorum"_ written by Cicero in 45 BC.
|
|
||||||
<!--more-->
|
|
||||||
Find out more on [lipsum.com](https://www.lipsum.com/). And if you like colors, check out the [http color trends](https://www.w3schools.com/colors/colors_trends.asp) from w3schools.
|
|
||||||
|
|
||||||
### The standard Lorem Ipsum passage (since 1500s)
|
|
||||||
|
|
||||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
|
||||||
|
|
||||||
### Section 1.10.32
|
|
||||||
|
|
||||||
#### Latin
|
|
||||||
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
|
|
||||||
|
|
||||||
|
|
||||||
#### Translation by H. Rackham (1914)
|
|
||||||
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?"
|
|
||||||
|
|
||||||
### Section 1.10.33
|
|
||||||
|
|
||||||
#### Latin
|
|
||||||
|
|
||||||
"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat."
|
|
||||||
|
|
||||||
|
|
||||||
#### Translation by H. Rackham (1914)
|
|
||||||
|
|
||||||
"On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: What's your title
|
|
||||||
hide_title: true
|
|
||||||
feature-img: assets/img/feature-img/story.jpeg
|
|
||||||
author: mhagnumdw
|
|
||||||
tags: [Test, Image]
|
|
||||||
---
|
|
||||||
|
|
||||||
This is an example of a post which includes a feature image that has a
|
|
||||||
text, where you don't want to redisplay the title.
|
|
||||||
Mind your image size in order for the text to be displayed where you want it to.
|
|
||||||
The only limit is your imagination.
|
|
||||||
|
|
||||||
Here is how the yaml looks inside the post:
|
|
||||||
|
|
||||||
```yml
|
|
||||||
title: What's your title
|
|
||||||
hide_title: true
|
|
||||||
feature-img: assets/img/feature-img/story.jpeg
|
|
||||||
author: mhagnumdw
|
|
||||||
tags: [Test, Lorem]
|
|
||||||
```
|
|
||||||
|
|
||||||
You may wonder, why is there a title when you are not actually displaying it. <br>
|
|
||||||
Well that's due to some jekyll limitation:
|
|
||||||
|
|
||||||
> You **can't** set the **title** to the **empty string**
|
|
||||||
|
|
||||||
The title is used elsewhere than inside the post, for example in the blog page that list this post.
|
|
||||||
An empty title would break those pages and possibly prevents jekyll to render your blog.
|
|
|
@ -1,104 +0,0 @@
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: Markdown and HTML
|
|
||||||
tags: [Katex, Markdown]
|
|
||||||
author: rohanchandra
|
|
||||||
categories: Syntax
|
|
||||||
---
|
|
||||||
|
|
||||||
Jekyll supports the use of [Markdown](http://daringfireball.net/projects/markdown/syntax) with inline HTML tags which makes it easier to quickly write posts with Jekyll, without having to worry too much about text formatting. A sample of the formatting follows.
|
|
||||||
|
|
||||||
## Table of content
|
|
||||||
|
|
||||||
<!-- To be placed at the beginning of the post, it is where the table of content will be generated -->
|
|
||||||
* TOC
|
|
||||||
{:toc}
|
|
||||||
*
|
|
||||||
You need to put this at the beginning of the page where you want the table of content to be displayed
|
|
||||||
|
|
||||||
```html
|
|
||||||
* TOC
|
|
||||||
{:toc}
|
|
||||||
```
|
|
||||||
|
|
||||||
It will then render the markdown and html titles (lines that begins with `#` or using the `<h1></h1>` tages)
|
|
||||||
|
|
||||||
|
|
||||||
## Title
|
|
||||||
|
|
||||||
### Subtitle
|
|
||||||
|
|
||||||
Tables have also been extended from Markdown:
|
|
||||||
|
|
||||||
| First Header | Second Header |
|
|
||||||
|--------------|---------------|
|
|
||||||
| Content Cell | Content Cell |
|
|
||||||
| Content Cell | Content Cell |
|
|
||||||
|
|
||||||
Here's an example of an image, which is included using Markdown:
|
|
||||||
|
|
||||||
![Image of a glass on a book]({{ "/assets/img/pexels/book-glass.jpeg" | relative_url }})
|
|
||||||
|
|
||||||
This is another example of list:
|
|
||||||
|
|
||||||
- list of things
|
|
||||||
1. Sub list
|
|
||||||
2. of Other things
|
|
||||||
3. with numbers
|
|
||||||
- And many more
|
|
||||||
- Sub sub list
|
|
||||||
- can go on ...
|
|
||||||
- and on ...
|
|
||||||
- and on !
|
|
||||||
- That's it.
|
|
||||||
|
|
||||||
### Other subtitle
|
|
||||||
|
|
||||||
Highlighting for code in Jekyll is done using Base16 or Rouge. This theme makes use of Rouge by default.
|
|
||||||
|
|
||||||
{% highlight js %}
|
|
||||||
// count to ten
|
|
||||||
for (var i = 1; i <= 10; i++) {
|
|
||||||
console.log(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
// count to twenty
|
|
||||||
var j = 0;
|
|
||||||
while (j < 20) {
|
|
||||||
j++;
|
|
||||||
console.log(j);
|
|
||||||
}
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
### Math
|
|
||||||
|
|
||||||
Type on Strap uses KaTeX to display maths. Equations such as $$S_n = a \times \frac{1-r^n}{1-r}$$ can be displayed inline.
|
|
||||||
|
|
||||||
Alternatively, they can be shown on a new line:
|
|
||||||
|
|
||||||
$$ f(x) = \int \frac{2x^2+4x+6}{x-2} $$
|
|
||||||
|
|
||||||
And in your markdown file:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
$$ f(x) = \int \frac{2x^2+4x+6}{x-2} $$
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Expandable content
|
|
||||||
|
|
||||||
Click on the expandable content to display it:
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Click here!</summary>
|
|
||||||
Now you see me
|
|
||||||
</details>
|
|
||||||
|
|
||||||
And in your markdown file:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<details>
|
|
||||||
<summary>Click here!</summary>
|
|
||||||
Now you see me
|
|
||||||
</details>
|
|
||||||
```
|
|
|
@ -1,116 +0,0 @@
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: "Bootstrap"
|
|
||||||
bootstrap: true
|
|
||||||
tags: [Test]
|
|
||||||
categories: Demo
|
|
||||||
---
|
|
||||||
|
|
||||||
This theme is compatible with Bootstrap if you choose to use it in your pages or posts.
|
|
||||||
Here is a little demo with a code snippet, look at the source to see how the HTML and markdown get tangled.
|
|
||||||
|
|
||||||
## Use bootstrap
|
|
||||||
|
|
||||||
Add some custom Bootstrap in the custom layout!
|
|
||||||
|
|
||||||
<img src="https://startbootstrap.com/assets/img/sb-logo.svg" alt="startbootstrap" width="500">
|
|
||||||
|
|
||||||
### Snippet example
|
|
||||||
|
|
||||||
If you are new to Bootstrap you can always check the [documentation](https://getbootstrap.com/docs/4.1/getting-started/introduction/).<br>
|
|
||||||
Here is an example from [startbootstrap.com](https://startbootstrap.com/snippets/portfolio-two-column).
|
|
||||||
|
|
||||||
<!-- Page Content -->
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-6 mb-4">
|
|
||||||
<div class="card h-100">
|
|
||||||
<a href="#"><img class="card-img-top" src="http://placehold.it/700x400" alt=""></a>
|
|
||||||
<div class="card-body">
|
|
||||||
<h4 class="card-title">
|
|
||||||
<a href="#">Project One</a>
|
|
||||||
</h4>
|
|
||||||
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-6 mb-4">
|
|
||||||
<div class="card h-100">
|
|
||||||
<a href="#"><img class="card-img-top" src="http://placehold.it/700x400" alt=""></a>
|
|
||||||
<div class="card-body">
|
|
||||||
<h4 class="card-title">
|
|
||||||
<a href="#">Project Two</a>
|
|
||||||
</h4>
|
|
||||||
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit aliquam aperiam nulla perferendis dolor nobis numquam, rem expedita, aliquid optio, alias illum eaque. Non magni, voluptates quae, necessitatibus unde temporibus.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-6 mb-4">
|
|
||||||
<div class="card h-100">
|
|
||||||
<a href="#"><img class="card-img-top" src="http://placehold.it/700x400" alt=""></a>
|
|
||||||
<div class="card-body">
|
|
||||||
<h4 class="card-title">
|
|
||||||
<a href="#">Project Three</a>
|
|
||||||
</h4>
|
|
||||||
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-6 mb-4">
|
|
||||||
<div class="card h-100">
|
|
||||||
<a href="#"><img class="card-img-top" src="http://placehold.it/700x400" alt=""></a>
|
|
||||||
<div class="card-body">
|
|
||||||
<h4 class="card-title">
|
|
||||||
<a href="#">Project Four</a>
|
|
||||||
</h4>
|
|
||||||
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit aliquam aperiam nulla perferendis dolor nobis numquam, rem expedita, aliquid optio, alias illum eaque. Non magni, voluptates quae, necessitatibus unde temporibus.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-6 mb-4">
|
|
||||||
<div class="card h-100">
|
|
||||||
<a href="#"><img class="card-img-top" src="http://placehold.it/700x400" alt=""></a>
|
|
||||||
<div class="card-body">
|
|
||||||
<h4 class="card-title">
|
|
||||||
<a href="#">Project Five</a>
|
|
||||||
</h4>
|
|
||||||
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-6 mb-4">
|
|
||||||
<div class="card h-100">
|
|
||||||
<a href="#"><img class="card-img-top" src="http://placehold.it/700x400" alt=""></a>
|
|
||||||
<div class="card-body">
|
|
||||||
<h4 class="card-title">
|
|
||||||
<a href="#">Project Six</a>
|
|
||||||
</h4>
|
|
||||||
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit aliquam aperiam nulla perferendis dolor nobis numquam, rem expedita, aliquid optio, alias illum eaque. Non magni, voluptates quae, necessitatibus unde temporibus.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- /.row -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- /.container -->
|
|
||||||
|
|
||||||
### Mix it with Markdown
|
|
||||||
|
|
||||||
All the above was custom HTML with Bootstrap.
|
|
||||||
You can also mix it up with some markdown.
|
|
||||||
|
|
||||||
You can use the bootstrap's build in javascript API to control your event.
|
|
||||||
Here is a code snippet for the [documentation](https://getbootstrap.com/docs/4.0/getting-started/javascript/):
|
|
||||||
|
|
||||||
```js
|
|
||||||
$('#myModal').on('show.bs.modal', function (e) {
|
|
||||||
if (!data) return e.preventDefault() // stops modal from being shown
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
That's just for demo though, you would need to properly integrate your javascript in your page.
|
|
||||||
Usually you would put any custom javascript script in the _assets_ folder under js and reference it in your page from there.
|
|
||||||
|
|
||||||
So try it out using the `bootstrap: true` flag! 😉
|
|
|
@ -1,60 +0,0 @@
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: Feature images
|
|
||||||
feature-img: "assets/img/feature-img/desk-messy.jpeg"
|
|
||||||
thumbnail: "assets/img/thumbnails/feature-img/desk-messy.jpeg"
|
|
||||||
tags: [Test, Image]
|
|
||||||
categories: Example
|
|
||||||
---
|
|
||||||
|
|
||||||
Hopefully you will find enough information about how to set images in your blog here.
|
|
||||||
This is an example of a post which includes a feature image specified in the front matter of the post.
|
|
||||||
The feature image spans the full-width of the page, and is shown with the title on permalink pages:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
feature-img: "assets/img/feature-img/desk-messy.jpeg"
|
|
||||||
thumbnail: "assets/img/thumbnails/feature-img/desk-messy.jpeg"
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also use a thumbnail, a smaller version of the same image to improve loading of the page.
|
|
||||||
The thumbnail will also be used when you share your article on other platform (linkedin, whatsapp, facebook, ...).
|
|
||||||
|
|
||||||
> - And now it is working
|
|
||||||
|
|
||||||
You can also add images aligned in your post using the `aligner` include.
|
|
||||||
Make sure to separate all of the image path from in a string separated with `,`.
|
|
||||||
It by default look into `assets/img/` so give the path from there, example:
|
|
||||||
|
|
||||||
{% highlight ruby %}
|
|
||||||
{% raw %}
|
|
||||||
{% include aligner.html images="pexels/book-glass.jpeg,triangle.png" %}
|
|
||||||
{% endraw %}
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
{% include aligner.html images="pexels/book-glass.jpeg,feature-img/desk-messy.jpeg" %}
|
|
||||||
|
|
||||||
|
|
||||||
Here you have two images side by side, but you can set more and set the amount per columns
|
|
||||||
(by specifying the number of columns or let it be automatic using `"auto"`):
|
|
||||||
|
|
||||||
{% highlight ruby %}
|
|
||||||
{% raw %}
|
|
||||||
{% include aligner.html images="portfolio/cabin.png,portfolio/cake.png,portfolio/circus.png" column=3 %}
|
|
||||||
{% endraw %}
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
{% include aligner.html images="portfolio/cabin.png,portfolio/cake.png,portfolio/circus.png" column=3 %}
|
|
||||||
|
|
||||||
it also works with only one images, it is made to display it smaller than normally.
|
|
||||||
However you can just use the Markdown way of doing it to get the image normal sized and centered.
|
|
||||||
|
|
||||||
{% highlight ruby %}
|
|
||||||
{% raw %}
|
|
||||||
# Markdown way (bigger)
|
|
||||||
![Travel]({{ "/assets/img/pexels/computer.jpeg" | relative_url}})
|
|
||||||
# Aligner with only One (50% of width)
|
|
||||||
{% include aligner.html images="pexels/computer.jpeg" %}
|
|
||||||
{% endraw %}
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
{% include aligner.html images="pexels/computer.jpeg" %}
|
|
|
@ -1,45 +0,0 @@
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: Color Post
|
|
||||||
tags: [Test, Color]
|
|
||||||
color: brown
|
|
||||||
author: sylhare
|
|
||||||
categories: Example
|
|
||||||
excerpt_separator: <!--more-->
|
|
||||||
---
|
|
||||||
|
|
||||||
# What a colorful post!
|
|
||||||
|
|
||||||
This is an idea that came from [xukimseven/HardCandy-Jekyll](https://github.com/xukimseven/HardCandy-Jekyll)
|
|
||||||
looking at this cheerful and colorful theme, I wanted to enable something similar for Type-on-Strap.
|
|
||||||
|
|
||||||
You can go fork and star _HardCandy-Jekyll_ too! 😉
|
|
||||||
|
|
||||||
<!--more-->
|
|
||||||
|
|
||||||
## How does it work?
|
|
||||||
|
|
||||||
Basically you need to add just one thing, the color:
|
|
||||||
|
|
||||||
```yml
|
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: Color Post
|
|
||||||
color: brown
|
|
||||||
---
|
|
||||||
```
|
|
||||||
|
|
||||||
It can either be a html color like `brown` (which look like red to me). Or with the rgb:
|
|
||||||
|
|
||||||
```yml
|
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: Color Post
|
|
||||||
color: rgb(165,42,42)
|
|
||||||
---
|
|
||||||
```
|
|
||||||
|
|
||||||
The background used is `lineart.png` from [xukimseven](https://github.com/xukimseven) you can edit it in the config file.
|
|
||||||
If you want another one, put it in `/assets/img` as well.
|
|
||||||
|
|
||||||
> ⚠️ It's a bit hacking the css in the `post.html`
|
|
|
@ -1,34 +0,0 @@
|
||||||
---
|
|
||||||
layout: post
|
|
||||||
title: Sample post
|
|
||||||
tags: [A Tag, Katex]
|
|
||||||
excerpt_separator: <!--more-->
|
|
||||||
---
|
|
||||||
|
|
||||||
Consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor.
|
|
||||||
Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur.
|
|
||||||
<!--more-->
|
|
||||||
Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem.
|
|
||||||
|
|
||||||
* Consectetur adipiscing elit
|
|
||||||
* Donec a diam lectus
|
|
||||||
* Sed sit amet ipsum mauris
|
|
||||||
|
|
||||||
Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.
|
|
||||||
|
|
||||||
Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula *semper consectetur sagittis*, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum.
|
|
||||||
|
|
||||||
{% include aligner.html images="pexels/travel.jpeg" column=1 %}
|
|
||||||
|
|
||||||
Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.
|
|
||||||
|
|
||||||
> Suspendisse lectus leo, consectetur in tempor sit amet, placerat quis neque
|
|
||||||
|
|
||||||
Etiam luctus porttitor lorem, sed suscipit est rutrum non. Curabitur lobortis nisl a enim congue semper. Aenean commodo ultrices imperdiet. Vestibulum ut justo vel sapien venenatis tincidunt.
|
|
||||||
|
|
||||||
$$ \Theta \ne \Gamma $$
|
|
||||||
|
|
||||||
Phasellus eget dolor sit amet ipsum dapibus condimentum vitae quis lectus. Aliquam ut massa in turpis dapibus convallis. Praesent elit lacus, vestibulum at malesuada et, ornare et est. Ut augue nunc, sodales ut euismod non, adipiscing vitae orci[^1]. Mauris ut placerat justo. Mauris in ultricies enim. Quisque nec est eleifend nulla ultrices egestas quis ut quam. Donec sollicitudin lectus a mauris pulvinar id aliquam urna cursus. Cras quis ligula sem, vel elementum mi. Phasellus non ullamcorper urna.
|
|
||||||
|
|
||||||
[^1]:
|
|
||||||
{% include citation.html key="ref1" %}
|
|
|
@ -1,216 +0,0 @@
|
||||||
---
|
|
||||||
author: dkdent
|
|
||||||
layout: post
|
|
||||||
title: Tech Stuff example
|
|
||||||
color: rgb(250, 50, 50)
|
|
||||||
feature-img: "assets/img/feature-img/circuit.jpeg"
|
|
||||||
thumbnail: "assets/img/thumbnails/feature-img/circuit.jpeg"
|
|
||||||
tags: [Mermaid, Highlight, Markdown]
|
|
||||||
---
|
|
||||||
|
|
||||||
Let's demo some code snippet, with some mermaid diagrams.
|
|
||||||
Because if you put some code in your blog, you would at least make it:
|
|
||||||
1. Searchable
|
|
||||||
2. Good-looking
|
|
||||||
|
|
||||||
## Search on code
|
|
||||||
|
|
||||||
Search should be working even for complicated escape symbols.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sed -i 's/\"hostname\"\:.*$/\"hostname\"\: \"'$IPADDR'\"\,/g' open-falcon/agent/config/cfg.json
|
|
||||||
```
|
|
||||||
|
|
||||||
Or try searching for partial of a command, like this article should be returned when looking for "find grep"
|
|
||||||
|
|
||||||
```bash
|
|
||||||
find /etc -type f -exec cat '{}' \; | tr -c '.[:digit:]' '\n' | grep '^[^.][^.]*\.[^.][^.]*\.[^.][^.]*\.[^.][^.]*$'
|
|
||||||
```
|
|
||||||
|
|
||||||
## Code highlighting examples
|
|
||||||
|
|
||||||
Because you might put code in your blog post, and you want to make sure it will look good in here. Plus that the search
|
|
||||||
function will still be working!
|
|
||||||
|
|
||||||
### XML
|
|
||||||
|
|
||||||
Example from [W3C]
|
|
||||||
```xml
|
|
||||||
<part number="1976">
|
|
||||||
<name>Windscreen Wiper</name>
|
|
||||||
<description>The Windscreen wiper
|
|
||||||
automatically removes rain
|
|
||||||
from your windscreen, if it
|
|
||||||
should happen to splash there.
|
|
||||||
It has a rubber <ref part="1977">blade</ref>
|
|
||||||
which can be ordered separately
|
|
||||||
if you need to replace it.
|
|
||||||
</description>
|
|
||||||
</part>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Java
|
|
||||||
|
|
||||||
java example
|
|
||||||
|
|
||||||
```java
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
@Example
|
|
||||||
public class Demo {
|
|
||||||
private static final String CONSTANT = "String";
|
|
||||||
private Object o;
|
|
||||||
/**
|
|
||||||
* Creates a new demo.
|
|
||||||
* @param o The object to demonstrate.
|
|
||||||
*/
|
|
||||||
public Demo(Object o) {
|
|
||||||
this.o = o !== null ? o : new Object();
|
|
||||||
String s = CONSTANT + "Other example of text";
|
|
||||||
int i = 123 - 33 % 11;
|
|
||||||
}
|
|
||||||
public static void main(String[] args) {
|
|
||||||
Demo demo = new Demo();
|
|
||||||
System.out.println(demo.o.toString())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Javascript
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
/**
|
|
||||||
* Does a thing
|
|
||||||
*/
|
|
||||||
function helloWorld(param1, param2) {
|
|
||||||
const example = `hello ${param1}`
|
|
||||||
var something = {
|
|
||||||
key: "value",
|
|
||||||
number: 1
|
|
||||||
};
|
|
||||||
|
|
||||||
// Do something
|
|
||||||
if (2.0 % 2 == something) {
|
|
||||||
console.log('Hello, world!');
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO comment
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### JSON
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"animals": {
|
|
||||||
"tiger": {
|
|
||||||
"name": "tiger",
|
|
||||||
"images": ["🐯", "🐅", "⻁"]
|
|
||||||
},
|
|
||||||
"turtle": {
|
|
||||||
"age": 126,
|
|
||||||
"image": "🐢"
|
|
||||||
},
|
|
||||||
"unicorn": {
|
|
||||||
"doesExist": true,
|
|
||||||
"image": "🦄"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Python
|
|
||||||
|
|
||||||
```python
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
def some_function(param_one="", param_two=0):
|
|
||||||
r'''A docstring'''
|
|
||||||
if param_one > param_two: # interesting
|
|
||||||
print("Greater")
|
|
||||||
return (param_two - param_one + 1 + 0b10) or None
|
|
||||||
|
|
||||||
|
|
||||||
class SomeClass:
|
|
||||||
""" dunno what I am doing """
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
pass
|
|
||||||
```
|
|
||||||
|
|
||||||
### YAML
|
|
||||||
|
|
||||||
You can also render some yaml, like this `_config.yml`:
|
|
||||||
|
|
||||||
```yml
|
|
||||||
|
|
||||||
# Welcome to Jekyll!
|
|
||||||
#
|
|
||||||
# This config file is meant for settings that affect your whole blog, values
|
|
||||||
# which you are expected to set up once and rarely edit after that. If you find
|
|
||||||
# yourself editing this file very often, consider using Jekyll's data files
|
|
||||||
# feature for the data you need to update frequently.
|
|
||||||
#
|
|
||||||
# This file, "_config.yml" is *NOT* reloaded automatically when you use
|
|
||||||
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
|
|
||||||
|
|
||||||
# Site settings
|
|
||||||
# These are used to personalize your new site. If you look in the HTML files,
|
|
||||||
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
|
|
||||||
# You can create any custom variable you would like, and they will be accessible
|
|
||||||
# in the templates via {{ site.myvariable }}.
|
|
||||||
|
|
||||||
# SITE CONFIGURATION
|
|
||||||
baseurl: "/Type-on-Strap"
|
|
||||||
url: "https://sylhare.github.io"
|
|
||||||
|
|
||||||
# THEME-SPECIFIC CONFIGURATION
|
|
||||||
title: Type on Strap # site's title
|
|
||||||
description: "A website with blog posts and pages" # used by search engines
|
|
||||||
avatar: assets/img/triangle.png # Empty for no avatar in navbar
|
|
||||||
favicon: assets/favicon.ico # Icon displayed in the tab
|
|
||||||
|
|
||||||
remote_theme: sylhare/Type-on-Strap # If using as a remote_theme in github
|
|
||||||
```
|
|
||||||
|
|
||||||
### Mermaid
|
|
||||||
|
|
||||||
Diagrams with mermaid, make sure it is enabled in the `_config.yml`.
|
|
||||||
Here is a simple example:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<!-- To generate a diagram -->
|
|
||||||
<div class="mermaid">
|
|
||||||
sequenceDiagram
|
|
||||||
Alice->>John: Hello John, how are you?
|
|
||||||
John-->>Alice: Great!
|
|
||||||
</div>
|
|
||||||
```
|
|
||||||
|
|
||||||
That will be rendered into this:
|
|
||||||
|
|
||||||
{% include aligner.html images="mermaid-example.png" column=1 %}
|
|
||||||
|
|
||||||
You can also go with more complex features and diagrams from the [documentation](https://mermaid-js.github.io/mermaid/):
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>More complex diagram</summary>
|
|
||||||
<div class="mermaid">
|
|
||||||
sequenceDiagram
|
|
||||||
participant Alice
|
|
||||||
participant Bob
|
|
||||||
Alice->>John: Hello John, how are you?
|
|
||||||
loop Healthcheck
|
|
||||||
John->>John: Fight against hypochondria
|
|
||||||
end
|
|
||||||
Note right of John: Rational thoughts prevail!
|
|
||||||
John-->>Alice: Great!
|
|
||||||
John->>Bob: How about you?
|
|
||||||
Bob-->>John: Jolly good!
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
[W3C]: https://www.w3.org/standards/xml/core
|
|
|
@ -1,99 +0,0 @@
|
||||||
---
|
|
||||||
author: max2
|
|
||||||
layout: post
|
|
||||||
title: Dark Mode
|
|
||||||
tags: [Katex, Mermaid, Markdown]
|
|
||||||
categories: Demo
|
|
||||||
---
|
|
||||||
|
|
||||||
More colors with less light. Click the **half-moon** most top-right button to turn the lights ON/OFF.
|
|
||||||
Here is a bit of everything, so you can check how the theme look, have fun! 👌
|
|
||||||
|
|
||||||
|
|
||||||
# Headers
|
|
||||||
## Level 2
|
|
||||||
### Level 3
|
|
||||||
#### Level 4
|
|
||||||
##### Level 5
|
|
||||||
###### Level 6
|
|
||||||
|
|
||||||
# [Headers with links](http://localhost)
|
|
||||||
## [Level 2](http://localhost)
|
|
||||||
### [Level 3](http://localhost)
|
|
||||||
#### [Level 4](http://localhost)
|
|
||||||
##### [Level 5](http://localhost)
|
|
||||||
###### [Level 6](http://localhost)
|
|
||||||
|
|
||||||
## Code highlight
|
|
||||||
Mode specific code highlighting themes. [Kramdown](https://kramdown.gettalong.org/) which is responsible for the color highlighting may be more limited than your IDE.
|
|
||||||
|
|
||||||
```python
|
|
||||||
#!/usr/bin/env python
|
|
||||||
"""
|
|
||||||
Test file for syntax
|
|
||||||
"""
|
|
||||||
# TODO: Use dark mode
|
|
||||||
from sys import os
|
|
||||||
|
|
||||||
def foo(bar):
|
|
||||||
try:
|
|
||||||
print(bar)
|
|
||||||
except NameError:
|
|
||||||
print("Variable bar is not defined")
|
|
||||||
|
|
||||||
|
|
||||||
class Bar(object):
|
|
||||||
def __init__(self):
|
|
||||||
foo(1)
|
|
||||||
self.octal = '\04'
|
|
||||||
self.text = """Example \t\n"""
|
|
||||||
|
|
||||||
def __exit__(self, *args):
|
|
||||||
print('exit\u1111\xFF')
|
|
||||||
pass
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def example():
|
|
||||||
assert (1.0 and 2L) or True
|
|
||||||
return { "example": [(1,), (r'raw', u'unicode')]}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Tables
|
|
||||||
|
|
||||||
| hex | dec | oct |
|
|
||||||
| - | - | - |
|
|
||||||
| 0 | 0 | 0 |
|
|
||||||
| 5 | 5 | 5 |
|
|
||||||
| A | 10 | 12 |
|
|
||||||
| F | 16 | 20 |
|
|
||||||
| F5 | 21 | 25 |
|
|
||||||
|
|
||||||
## KaTeX
|
|
||||||
|
|
||||||
Some KaTeX diagrams to check in dark mode:
|
|
||||||
|
|
||||||
$$
|
|
||||||
\begin{CD}
|
|
||||||
A @>a>> B \\
|
|
||||||
@VbVV @AAcA \\
|
|
||||||
C @= D
|
|
||||||
\end{CD}
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$\utilde{AB}$$
|
|
||||||
|
|
||||||
## Mermaid
|
|
||||||
|
|
||||||
<div class="mermaid">
|
|
||||||
flowchart TB
|
|
||||||
c1-->a2
|
|
||||||
subgraph one
|
|
||||||
a1-->a2
|
|
||||||
end
|
|
||||||
subgraph two
|
|
||||||
b1-->b2
|
|
||||||
end
|
|
||||||
subgraph three
|
|
||||||
c1-->c2
|
|
||||||
end
|
|
||||||
</div>
|
|
Loading…
Add table
Reference in a new issue