Skip to content

Commit 8014515

Browse files
committed
modifs blog
1 parent f8eac15 commit 8014515

File tree

13 files changed

+913
-91
lines changed

13 files changed

+913
-91
lines changed

content/blog/doks-1-6/index.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "Doks 1.6"
3-
url: "/blog/doks-1-6/"
43
description: "Doks 1.6 is out! This release includes a new Hugo requirement, an improved scripts setup, new development tools, and more."
54
summary: "Doks 1.6 is out! This release includes a new Hugo requirement, an improved <code>scripts</code> setup, new development tools, and more."
65
date: 2024-05-16T09:03:10+02:00
@@ -75,28 +74,28 @@ Doks 1.6 introduces a cleaner `scripts` section in your projects' `package.json`
7574

7675
Thulite/Doks now uses [Prettier](https://prettier.io/) as a code formatter and [Vite](https://vitejs.dev/) to preview your project's build. You can configure Prettier in the `.prettierrc.yaml` and `.prettierignore` files in the root of your project. With Vite, when you use the `--host` flag, you can preview the build on your local network — for example on your mobile phone — here's how:
7776

78-
{{< tabs "create-new-site" >}}
79-
{{< tab "npm" >}}
77+
{{< tabs tabTotal="3">}}
78+
{{% tab title="npm" %}}
8079

8180
```bash
8281
npm run build -- --baseURL=/ && npm run preview -- --host
8382
```
8483

85-
{{< /tab >}}
86-
{{< tab "pnpm" >}}
84+
{{% /tab %}}
85+
{{% tab title="pnpm" %}}
8786

8887
```bash
8988
pnpm build --baseURL=/ && pnpm preview --host
9089
```
9190

92-
{{< /tab >}}
93-
{{< tab "Yarn" >}}
91+
{{% /tab %}}
92+
{{% tab title="Yarn" %}}
9493

9594
```bash
9695
yarn run build --baseURL=/ && yarn run preview --host
9796
```
9897

99-
{{< /tab >}}
98+
{{% /tab %}}
10099
{{< /tabs >}}
101100

102101
<!-- omit in toc -->

hugo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ title = 'BackToBasics'
1616
[params]
1717
[params.docs]
1818
darkMode = true
19-
#themeColor = "blue" #blue (default), green, red, yellow, emerald, cardinal, magenta, cyan.
19+
#themeColor = "blue" #blue (default), green, red, yellow, emerald, cardinal, magenta, cyan
20+
[params.blog]
21+
showImage = true

themes/lotusdocs/layouts/blog/baseof.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
<div class="mb-4" id="content" style="padding-top: 100px;">
4040
<div class="wrap container-fluid">
4141
<div class="content">
42-
{{- block "main" . }}{{- end }}
42+
<div class="container p-0">
43+
{{- block "main" . }}{{- end }}
44+
</div>
45+
4346
</div>
4447
</div>
4548

themes/lotusdocs/layouts/blog/list.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,13 @@ <h1 class="text-center">{{ .Title }}</h1>
2323
{{ $paginator := .Paginate (.Data.Pages) -}}
2424
{{ range $paginator.Pages -}}
2525
<div class="card">
26-
{{ if site.Params.doks.imageList -}}
26+
{{ if site.Params.blog.showImage -}}
27+
2728
{{- $images := .Resources.ByType "image" -}}
2829
{{- $featured := $images.GetMatch "*feature*" -}}
2930
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
3031
{{- if $featured -}}
31-
{{ partial "img" (dict
32-
"page" .
33-
"src" $featured
34-
"process" "fill 2100x900"
35-
"lqip" "21x webp q20"
36-
"alt" .Title
37-
"class" "rounded-top-1"
38-
)}}
32+
<img src = "{{ $featured.RelPermalink }}">
3933
{{ end -}}
4034
{{ end -}}
4135
<div class="card-body">

themes/lotusdocs/layouts/blog/list_old.html

Lines changed: 0 additions & 55 deletions
This file was deleted.

themes/lotusdocs/layouts/blog/single.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,19 @@ <h1>{{ .Title }}</h1>
77
{{ partial "main/blog-meta.html" . }}
88
</div>
99
</div>
10-
{{ if site.Params.doks.imageSingle -}}
10+
{{ if site.Params.blog.showImage -}}
1111
{{- $images := .Resources.ByType "image" -}}
1212
{{- $featured := $images.GetMatch "*feature*" -}}
1313
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
1414
{{- if $featured -}}
1515
<div class="col-md-13">
16-
{{ partial "picture" (dict
17-
"page" .
18-
"src" $featured
19-
"alt" .Title
20-
"class" "img-post-single rounded-0"
21-
)}}
16+
<img src = "{{ $featured.RelPermalink }}">
2217
</div>
2318
{{ end -}}
2419
{{ end -}}
2520
<div class="col-md-12 col-lg-9">
26-
{{ with .Params.summary -}}<p class="lead">{{ . }}</p>{{ end -}}
27-
{{ .Content }}
21+
{{ with .Params.summary | safeHTML -}}<p class="lead">{{ . }}</p>{{ end -}}
22+
{{ .Content}}
2823
{{ if .Params.tags -}}
2924
<div class="tag-list-single">
3025
{{ range $index, $tag := .Params.tags -}}
@@ -55,7 +50,7 @@ <h2 class="section-title text-center">Related posts</h2>
5550
<div class="card-body">
5651
<article>
5752
<h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
58-
<p>{{ .Params.summary | safeHTML }}</p>
53+
<p>{{ .Params.summary | safeHTML}}</p>
5954
{{ partial "main/blog-meta.html" . -}}
6055
</article>
6156
</div>

themes/lotusdocs/layouts/partials/blog/css-blog.html

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4004,13 +4004,25 @@
40044004
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
40054005
font-size: .875rem
40064006
}
4007-
4008-
code:not(:where(.not-content *)) {
4009-
background-color: var(--sl-color-gray-1) !important;
4007+
4008+
code {
4009+
background-color: var(--sl-color-gray-1) ;
40104010
margin-block:-0.125rem !important;
40114011
padding: 0.125rem 0.375rem !important;
40124012
color: inherit !important;
40134013
}
4014+
4015+
code[data-dark-mode] {
4016+
background-color: #23262f !important;
4017+
}
4018+
4019+
code[data-lang] {
4020+
background-color: var(--sl-color-gray-6) !important;
4021+
}
4022+
4023+
.highlight pre {
4024+
background-color: #23262f !important;
4025+
}
40144026

40154027
[data-dark-mode] code:not(:where(.not-content *)) {
40164028
background-color: var(--sl-color-gray-5)

0 commit comments

Comments
 (0)