Skip to content

Commit

Permalink
🔀 Merge pull request #51 from dev
Browse files Browse the repository at this point in the history
Release v2.8.0
  • Loading branch information
chriskyfung authored Jan 16, 2024
2 parents 873a6d5 + 78213ad commit b9ee858
Show file tree
Hide file tree
Showing 24 changed files with 2,611 additions and 2,228 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions .frontmatter/database/taxonomyDb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
10 changes: 7 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
"mervin.markdown-formatter",
"rohgarg.jekyll-post",
"piotrpalarz.vscode-gitignore-generator",
"znck.grammarly",
"sissel.shopify-liquid",
"jack89ita.copy-filename",
"dedsec727.jekyll-run",
"thekalinga.bootstrap4-vscode"
"thekalinga.bootstrap4-vscode",
"kisstkondoros.vscode-gutter-preview",
"tchayen.markdown-links",
"mathiassoeholm.markdown-link-updater",
"redhat.vscode-yaml",
"josee9988.minifyall"
]
}
}
15 changes: 14 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,18 @@
"proxyUri": "http://127.0.0.1:5500/_site"
},
"frontMatter.framework.startCommand": "bundle exec jekyll serve",
"frontMatter.preview.host": "http://127.0.0.1:4000/amp-affiliately-jekyll-theme/"
"frontMatter.preview.host": "http://127.0.0.1:4000/amp-affiliately-jekyll-theme/",
"git-graph.customBranchGlobPatterns": [
{
"name": "All Except `origin/gh-pages`",
"glob": "[!notes]*[!gh-pages]"
},
{
"name": "Remote Except `origin/gh-pages`",
"glob": "remotes/origin/[!gh-pages]*"
}
],
"git-graph.repository.onLoad.showSpecificBranches": [
"--glob=[!notes]*[!gh-pages]"
]
}
126 changes: 65 additions & 61 deletions README.md

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions _config-examples/user-page/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ gem "jekyll", "~> 3.9.0"
group :jekyll_plugins do
gem 'jekyll-archives'
gem 'jekyll-feed'
gem 'jekyll-gist'
gem 'jekyll-gzip'
gem 'jekyll-paginate'
gem 'jekyll-redirect-from'
Expand All @@ -37,4 +36,4 @@ platforms :mingw, :x64_mingw, :mswin, :jruby do
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
2 changes: 1 addition & 1 deletion _includes/css/amp-github-sponsors-embed.min.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
{%- endif -%}
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<script async custom-element="amp-autocomplete" src="https://cdn.ampproject.org/v0/amp-autocomplete-0.1.js"></script>
<script async custom-element="amp-link-rewriter" src="https://cdn.ampproject.org/v0/amp-link-rewriter-0.1.js"></script>

<link rel="icon" href="{{ site.favicon | relative_url }}">
<link rel="preconnect dns-prefetch" href="https://www.googletagmanager.com" crossorigin>
Expand Down
37 changes: 17 additions & 20 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,18 @@

{%- assign sidebar = page.sidebar | default: layout.sidebar | default: "right" -%}
{%- if sidebar == "none" -%}
{%- assign post_class = "no-sidebar" -%}
{%- assign post_class = "no-sidebar" -%}
{%- else -%}
{%- assign post_class = "col-md-8 col-lg-8" -%}
{%- assign sidebar_class = sidebar | append: '-sidebar' -%}
{%- assign post_class = "col-md-8 col-lg-8" -%}
{%- assign sidebar_class = sidebar | append: '-sidebar' -%}
{%- endif -%}

<!-- Begin Article -->

<div class="row">

<!-- Post -->
{%- assign author = site.data.authors[page.author] -%}
{%- unless author -%}
{%- assign author = site.authors[page.author] -%}
{%- endunless -%}
{%- assign author = site.data.authors[page.author] | default: site.authors[page.author] | default: nil -%}

<div id="post" class="{{ post_class }}">
<div class="mainheading">
Expand All @@ -42,17 +39,17 @@ <h1 class="posttitle">{{ page.title }}</h1>

