Skip to content

Commit

Permalink
update readme and demo templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffatoptics committed May 2, 2022
1 parent a9ae461 commit c1e0c84
Show file tree
Hide file tree
Showing 11 changed files with 209 additions and 250 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
layout: page
permalink: readme.html
title: support math and mermaid diagram in jekyll/minima theme
title: Support math and mermaid in jekyll/minima theme
---

Demo link: [https:// jeffatoptics.github.io/jeff-minima/](https://jeffatoptics.github.io/jeff-minima/)
Demo link: [https://jeffatoptics.github.io/jeff-minima/](https://jeffatoptics.github.io/jeff-minima/)

## Purpose

Expand All @@ -23,6 +23,8 @@ Enhance [jekyll/minima](https://github.com/jekyll/minima) template with the supp

1. Add a [category page](./category.md)



## Minor changes

They are related to the theme layout and color:
Expand All @@ -33,6 +35,7 @@ They are related to the theme layout and color:

1. add an emoji favicon 🐬 in customer-head.html. you can change it to any emoji or remove the line `<link rel="icon"..`

1. copy the [sandervoerman/minima](https://github.com/sandervoerman/minima/blob/prefers-color-scheme/_sass/minima/skins/auto.scss) for auto theme support

## Usage

Expand Down
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ show_excerpts: true # set to true to show excerpts on the homepage
# refer to https://shopify.github.io/liquid/filters/date/ if you want to customize this
minima:
date_format: "%b %-d, %Y"
skin: auto
# skin: classic, dark, Solarized-dark, Solarized
skin: dark
# skin: classic, dark, solarized-dark, solarized, auto
# generate social links in footer
social_links:
#twitter: jekyllrb
Expand Down
21 changes: 0 additions & 21 deletions _posts/2002-04-21-test-date.md

This file was deleted.

27 changes: 27 additions & 0 deletions _posts/2022-03-26-markdown-content-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,33 @@ Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin con
</html>
```

```bash

ls -l
pwd
ping 127.0.0.1 -s 300

```

```python

import re
ts=r"Id: *(\d+) \n"
tspat=re.compile(ts)
reqid=[]
flog=open('test.txt','r',encoding='utf-8')
num=0
for flogline in flog:
#print(flogline)
ss=tspat.search(flogline)
if ss:
num=num+1
print(num,"\t",ss.group(1))
reqid.append(ss.group(1))

```



In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.

Expand Down
33 changes: 0 additions & 33 deletions _posts/2022-03-27-image-link-demo.md

This file was deleted.

36 changes: 36 additions & 0 deletions _posts/2022-03-27-image-link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: post
categories: link syntax
title: demonstrate links to image file
---

1. `{% raw %}![link demo]({{ site.baseurl }}{% link assets/images/dolphin.jpg %}){% endraw %}`

mixed with jekyll liquid syntax.

![link demo]({{ site.baseurl }}{% link assets/images/dolphin.jpg %})

1. `![](../assets/images/dolphin.jpg)`

markdown syntax. relative reference
![](../assets/images/dolphin.jpg)

1. `![](../assets/images/dolphin.jpg){: width="250"}`

markdown relative link syntax with jekyll liquid for size definition.
![](../assets/images/dolphin.jpg){: width="250"}

1. {% raw %} <img src="{{ site.baseurl }}{% link assets/images/dolphin.jpg %}" width=225/>{% endraw %}

html image syntax with jekyll liquid variables.
absolute link reference
<img src="{{ site.baseurl }}{% link assets/images/dolphin.jpg %}" width=225/>
<img src="{{ site.baseurl }}{% link assets/images/dolphin.jpg %}" width=225/>
<img src="{{ site.baseurl }}{% link assets/images/dolphin.jpg %}" width=225/>
<img src="{{ site.baseurl }}{% link assets/images/dolphin.jpg %}" width=225/>

[another demo in root folder](../demonstrate-links-in-root-folder.md.md)


> ⚠️ **Do not put the images and files in `_posts` folder.**
> **The relative links to static files (other than markdown file) do not works in github pages!**
117 changes: 0 additions & 117 deletions _posts/2022-04-27-example2 .md

This file was deleted.

64 changes: 51 additions & 13 deletions _posts/2022-04-27-mardown-file-link-in-post-folder.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,75 @@
---
layout: post
title: "link demo in post folder"
title: "demonstrate links to markdown file in post folder"
categories: link syntax
author:
- jeffatoptics
---

Recommend to use the relative link markdown syntax
>📝 Recommend to use the relative link markdown syntax
## Relative link markdown syntax

- [home](../index.md)
- [next](2022-03-27-image-link-demo.md)
- link to the file in root: [home](../index.md)

```
- [home](../index_image.md)
- [next](2002-04-21-test-date.md)
```
```
[home](../index.md)
```
- link to the file in _poster: [next](2022-03-27-image-link.md)
```
[next](2002-04-21-test-date.md)
```
## jeklly link also works
## jekyll link syntax
- [home url]({{ site.url }})
{% raw %}
[home url]({{ site.url }})
{% endraw %}
- [home base url]({{ site.baseurl }})
- [post link demo]({{ site.baseurl }}{% post_url 2022-03-26-markdown-content-styles %})
{% draw %}
[home base url]({{ site.baseurl }})
{% endraw %}
- [post link demo]({{ site.baseurl }}{% post_url 2022-03-26-markdown-content-styles %}): link to file in _posts
{% endraw %}
[post link demo]({{ site.baseurl }}{% post_url 2022-03-26-markdown-content-styles %})
{% endraw %}
- baseurl value:{{ site.baseurl }}
- [link to root file ]({{ site.baseurl }}{% link header1 %}): link to file in root
{% endraw %}
[link to root file ]({{ site.baseurl }}{% link header1 %})
{% endraw %}
## jekyll variable values
- baseurl value: {{ site.baseurl }}
{% endraw %}
baseurl value: {{ site.baseurl }}
{% endraw %}
- url value: {{ site.url }}
- [back](2022-03-26-markdown-content-styles.md)
- [next](./2022-04-27-example2%20.md)
{% endraw %}
url value: {{ site.url }}
{% endraw %}
[image link demo](2022-03-27-image-link.md)
Loading

0 comments on commit c1e0c84

Please sign in to comment.