You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+61-46Lines changed: 61 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ you can choose your preferred language setting for a consistent blog experience.
32
32
-[Configuration](#configuration)
33
33
-[Front Matter](#front-matter)
34
34
-[Localization](#localization)
35
-
-[Integrating in theme folder](#integrating-in-theme-folder)
35
+
-[Integrating the theme folder](#integrating-the-theme-folder)
36
36
-[Development](#development)
37
37
-[Remarks](#remarks)
38
38
-[Contributing](#contributing)
@@ -49,15 +49,17 @@ The site uses the German language.
49
49
50
50
## Prerequisites
51
51
52
-
In order to use the theme, you need some software pre-installed:
52
+
To use the theme, you need some software pre-installed:
53
53
54
54
-[Git](https://git-scm.com/downloads), Required for version control.
55
55
56
56
-[Node](https://nodejs.org/en/download), an open-source, cross-platform JavaScript runtime environment.
57
+
Node is optional and only needed if you want to change the CSS in `css/main.css`.
57
58
58
59
-[Zola](https://github.com/getzola/zola/releases), a fast static site generator.
59
60
60
-
- an editor or integrated development environment of your choice - I use [JetBrains IDEA](https://www.jetbrains.com/idea/download),
61
+
- an editor or integrated development environment of your choice —
62
+
I use [JetBrains IDEA](https://www.jetbrains.com/idea/download),
61
63
an IDE that makes development a more productive and enjoyable experience.
62
64
63
65
---
@@ -68,7 +70,7 @@ In order to use the theme, you need some software pre-installed:
68
70
Or download it from `https://github.com/thomasweitzel/zolarwind`.
69
71
70
72
2. Make adjustments to the `config.toml` file as needed.
71
-
In order to run the theme as a standalone site, you need to adjust the `base_url` to your domain.
73
+
To run the theme as a standalone site, you need to adjust the `base_url` to your domain.
72
74
If you want to try it out on your local machine, you can leave it as is.
73
75
Just run `zola serve` from the theme's root directory.
74
76
@@ -81,7 +83,7 @@ Here's a breakdown of the configuration settings tailored for this theme:
81
83
82
84
### Basic Configuration:
83
85
84
-
-**base_url**: Specifies the URL the site will be built for.
86
+
-**base_url**: Specify the URL the site will be built for.
85
87
In this case, the site will be built for `https://example.org`.
86
88
Adjust this to your own domain.
87
89
@@ -93,7 +95,7 @@ Here's a breakdown of the configuration settings tailored for this theme:
93
95
As of now, German (`de`) is available in the `i18n` directory.
94
96
95
97
-**theme**: The theme used for the site.
96
-
The provided line is commented out, indicating that the themes files are taken from the `template` directory.
98
+
The provided line is commented out, indicating that the theme's files are taken from the `template` directory.
97
99
If you move the theme to the `themes/zolarwind` directory, use `zolarwind` for this entry.
98
100
99
101
-**build_search_index**: If set to `true`, a search index will be built from the pages and section content for the `default_language`.
@@ -111,39 +113,50 @@ Here's a breakdown of the configuration settings tailored for this theme:
111
113
112
114
-**highlight_theme**: Specifies the theme to be used for code highlighting. The chosen theme in this configuration is `1337`.
113
115
116
+
-**extra_syntaxes_and_themes**: directory for additional syntax highlighting configuration files for languages not directly supported by Zola.
117
+
114
118
### Extra Configuration:
115
119
116
120
The `[extra]` section is where you can place any custom variables you want to be accessible in your templates.
117
121
118
-
-**title**: The title of the site.
119
-
Here, it's set to "Zolarwind".
120
-
121
-
-**generator**: Optional.
122
-
Specifies the generator used for creating the static website.
123
-
This site is generated using `Zola v0.18.0`.
122
+
-**title**: Required.
123
+
The title of the site.
124
+
Here, it's set to "Zolarwind."
124
125
125
-
-**path_language_resources**: The path to the directory containing language resource files.
126
+
-**path_language_resources**: Required.
127
+
The path to the directory containing language resource files.
126
128
In this config, it's set to `i18n/`.
127
129
If you move the theme to the `themes/zolarwind` directory, use `themes/zolarwind/i18n/` for this entry.
128
130
129
-
-**favicon_svg**: Provides a path to the site's favicon in SVG format.
131
+
-**generator**: Optional.
132
+
Specify the generator used for creating the static website.
133
+
This site is generated using `Zola v0.19.0`.
134
+
135
+
-**favicon_svg**: Optional.
136
+
Provides a path to the site's favicon in SVG format.
130
137
The provided path points to `/img/yin-yang.svg`.
131
138
132
-
-**copyright**: A template for the copyright notice.
139
+
-**copyright**: Optional.
140
+
A template for the copyright notice.
133
141
It includes a placeholder `{year}` which is dynamically replaced with the current year of your `zola build` run.
134
142
135
-
-**site_description**: A brief description displayed on the site's banner.
143
+
-**site_description**: Optional.
144
+
A brief description is displayed on the site's banner.
136
145
137
-
-**quote**: A structure defining a quote and its author.
146
+
-**quote**: Optional.
147
+
A structure defining a quote and its author.
138
148
This quote is from Yoda.
139
149
140
-
-**menu_pages**: An array of main navigation menu items.
150
+
-**menu_pages**: Optional.
151
+
An array of main navigation menu items.
141
152
Each item has a `title` and a `url`.
142
153
143
-
-**footer_pages**: An array of pages that will appear in the site's footer.
154
+
-**footer_pages**: Optional.
155
+
An array of pages that will appear in the site's footer.
144
156
Each item has a `title` and a `url`.
145
157
146
-
-**social_links**: An array of social media links.
158
+
-**social_links**: Optional.
159
+
An array of social media links.
147
160
Each link has a name, a boolean indicating if it's enabled, a URL, and an SVG icon.
148
161
149
162
---
@@ -154,7 +167,7 @@ For blog posts (Markdown files in folder `content/blog`), this theme uses a dire
154
167
This way, I have all resources for a post in one place.
155
168
It can include images, videos, and other files.
156
169
157
-
Each post is associated with an image, that is displayed on the blog's main page and on the posts detail page.
170
+
Each post is associated with an imagedisplayed on the blog's main page and on the post's detail page.
158
171
If you do not provide an image under `extra.image`, a default image is used instead.
159
172
160
173
-**date**: the date of the blog posts, e.g. `2020-06-11`.
@@ -163,7 +176,7 @@ If you do not provide an image under `extra.image`, a default image is used inst
163
176
164
177
-**description**: the description of the blog posts. It is used as a summary on the blog's main page.
165
178
166
-
-**authors**: an optional array of all the posts authors, e.g. `["Thomas Weitzel"]`.
179
+
-**authors**: an optional array of all the post's authors, e.g. `["Thomas Weitzel"]`.
167
180
You can leave it empty, but then the first author will show up as `Unknown` in the feed (`atom.xml`).
168
181
169
182
-**taxonomies**: only the optional `tags` taxonomy is used by this theme.
@@ -181,7 +194,7 @@ If you do not provide an image under `extra.image`, a default image is used inst
181
194
182
195
-**extra.image**: an optional image for the post.
183
196
If omitted, a default image is used instead.
184
-
The image is displayed on the blog's main page and on the posts detail page.
197
+
The image is displayed on the blog's main page and on the post's detail page.
185
198
186
199
---
187
200
@@ -200,7 +213,7 @@ To localize your blog with this theme:
200
213
If your language is not supported yet, just create a new resource file with your translations.
201
214
Use the file `en.toml` as a template for your own translations.
202
215
Use the correct language code for the file name, e.g. `eo.toml` for Esperanto.
203
-
Only languages that read from left-to-right (ltr) are supported by this theme.
216
+
This theme supports only languages that read from left-to-right (ltr).
204
217
205
218
2. The theme will automatically display all theme-specific string resources in the chosen language.
206
219
@@ -212,7 +225,7 @@ If you need to define your own date format, look [here](https://docs.rs/chrono/l
212
225
213
226
---
214
227
215
-
## Integrating in theme folder
228
+
## Integrating the theme folder
216
229
217
230
This project is structured as a stand-alone Zola site.
218
231
This section is for those who might want to integrate the theme into an existing Zola website.
@@ -232,6 +245,7 @@ This is the directory structure of the stand-alone site, where the theme is in t
232
245
│ ├── css
233
246
│ ├── img
234
247
│ └── js
248
+
├── syntaxes
235
249
├── templates
236
250
└── theme.toml
237
251
```
@@ -249,6 +263,7 @@ Create a new directory `themes/zolarwind` and move the following files and direc
249
263
├── static
250
264
│ ├── img
251
265
│ └── js
266
+
├── syntaxes
252
267
├── templates
253
268
└── theme.toml
254
269
```
@@ -261,7 +276,7 @@ The generation process can be triggered with a script in the `package.json` file
261
276
**You only need to adjust and run the script** in `package.json` if you make changes to the theme's template files or use new Tailwind CSS classes directly in your content files.
262
277
Since the source file `css/main.css` has moved to the directory `themes/zolarwind/css/main.css`, we need to adjust the script in `package.json` accordingly.
263
278
264
-
This is how the relevant part of it looks like for the stand-alone site:
279
+
This is what the relevant part of it looks like for the stand-alone site:
If you want to adjust the CSS of the theme to your needs, you will need to edit the files in the `templates` and `css` directories.
302
-
While you do this, you should make sure that the CSS file `static/css/generated.css` is up-to-date.
303
-
This file is generated from the file `css/main.css`, and all the files that are configured as a pattern in `tailwind.config.js`:
304
-
305
-
-`css/main.css`
316
+
If you want to adjust the CSS of the theme to your needs, you will need to edit the files in the `templates` and `css`
317
+
directories. While you do this, you should make sure that the CSS file `static/css/generated.css` is up to date. This
318
+
file is generated from the file `css/main.css`, and all the files that Tailwind automatically identifies via automatic
319
+
content detection.
306
320
307
-
-`themes/**/*.html`
321
+
If you ever need to explicitly add a source file excluded by default, you can always add it with the `@source`
322
+
directive, right in your `css/main.css` file:
308
323
309
-
-`templates/**/*.html`
310
-
311
-
-`content/**/*.md`
324
+
```css
325
+
@source "../node_modules/@my-company/ui-lib";
326
+
```
312
327
313
328
So whenever one of these files changes, you need to run the script `css:build` from the `package.json` file.
314
-
To accomplish this, you need to have `Node.js` and all dependencies from `package.json` installed (with `npm install`).
329
+
To achieve this, you need to have `Node.js` and all dependencies from `package.json` installed (with `npm install`).
315
330
Then you can run the script with `npm run css:watch`.
316
331
It monitors all files mentioned above and triggers the CSS generation whenever a relevant file changes.
317
-
This ensures, that the file `static/css/generated.css` is always up-to-date.
332
+
This ensures, that the file `static/css/generated.css` is always up to date.
318
333
319
-
I recommend to have two terminals open.
320
-
In one terminal, run `zola serve` to start the Zola server.
334
+
I recommend having two terminals open.
335
+
In one terminal, run `npm run server` - or just `zola serve` - to start the Zola server.
321
336
In the other terminal, run `npm run css:watch` to start the CSS generation whenever a relevant file changes.
322
337
323
-
That way, your local web browser will automatically reload the page with the updated CSS whenever you change a file.
338
+
That way, your local web browser will automatically reload the page with the updated CSS whenever you change a file.
324
339
325
340
---
326
341
327
342
## Remarks
328
343
329
-
### Typography for markdown
344
+
### Typography for Markdown
330
345
331
-
I'm not using `@tailwindcss/typography` for styling of markdown files.
346
+
I'm not using `@tailwindcss/typography` for styling of Markdown files.
332
347
I don't like how it looks.
333
348
Instead, I use `@apply` in the `css/main.css` file.
334
349
The `@apply` directive in Tailwind CSS enables you to compose utility classes into custom CSS classes.
335
-
This makes it possible to apply multiple utility styles within a single class, making it efficient to style markdown content.
350
+
This makes it possible to apply multiple utility styles within a single class, making it efficient to style Markdown content.
336
351
337
352
This approach has pros and cons.
338
-
But it gives me fine-grained control over how the end result looks like.
353
+
But it gives me fine-grained control over how the result looks like.
339
354
While it is time-consuming, I prefer this solution over the `@tailwindcss/typography` plugin.
340
355
341
356
Yes, I'm reinventing the wheel here, because for common typographic patterns, I'm just recreating what's already provided by the typography plugin.
@@ -352,7 +367,7 @@ Using KaTeX (or any other library) by serving it from a Content Delivery Network
352
367
353
368
-**Cookies**: Many CDNs set cookies for various reasons, including analytics or performance optimizations.
354
369
These cookies can track users across different websites that use the same CDN, potentially infringing on their privacy rights.
355
-
By hosting KaTeX on your domain, you have full control over the cookies set and can ensure compliance with GDPR.
370
+
By hosting KaTeX on your domain, you have full control over cookies and can ensure compliance with GDPR.
356
371
357
372
-**Consent**: If you're using a CDN that sets cookies or collects data, you might need to get explicit user consent before loading resources from that CDN.
358
373
This can complicate user experience and lead to a reduced site performance for users who opt-out.
@@ -374,7 +389,7 @@ If you see areas of improvement or want to add features, please submit a PR.
374
389
375
390
I'm especially interested in more translations.
376
391
See folder `i18n` for what's available and what is not.
377
-
Just use the file `en.toml` as a template for your own translations.
392
+
Use the file `en.toml` as a template for your own translations.
not_found_header = "A pagina solicitada não funciona."
17
+
not_found_text = "Oops! Parece que a pagina desapareceu pelo abismo da internet. Talvez ela esteja de férias? Por favor verifique a URL ou me chame, and eu irei ver se posso localiza-la, ou ao menos enviar um grupo de busca."
0 commit comments