Compare commits
7 Commits
f19239837c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c731b7eaf5 | |||
| 4cc467b0db | |||
| 1712356889 | |||
| 9a4f91dfbb | |||
| eea734f2fe | |||
| c23735f94d | |||
| 4c2265cde6 |
@@ -24,7 +24,7 @@ jobs:
|
||||
docker_folder_changed: ${{ steps.docker_folder.outputs.changed }}
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
run: git clone --branch preview https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git .
|
||||
run: git clone --branch ${{ gitea.ref_name }} https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git .
|
||||
|
||||
- name: Check Latest Hugo Version
|
||||
id: get_latest
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
shell: sh
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
run: git clone --branch preview https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git .
|
||||
run: git clone --branch ${{ gitea.ref_name }} https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git .
|
||||
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
needs: Deploy-Staging
|
||||
runs-on: ubuntu
|
||||
env:
|
||||
URL: "https://blog-dev.vezpi.com/en/"
|
||||
URL: "https://blog-staging.vezpi.com/en/"
|
||||
steps:
|
||||
- name: Check HTTP Response
|
||||
run: |
|
||||
@@ -143,7 +143,7 @@ jobs:
|
||||
|
||||
- name: Merge preview Branch on main
|
||||
run: |
|
||||
git merge --ff-only origin/preview
|
||||
git merge --ff-only origin/${{ gitea.ref_name }}
|
||||
git push origin main
|
||||
|
||||
Deploy-Production:
|
||||
@@ -194,7 +194,7 @@ jobs:
|
||||
steps:
|
||||
- name: Remove Old Docker Image
|
||||
run: |
|
||||
docker image rm ${{ needs.Check-Rebuild.outputs.current_docker_image }} --force
|
||||
docker image rm $(docker image ls ${DOCKER_IMAGE} 2> /dev/null | awk '$NF != "U" && NR>1 {print $2}')
|
||||
|
||||
Notify:
|
||||
needs: [Check-Rebuild, Build, Deploy-Staging, Test-Staging, Merge, Deploy-Production, Test-Production, Clean]
|
||||
|
||||
@@ -87,7 +87,7 @@ jobs:
|
||||
--build-arg HUGO_VERSION=${{ needs.Check-Rebuild.outputs.latest_hugo_version }} \
|
||||
--tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} \
|
||||
.
|
||||
docker tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} ${DOCKER_IMAGE}:test
|
||||
docker tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} ${DOCKER_IMAGE}:dev
|
||||
|
||||
Deploy-Test:
|
||||
needs:
|
||||
@@ -102,7 +102,7 @@ jobs:
|
||||
run:
|
||||
shell: sh
|
||||
env:
|
||||
CONTAINER_NAME: blog_test
|
||||
CONTAINER_NAME: blog_dev
|
||||
steps:
|
||||
- name: Launch Blog Test Deployment
|
||||
run: |
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
needs: Deploy-Test
|
||||
runs-on: ubuntu
|
||||
env:
|
||||
URL: "https://blog-test.vezpi.com/en/"
|
||||
URL: "https://blog-dev.vezpi.com/en/"
|
||||
steps:
|
||||
- name: Check HTTP Response
|
||||
run: |
|
||||
|
||||
@@ -3,9 +3,15 @@
|
||||
}
|
||||
|
||||
.lang-toggle-icon {
|
||||
margin-left: auto;
|
||||
margin-left: 0;
|
||||
svg {
|
||||
width: 64px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
.left-sidebar {
|
||||
width: unset;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,13 @@
|
||||
{{- $IsList := .IsList -}}
|
||||
{{- $Page := .Page -}}
|
||||
<div class="article-details">
|
||||
{{ if .Params.categories }}
|
||||
{{ if $Page.Params.categories }}
|
||||
<header class="article-category">
|
||||
{{ range (.GetTerms "tags") }}
|
||||
<a href="{{ .RelPermalink }}" {{ with .Params.style }}style="background-color: {{ .background }}; color: {{ .color }};"{{ end }}>
|
||||
{{ range ($Page.GetTerms "tags") }}
|
||||
{{ $color := partial "helper/color-from-str" .LinkTitle }}
|
||||
{{ $BackgroundColor := default $color.BackgroundColor .Params.style.background }}
|
||||
{{ $TextColor := default $color.TextColor .Params.style.color }}
|
||||
<a href="{{ $Page.RelPermalink }}" style="background-color: {{ $BackgroundColor | safeCSS }}; color: {{ $TextColor | safeCSS }};">
|
||||
{{ .LinkTitle }}
|
||||
</a>
|
||||
{{ end }}
|
||||
@@ -11,50 +16,51 @@
|
||||
|
||||
<div class="article-title-wrapper">
|
||||
<h2 class="article-title">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
{{- .Title -}}
|
||||
<a href="{{ $Page.RelPermalink }}">
|
||||
{{- $Page.Title -}}
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
{{ with .Params.description }}
|
||||
{{ with $Page.Params.description }}
|
||||
<h3 class="article-subtitle">
|
||||
{{ . }}
|
||||
</h3>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ $showReadingTime := .Params.readingTime | default (.Site.Params.article.readingTime) }}
|
||||
{{ $showDate := not .Date.IsZero }}
|
||||
{{ $showFooter := or $showDate $showReadingTime }}
|
||||
{{ if $showFooter }}
|
||||
<footer class="article-time">
|
||||
{{ if $showDate }}
|
||||
<div>
|
||||
{{ partial "helper/icon" "date" }}
|
||||
<time class="article-time--published">
|
||||
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||
</time>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ $showReadingTime := $Page.Params.readingTime | default ($Page.Site.Params.article.readingTime) }}
|
||||
{{ $showDate := not $Page.Date.IsZero }}
|
||||
{{ $showTime := or $showDate $showReadingTime }}
|
||||
|
||||
{{ if $showReadingTime }}
|
||||
<div>
|
||||
{{ partial "helper/icon" "stopwatch" }}
|
||||
<time class="article-time--reading">
|
||||
{{ T "article.readingTime" .ReadingTime }}
|
||||
{{ if $showTime }}
|
||||
<footer class="article-meta">
|
||||
<div class="inline-meta">
|
||||
{{ if $showDate }}
|
||||
{{ partial "helper/icon" "date" }}
|
||||
<time class="article-time--published" datetime='{{ $Page.Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
{{- $Page.Date | time.Format $Page.Site.Params.dateFormat.published -}}
|
||||
</time>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- $date := .Date.Format "20060102" | int -}}
|
||||
{{- $lastmod := .Lastmod.Format "20060102" | int -}}
|
||||
{{- if gt $lastmod $date -}}
|
||||
<div class="article-lastmod">
|
||||
{{ partial "helper/icon" "refresh" }}
|
||||
<time>
|
||||
{{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||
</time>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ if $showReadingTime }}
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<time class="article-time--reading">
|
||||
{{ T "article.readingTime" $Page.ReadingTime }}
|
||||
</time>
|
||||
{{ end }}
|
||||
|
||||
{{- $date := $Page.Date.Format "20060102" | int -}}
|
||||
{{- $lastmod := $Page.Lastmod.Format "20060102" | int -}}
|
||||
{{- if gt $lastmod $date -}}
|
||||
<div class="article-lastmod">
|
||||
{{ partial "helper/icon" "refresh" }}
|
||||
<time>
|
||||
{{ T "article.lastUpdatedOn" }} {{ $Page.Lastmod | time.Format ( or $Page.Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||
</time>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user