<!-- Post Featured Image -->
{%- if page.image -%}
{%- unless page.image.hide -%}
{%- assign imgext = page.image.path | split: "." | last -%}
{%- assign imgpath = page.image.path | remove: imgext -%}
{%- if imgext == "svg" -%}
<amp-img data-hero class="featured-image {{ page.image.class }}" width="{{ page.image.width | default: 730 }}" height="{{ page.image.height | default: 411 }}" layout="responsive" src="{{ page.image.path | relative_url }}" alt="{{ page.title }}"></amp-img>
{%- else -%}
<amp-img data-hero class="featured-image {{ page.image.class }}" width="{{ page.image.width | default: 730 }}" height="{{ page.image.height | default: 411 }}" layout="responsive" src="{{ imgpath | relative_url }}webp" alt="{{ page.title }}">
<amp-img data-hero fallback class="featured-image {{ page.image.class }}" width="{{ page.image.width | default: 730 }}" height="{{ page.image.height | default: 411 }}" layout="responsive" src="{{ page.image.path | relative_url }}" alt="{{ page.title }}"></amp-img>
</amp-img>
{%- endif -%}
{%- endunless -%}
{%- unless page.image.hide -%}
{%- assign imgext = page.image.path | split: "." | last -%}
{%- assign imgpath = page.image.path | remove: imgext -%}
{%- if imgext == "svg" -%}
<amp-img data-hero class="featured-image {{ page.image.class }}" width="{{ page.image.width | default: 730 }}" height="{{ page.image.height | default: 411 }}" layout="responsive" src="{{ page.image.path | relative_url }}" alt="{{ page.title }}"></amp-img>
{%- else -%}
<amp-img data-hero class="featured-image {{ page.image.class }}" width="{{ page.image.width | default: 730 }}" height="{{ page.image.height | default: 411 }}" layout="responsive" src="{{ imgpath | relative_url }}webp" alt="{{ page.title }}">
<amp-img data-hero fallback class="featured-image {{ page.image.class }}" width="{{ page.image.width | default: 730 }}" height="{{ page.image.height | default: 411 }}" layout="responsive" src="{{ page.image.path | relative_url }}" alt="{{ page.title }}"></amp-img>
</amp-img>
{%- endif -%}
{%- endunless -%}
{%- endif -%}
<!-- End Featured Image -->

Expand All @@ -66,7 +63,7 @@ <h1 class="posttitle">{{ page.title }}</h1>
{%- include blocks/share-buttons.html -%}

{%- comment -%}
{%- include blocks/ad-before-content.html -%}
{%- include blocks/ad-before-content.html -%}
{%- endcomment -%}

<!-- Post Content -->
Expand Down Expand Up @@ -131,4 +128,4 @@ <h1 class="posttitle">{{ page.title }}</h1>

</div>

<!-- End Article -->
<!-- End Article -->
15 changes: 15 additions & 0 deletions _layouts/redirect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<title>Redirecting&hellip;</title>
<link rel="canonical" href="{{ page.redirect.to }}">
<script>location="{{ page.redirect.to }}"</script>
<meta http-equiv="refresh" content="0; url={{ page.redirect.to }}">
<meta name="robots" content="noindex">
</head>
<body>
<h1>Redirecting&hellip;</h1>
<a href="{{ page.redirect.to }}">Click here if you are not redirected.</a>
</body>
</html>
2 changes: 1 addition & 1 deletion _posts/2017-11-27-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Sample:

Sample:

{% include picture.html source="assets" img="science-in-hd-NP6JLl_2C-c-unsplash_1024x683.jpg" width="1024" height="683" layout="responsive" caption='<span>Photo by <a href="https://unsplash.com/@scienceinhd?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Science in HD</a> on <a href="https://unsplash.com/photos/37-obwmRiAI?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>' link="https://unsplash.com/photos/NP6JLl_2C-c" %}
{% include picture.html source="assets" img="science-in-hd-NP6JLl_2C-c-unsplash_1024x683.jpg" width="1024" height="683" layout="responsive" caption='<span>Photo by <a href="https://unsplash.com/@scienceinhd?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Science in HD</a> on <a href="http://web.archive.org/web/20210807153741/https://unsplash.com/photos/37-obwmRiAI?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></span>' link="http://web.archive.org/web/20210128032013/https://unsplash.com/photos/NP6JLl_2C-c" %}

