Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e8b0cfb32e | |||
| de1cee3951 | |||
| 3283a3b844 | |||
| 3d1b8f830f | |||
| 5159cdf6bb | |||
| b3aae4de33 | |||
| c74672c1c1 | |||
| def5ce662e | |||
| 1aa27921d0 | |||
| 2c5cbeee94 | |||
| b9713b5461 | |||
| 0c0072eac1 |
@@ -21,7 +21,7 @@ jobs:
|
|||||||
npm run autoprefixer
|
npm run autoprefixer
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v5
|
uses: peter-evans/create-pull-request@v6
|
||||||
with:
|
with:
|
||||||
branch: autoprefixer
|
branch: autoprefixer
|
||||||
branch-suffix: timestamp
|
branch-suffix: timestamp
|
||||||
|
|||||||
@@ -10,6 +10,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# Create/Update release draft
|
# Create/Update release draft
|
||||||
- uses: release-drafter/release-drafter@v5.25.0
|
- uses: release-drafter/release-drafter@v6.0.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
> [!IMPORTANT]
|
||||||
|
> If you are migrating from v3 (`git submodule` based) theme to v4 (`hugo modules` based) theme, please read this [migration guide](https://toha-guides.netlify.app/posts/update-v3-to-v4/).
|
||||||
|
|
||||||
# Toha
|
# Toha
|
||||||
|
|
||||||
[](https://app.netlify.com/sites/toha/deploys)
|
[](https://app.netlify.com/sites/toha/deploys)
|
||||||
@@ -185,34 +188,72 @@ For local development, you can make changes in the theme submodule and test the
|
|||||||
|
|
||||||
At first, fork [this repo](https://github.com/hugo-toha/toha). Then, follow the following steps to use the forked theme for local developments,
|
At first, fork [this repo](https://github.com/hugo-toha/toha). Then, follow the following steps to use the forked theme for local developments,
|
||||||
|
|
||||||
**Using the forked theme in your own site:**
|
#### Running the forked theme against the example site
|
||||||
|
|
||||||
If you want to run your local development against your own site, follow the following steps:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# add the original theme as a submodule of your site if you haven't done already
|
|
||||||
$ git submodule add https://github.com/hugo-toha/toha.git themes/toha
|
|
||||||
# navigate into the toha theme folder
|
|
||||||
$ cd themes/toha
|
|
||||||
# add your own fork as a remote
|
|
||||||
$ git remote add my-fork https://github.com/<your-github-user>/toha
|
|
||||||
# create a new branch for your changes
|
|
||||||
$ git checkout -b my-feature-branch
|
|
||||||
```
|
|
||||||
|
|
||||||
**Using the forked theme in the example site:**
|
|
||||||
|
|
||||||
If your want to run your local development against this [example site](https://github.com/hugo-toha/hugo-toha.github.io), follow the following steps:
|
If your want to run your local development against this [example site](https://github.com/hugo-toha/hugo-toha.github.io), follow the following steps:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# clone the example site along with the submodules
|
# go to exampleSite directory
|
||||||
$ git clone git@github.com:hugo-toha/hugo-toha.github.io.git --recursive
|
$ cd exampleSite
|
||||||
# navigate into the toha theme folder
|
# install hugo modules
|
||||||
$ cd themes/toha
|
$ hugo mod tidy
|
||||||
# add your own fork as a remote
|
# install dependencies
|
||||||
$ git remote add my-fork https://github.com/<your-github-user>/toha
|
$ hugo mod npm pack
|
||||||
# create a new branch for your changes
|
$ npm install
|
||||||
$ git checkout -b my-feature-branch
|
# run the example site locally
|
||||||
|
$ hugo server -w
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, you can make change in the theme and they will be reflected immediately on the running site. If you need to change any configuration, you can do that in the `config.yaml` file inside `exampleSite` folder. If you need to add any content or data, you can create the respective folder inside `exampleSite` directory and add your desired content or data there.
|
||||||
|
|
||||||
|
#### Running the forked theme against your own site
|
||||||
|
|
||||||
|
If you want to run your local development against your own site, follow the following steps:
|
||||||
|
|
||||||
|
**Replace the theme module:**
|
||||||
|
|
||||||
|
Open your site's `go.mod` file and replace the `github.com/hugo-toha/toha/v4` with your forked repo's path. For example, if your forked repo is `github.com/<your-github-user>/toha`, then replace the `github.com/hugo-toha/toha/v4` with `github.com/<your-github-user>/toha/v4`.
|
||||||
|
|
||||||
|
```go
|
||||||
|
module github.com/hugo-toha/hugo-toha.github.io
|
||||||
|
|
||||||
|
go 1.19
|
||||||
|
|
||||||
|
require github.com/hugo-toha/toha/v4 v4.0.1-0.20231229170427-d3968ca711ef // indirect
|
||||||
|
|
||||||
|
replace(
|
||||||
|
github.com/hugo-toha/toha/v4 => github.com/<your-github-user>/toha/v4 <git branch>
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
For interactive development, you can replace the theme with your locally cloned fork. For example, if you have cloned your fork in `/home/my-projects/toha`, then replace the `github.com/hugo-toha/toha/v4` with `/home/my-projects/toha`.
|
||||||
|
|
||||||
|
```go
|
||||||
|
module github.com/hugo-toha/hugo-toha.github.io
|
||||||
|
|
||||||
|
go 1.19
|
||||||
|
|
||||||
|
require github.com/hugo-toha/toha/v4 v4.0.1-0.20231229170427-d3968ca711ef // indirect
|
||||||
|
|
||||||
|
replace(
|
||||||
|
github.com/hugo-toha/toha/v4 => /home/my-projects/toha
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Update dependencies:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# update hugo modules
|
||||||
|
$ hugo mod tidy
|
||||||
|
# install dependencies
|
||||||
|
$ hugo mod npm pack
|
||||||
|
$ npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
**Run your site locally:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ hugo server -w
|
||||||
```
|
```
|
||||||
|
|
||||||
From there you can make changes to the source code of the theme while testing with your running Hugo site or the example site.
|
From there you can make changes to the source code of the theme while testing with your running Hugo site or the example site.
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ a {
|
|||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
color: get-light-color('text-color');
|
color: get-light-color('text-color');
|
||||||
@include transition();
|
@include transition();
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
display: inline;
|
display: inline;
|
||||||
color: get-light-color('accent-color');
|
color: get-light-color('accent-color');
|
||||||
@@ -29,6 +30,7 @@ a {
|
|||||||
a.header-anchor {
|
a.header-anchor {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: get-light-color('heading-color');
|
color: get-light-color('heading-color');
|
||||||
|
|
||||||
i,
|
i,
|
||||||
svg {
|
svg {
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
@@ -36,12 +38,15 @@ a.header-anchor {
|
|||||||
display: none;
|
display: none;
|
||||||
margin-left: 0.5rem;
|
margin-left: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
||||||
i,
|
i,
|
||||||
svg {
|
svg {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
color: get-light-color('inline-code-color');
|
color: get-light-color('inline-code-color');
|
||||||
}
|
}
|
||||||
@@ -54,26 +59,33 @@ a.header-anchor {
|
|||||||
html[data-theme='dark'] {
|
html[data-theme='dark'] {
|
||||||
a {
|
a {
|
||||||
color: get-dark-color('accent-color');
|
color: get-dark-color('accent-color');
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
text-decoration: get-dark-color('hover-over-accent-color') underline;
|
text-decoration: get-dark-color('hover-over-accent-color') underline;
|
||||||
color: get-dark-color('hover-over-accent-color');
|
color: get-dark-color('hover-over-accent-color');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-link {
|
.list-link {
|
||||||
color: get-dark-color('text-color');
|
color: get-dark-color('text-color');
|
||||||
&:hover {
|
|
||||||
|
&:hover,
|
||||||
|
&.active {
|
||||||
color: get-dark-color('accent-color');
|
color: get-dark-color('accent-color');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a.header-anchor {
|
a.header-anchor {
|
||||||
color: get-dark-color('heading-color');
|
color: get-dark-color('heading-color');
|
||||||
|
|
||||||
i,
|
i,
|
||||||
svg {
|
svg {
|
||||||
color: get-dark-color('text-color');
|
color: get-dark-color('text-color');
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
color: get-dark-color('inline-code-color');
|
color: get-dark-color('inline-code-color');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-1
@@ -1,4 +1,7 @@
|
|||||||
module:
|
module:
|
||||||
|
hugoVersion:
|
||||||
|
min: "0.118.0"
|
||||||
|
extended: true
|
||||||
mounts:
|
mounts:
|
||||||
- source: content
|
- source: content
|
||||||
target: content
|
target: content
|
||||||
@@ -19,4 +22,4 @@ module:
|
|||||||
- source: ../../node_modules/@fontsource/mulish/files
|
- source: ../../node_modules/@fontsource/mulish/files
|
||||||
target: static/files
|
target: static/files
|
||||||
- source: ../../node_modules/katex/dist/fonts
|
- source: ../../node_modules/katex/dist/fonts
|
||||||
target: static/fonts
|
target: static/fonts
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ params:
|
|||||||
# Enable and configure blog posts
|
# Enable and configure blog posts
|
||||||
blog:
|
blog:
|
||||||
enable: true
|
enable: true
|
||||||
|
showAuthor: true
|
||||||
# Share post on different social media
|
# Share post on different social media
|
||||||
shareButtons:
|
shareButtons:
|
||||||
facebook: true
|
facebook: true
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20221228191121-007f31838bd6 h1:TPFhOZAnuH4wjLIdzimswCRa2qCcc1teKVTatADJU2g=
|
|
||||||
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20221228191121-007f31838bd6/go.mod h1:OMMaP9Hh9NsKd41lVIazBQRPa0s6Z57AfJoY3DcCNNY=
|
|
||||||
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207 h1:T71lEaGpHYpdy8yKM5vaVwm+CJGt8wjHvPgVM+GjCJM=
|
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207 h1:T71lEaGpHYpdy8yKM5vaVwm+CJGt8wjHvPgVM+GjCJM=
|
||||||
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207/go.mod h1:aTn1lQX1rbcbfbwNuWHG/L5DPtD+bEzQro49QyFlbEg=
|
github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207/go.mod h1:aTn1lQX1rbcbfbwNuWHG/L5DPtD+bEzQro49QyFlbEg=
|
||||||
|
|||||||
+2
-2
@@ -117,7 +117,7 @@ other = "Suite"
|
|||||||
other = "Afficher le certificat"
|
other = "Afficher le certificat"
|
||||||
|
|
||||||
[notes]
|
[notes]
|
||||||
other = "Remarques"
|
other = "Notes"
|
||||||
|
|
||||||
[disclaimer_text]
|
[disclaimer_text]
|
||||||
other = "Avis de responsabilité"
|
other = "Avis de responsabilité"
|
||||||
@@ -127,4 +127,4 @@ other = "Chercher"
|
|||||||
|
|
||||||
[minute]
|
[minute]
|
||||||
one = "minute"
|
one = "minute"
|
||||||
other = "minutes"
|
other = "minutes"
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
<div class="content container-fluid" id="content">
|
<div class="content container-fluid" id="content">
|
||||||
<div class="container-fluid post-card-holder" id="post-card-holder">
|
<div class="container-fluid post-card-holder" id="post-card-holder">
|
||||||
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
|
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
|
||||||
{{ $paginator := .Paginate $posts 12 }}
|
{{ $numShow := site.Params.features.pagination.maxPostsPerPage | default 12}}
|
||||||
|
{{ $paginator := .Paginate $posts $numShow }}
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
{{ if .Layout }}
|
{{ if .Layout }}
|
||||||
{{/* ignore the search.md file*/}}
|
{{/* ignore the search.md file*/}}
|
||||||
|
|||||||
@@ -36,15 +36,26 @@
|
|||||||
|
|
||||||
<!--Content Start-->
|
<!--Content Start-->
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
{{ if site.Params.features.blog.showAuthor | default true }}
|
||||||
<div class="author-profile ml-auto align-self-lg-center">
|
<div class="author-profile ml-auto align-self-lg-center">
|
||||||
<img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}' alt="Author Image">
|
<img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}' alt="Author Image">
|
||||||
<h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
|
<h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
|
||||||
<p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}</p>
|
<p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
<div style="margin-bottom: 80px;"></div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h1>{{ .Page.Title }}</h1>
|
<h1>{{ .Page.Title }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{ if not (site.Params.features.blog.showAuthor | default true) }}
|
||||||
|
<div class="author-profile ml-auto align-self-lg-center">
|
||||||
|
<p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}</p>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if site.Params.features.tags.enable }}
|
{{ if site.Params.features.tags.enable }}
|
||||||
{{partial "misc/tags.html" .Params.tags }}
|
{{partial "misc/tags.html" .Params.tags }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -33,7 +33,8 @@
|
|||||||
<div class="content container-fluid" id="content">
|
<div class="content container-fluid" id="content">
|
||||||
<div class="container-fluid post-card-holder" id="post-card-holder">
|
<div class="container-fluid post-card-holder" id="post-card-holder">
|
||||||
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
|
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
|
||||||
{{ $paginator := .Paginate $posts 12 }}
|
{{ $numShow := site.Params.features.pagination.maxPostsPerPage | default 12}}
|
||||||
|
{{ $paginator := .Paginate $posts $numShow }}
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
{{ if .Layout }}
|
{{ if .Layout }}
|
||||||
{{/* ignore the search.md file*/}}
|
{{/* ignore the search.md file*/}}
|
||||||
|
|||||||
@@ -115,6 +115,10 @@
|
|||||||
<li><a href={{ printf "https://github.com/%s" $value }} target="_blank" rel="noopener">
|
<li><a href={{ printf "https://github.com/%s" $value }} target="_blank" rel="noopener">
|
||||||
<span><i class="fab fa-github"></i></span> <span>{{ $value }}</span>
|
<span><i class="fab fa-github"></i></span> <span>{{ $value }}</span>
|
||||||
</a></li>
|
</a></li>
|
||||||
|
{{ else if (eq $key "researchgate") }}
|
||||||
|
<li><a href={{ printf "https://www.researchgate.net/profile/%s" $value }} target="_blank" rel="noopener">
|
||||||
|
<span><i class="fab fa-researchgate"></i></span> <span>{{ $author.name }}</span>
|
||||||
|
</a></li>
|
||||||
{{ else if reflect.IsMap $value }}
|
{{ else if reflect.IsMap $value }}
|
||||||
<li>
|
<li>
|
||||||
{{ if (and (isset $value "url") (isset $value "icon"))}}
|
{{ if (and (isset $value "url") (isset $value "icon"))}}
|
||||||
|
|||||||
@@ -33,7 +33,8 @@
|
|||||||
<div class="content container-fluid" id="content">
|
<div class="content container-fluid" id="content">
|
||||||
<div class="container-fluid post-card-holder" id="post-card-holder">
|
<div class="container-fluid post-card-holder" id="post-card-holder">
|
||||||
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
|
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
|
||||||
{{ $paginator := .Paginate $posts 12 }}
|
{{ $numShow := site.Params.features.pagination.maxPostsPerPage | default 12}}
|
||||||
|
{{ $paginator := .Paginate $posts $numShow }}
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
{{ if .Layout }}
|
{{ if .Layout }}
|
||||||
{{/* ignore the search.md file*/}}
|
{{/* ignore the search.md file*/}}
|
||||||
|
|||||||
Reference in New Issue
Block a user