Skip to content

Commit 20125e3

Browse files
Merge branch 'master' of https://github.com/alshedivat/al-folio into update-bootstrap
2 parents 1e64134 + f618757 commit 20125e3

File tree

13 files changed

+167
-8
lines changed

13 files changed

+167
-8
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Docker Image CI (Upload Tag)
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Buildx
18+
uses: docker/setup-buildx-action@v1
19+
20+
-
21+
name: Docker meta
22+
id: meta
23+
uses: docker/metadata-action@v4
24+
with:
25+
images: amirpourmand/al-folio
26+
27+
- name: Login
28+
uses: docker/login-action@v1
29+
with:
30+
username: ${{ secrets.DOCKER_USERNAME }}
31+
password: ${{ secrets.DOCKER_PASSWORD }}
32+
33+
- name: Build and push
34+
uses: docker/build-push-action@v3
35+
with:
36+
context: .
37+
push: ${{ github.event_name != 'pull_request' }}
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}
40+

.github/workflows/deploy-image.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: Docker Image CI
33
on:
44
push:
55
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
86

97
jobs:
108

119
build:
1210

1311
runs-on: ubuntu-latest
12+
if: github.repository_owner == 'alshedivat'
1413

1514
steps:
1615
- name: Checkout
@@ -23,7 +22,7 @@ jobs:
2322
with:
2423
username: ${{ secrets.DOCKER_USERNAME }}
2524
password: ${{ secrets.DOCKER_PASSWORD }}
26-
25+
2726
- name: Build and push
2827
uses: docker/build-push-action@v2
2928
with:

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,32 @@ Easily create beautiful grids within your blog posts and project pages:
439439

440440
### Other features
441441

442+
#### GitHub repositories and user stats
443+
**al-folio** uses [github-readme-stats](https://github.com/anuraghazra/github-readme-stats) to display GitHub repositories and user stats on the the `/repositories/` page.
444+
445+
Edit the `_data/repositories.yml` and change the `github_users` and `github_repos` lists to include your own GitHub profile and repositories to the the `/repositories/` page.
446+
447+
You may also use the following codes for displaying this in any other pages.
448+
```
449+
<!-- code for GitHub users -->
450+
{% if site.data.repositories.github_users %}
451+
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
452+
{% for user in site.data.repositories.github_users %}
453+
{% include repository/repo_user.html username=user %}
454+
{% endfor %}
455+
</div>
456+
{% endif %}
457+
458+
<!-- code for GitHub repositories -->
459+
{% if site.data.repositories.github_repos %}
460+
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
461+
{% for repo in site.data.repositories.github_repos %}
462+
{% include repository/repo.html repository=repo %}
463+
{% endfor %}
464+
</div>
465+
{% endif %}
466+
```
467+
442468
#### Theming
443469
Six beautiful theme colors have been selected to choose from.
444470
The default is purple, but you can quickly change it by editing `$theme-color` variable in the `_sass/_themes.scss` file.

_config.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ url: https://alshedivat.github.io # the base hostname & protocol for your site
2323
last_updated: false # set to true if you want to display last updated in the footer
2424
impressum_path: # set to path to include impressum link in the footer, use the same path as permalink in a page, helps to conform with EU GDPR
2525

26+
# -----------------------------------------------------------------------------
27+
# Theme
28+
# -----------------------------------------------------------------------------
29+
30+
# code highlighter theme
31+
highlight_theme_light: github # https://github.com/jwarby/jekyll-pygments-themes
32+
highlight_theme_dark: native # https://github.com/jwarby/jekyll-pygments-themes
33+
34+
# repo color theme
35+
repo_theme_light: default # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md
36+
repo_theme_dark: dark # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md
37+
2638
# -----------------------------------------------------------------------------
2739
# RSS Feed
2840
# -----------------------------------------------------------------------------
@@ -133,8 +145,6 @@ news_limit: 5 # leave blank to include all the news in the `_news` folder
133145
# Markdown and syntax highlight
134146
markdown: kramdown
135147
highlighter: rouge
136-
highlight_theme_light: github # https://github.com/jwarby/jekyll-pygments-themes
137-
highlight_theme_dark: native # https://github.com/jwarby/jekyll-pygments-themes
138148
kramdown:
139149
input: GFM
140150
syntax_highlighter_opts:

_data/repositories.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
github_users:
2+
- torvalds
3+
- alshedivat
4+
5+
github_repos:
6+
- alshedivat/al-folio
7+
- twbs/bootstrap
8+
- jekyll/jekyll
9+
- jquery/jquery
10+
- FortAwesome/Font-Awesome
11+
- jpswalsh/academicons
12+
- mathjax/MathJax

_includes/repository/repo.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% assign repo_url = include.repository | split: '/' %}
2+
3+
{% if site.data.repositories.github_users contains repo_url.first %}
4+
{% assign show_owner = false %}
5+
{% else %}
6+
{% assign show_owner = true %}
7+
{% endif %}
8+
9+
<div class="repo p-2 text-center">
10+
<a href="https://github.com/{{ include.repository }}">
11+
<img class="repo-img-light w-100" alt="{{ include.repository }}" src="https://github-readme-stats.vercel.app/api/pin/?username={{ repo_url.first }}&repo={{ repo_url.last }}&theme={{ site.repo_theme_light }}&show_owner={{ show_owner }}">
12+
<img class="repo-img-dark w-100" alt="{{ include.repository }}" src="https://github-readme-stats.vercel.app/api/pin/?username={{ repo_url.first }}&repo={{ repo_url.last }}&theme={{ site.repo_theme_dark }}&show_owner={{ show_owner }}">
13+
</a>
14+
</div>

_includes/repository/repo_user.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<div class="repo p-2 text-center">
2+
<a href="https://github.com/{{ include.username }}">
3+
<img class="repo-img-light w-100" alt="{{ include.username }}" src="https://github-readme-stats.vercel.app/api/?username={{ include.username }}&theme={{ site.repo_theme_light }}&show_icons=true">
4+
<img class="repo-img-dark w-100" alt="{{ include.username }}" src="https://github-readme-stats.vercel.app/api/?username={{ include.username }}&theme={{ site.repo_theme_dark }}&show_icons=true">
5+
</a>
6+
</div>

_pages/cv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ layout: cv
33
permalink: /cv/
44
title: cv
55
nav: true
6-
nav_order: 3
6+
nav_order: 4
77
cv_pdf: example_pdf.pdf
88
---

_pages/dropdown.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: page
33
title: submenus
44
nav: true
5-
nav_order: 5
5+
nav_order: 6
66
dropdown: true
77
children:
88
- title: publications

_pages/repositories.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: page
3+
permalink: /repositories/
4+
title: repositories
5+
description: Edit the `_data/repositories.yml` and change the `github_users` and `github_repos` lists to include your own GitHub profile and repositories.
6+
nav: true
7+
nav_order: 3
8+
---
9+
10+
## GitHub users
11+
12+
{% if site.data.repositories.github_users %}
13+
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
14+
{% for user in site.data.repositories.github_users %}
15+
{% include repository/repo_user.html username=user %}
16+
{% endfor %}
17+
</div>
18+
{% endif %}
19+
20+
---
21+
22+
## GitHub Repositories
23+
24+
{% if site.data.repositories.github_repos %}
25+
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
26+
{% for repo in site.data.repositories.github_repos %}
27+
{% include repository/repo.html repository=repo %}
28+
{% endfor %}
29+
</div>
30+
{% endif %}

0 commit comments

Comments
 (0)