**Click the Image Above to View the Original Image on Unsplash** 👆
{: .text-center }
Expand Down
51 changes: 44 additions & 7 deletions _posts/2017-11-28-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
layout: post
title: Code Block
date: 2021-03-21 00:00:00
last_modified_at: 2021-08-02 11:14 +0800
last_modified_at: 2024-01-13 09:01 +0800
author: Chris
category: [doc, feature]
tags: [code, markdown, demo]
category:
- doc
- feature
tags:
- code
- markdown
- demo
permalink: /code/
image:
image:
path: /assets/images/ubuntu-3145957_640.png
css:
syntax: true
Expand Down Expand Up @@ -37,7 +42,6 @@ To denote a word or phrase as code, enclose it in backticks (`). For example:

<pre>The HTML `&lt;body&gt;` Element represents the content of an HTML document.</pre>


**Output:**

The HTML `<body>` Element represents the content of an HTML document.
Expand All @@ -63,7 +67,7 @@ def what?
end
```

### [Use **highlight** tag](https://jekyllrb.com/docs/liquid/tags/#code-snippet-highlighting)
### [Use **highlight** tags](https://jekyllrb.com/docs/liquid/tags/#code-snippet-highlighting)

For example:

Expand Down Expand Up @@ -105,6 +109,39 @@ end

More information about code highlighting in jekyll can be found in [Jekyll](https://jekyllrb.com/docs/liquid/tags/#code-snippet-highlighting) and [kramdown](https://kramdown.gettalong.org/syntax.html#code-spans) documentation.

### Embedding gists

A gist is a simple way to share snippets and pastes with others. To embed a gist in your markdown file, you need to use the `<amp-gist>` component in your markdown file. You will also need to set the following in front matter of a page or post that contains the `<amp-gist>` component:

```yaml
amp:
gist: true
```

To embed an entire gist, you need to:

- Specify the `data-gistid` attribute with the ID of the gist you want to embed.
- Specify the `layout` and `height` attributes for the component.

For example, to embed the gist with the ID `a1b2c3d4`, you can use the following code:

```html
<amp-gist data-gistid="a1b2c3d4" layout="fixed-height" height="300"></amp-gist>
```

To embed one file out of a gist, you need to:

- Specify the `data-file` attribute with the name of the file you want to embed.
- Specify the `data-gistid`, `layout`, and `height` attributes as before.

For example, to embed the file `hello.py` from the gist with the ID `a1b2c3d4`, you can use the following code:

```html
<amp-gist data-gistid="a1b2c3d4" data-file="hello.py" layout="fixed-height" height="300"></amp-gist>
```

To learn more about the `<amp-gist>` component, you can visit the official documentation on <https://amp.dev/documentation/components/websites/amp-gist>.

## More Samples

There are a couple of examples showing the resulting highlighted code:
Expand Down Expand Up @@ -148,4 +185,4 @@ $.ajax({
alert("ajax error response type "+type);
}
});
```
```
2 changes: 1 addition & 1 deletion _posts/2021-08-02-config-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ defaults:

| Attribute | Description |
| :-------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cse_id` | Your Search Engine ID 💡 [Find your Google CSE ID](https://support.google.com/programmable-search/answer/2649143 "Search engine ID - Programmable Search Engine Help") |
| `cse_id` | Your Search Engine ID 💡 [Find your Google CSE ID](https://support.google.com/programmable-search/answer/12499034?hl=en "Search engine ID - Programmable Search Engine Help") |

- **Note:** Essential to feature the site's search function

Expand Down
6 changes: 0 additions & 6 deletions _posts/2021-08-24-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ A Jekyll plugin to generate an Atom (RSS-like) feed of your Jekyll posts.

See [**jekyll-feed**](https://github.com/jekyll/jekyll-feed).

### <i class="fab fa-github-alt fa-fw"></i> Jekyll Gist

A Jekyll plugin to allow using `{% raw %}{% gist %}{% endraw %}` tag for displaying GitHub Gists in Jekyll sites.

See [**jekyll-gist**](https://github.com/jekyll/jekyll-gist).

### <i class="fas fa-sort fa-rotate-90 fa-fw"></i> Jekyll Paginate

Default pagination generator for Jekyll (See [**Pagination**](https://jekyllrb.com/docs/pagination/ "Official Jekyll Documentation")).
Expand Down
16 changes: 8 additions & 8 deletions _sass/amp-bmc-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,34 @@ $white_fff: #ffffff;
padding: 7px 15px 7px 10px;
font-size: 28px;
letter-spacing: .6px;
box-shadow: 0 1px 2px rgba(191, 191, 191, .5);
box-shadow: 0 1px 2px hsla(0deg, 0%, 75%, .5);
margin: 0 auto;
font-family: Cookie, cursive;
-webkit-box-sizing: border-box;
box-sizing: border-box;
text-decoration: none;
color: $white_fff;
-webkit-box-shadow: 0 1px 2px 2px rgba(191, 191, 191, .5);
-webkit-box-shadow: 0 1px 2px 2px hsla(0deg, 0%, 75%, .5);

&:active {
-webkit-box-shadow: 0 1px 2px 2px rgba(191, 191, 191, .5);
box-shadow: 0 1px 2px 2px rgba(191, 191, 191, .5);
-webkit-box-shadow: 0 1px 2px 2px hsla(0deg, 0%, 75%, .5);
box-shadow: 0 1px 2px 2px hsla(0deg, 0%, 75%, .5);
color: $white_fff;
opacity: .85;
text-decoration: none;
}

&:focus {
-webkit-box-shadow: 0 1px 2px 2px rgba(191, 191, 191, .5);
box-shadow: 0 1px 2px 2px rgba(191, 191, 191, .5);
-webkit-box-shadow: 0 1px 2px 2px hsla(0deg, 0%, 75%, .5);
box-shadow: 0 1px 2px 2px hsla(0deg, 0%, 75%, .5);
color: $white_fff;
opacity: .85;
text-decoration: none;
}

&:hover {
-webkit-box-shadow: 0 1px 2px 2px rgba(191, 191, 191, .5);
box-shadow: 0 1px 2px 2px rgba(191, 191, 191, .5);
-webkit-box-shadow: 0 1px 2px 2px hsla(0deg, 0%, 75%, .5);
box-shadow: 0 1px 2px 2px hsla(0deg, 0%, 75%, .5);
color: $white_fff;
opacity: .85;
text-decoration: none;
Expand Down
12 changes: 6 additions & 6 deletions _sass/amp-bs4.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $whitesmoke_eceeef: #eceeef;
$whitesmoke_f7f7f9: #f7f7f9;

html {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.15;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
Expand Down Expand Up @@ -190,7 +190,7 @@ svg {
}

button {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
font-size: 100%;
line-height: inherit;
margin: 0;
Expand All @@ -216,7 +216,7 @@ button {
input {
-ms-touch-action: manipulation;
cursor: pointer;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
font-size: 100%;
line-height: inherit;
margin: 0;
Expand All @@ -225,14 +225,14 @@ input {
}

optgroup {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
font-size: 100%;
line-height: 1.15;
margin: 0;
}

select {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
font-size: 100%;
line-height: inherit;
margin: 0;
Expand All @@ -254,7 +254,7 @@ select {
textarea {
-ms-touch-action: manipulation;
cursor: pointer;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
font-size: 100%;
line-height: inherit;
margin: 0;
Expand Down
Loading

0 comments on commit b9ee858

Please sign in to comment.