blob: d0752f4eed3eed0a938a6f6a0aa3fbae1af06f98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
---
title: "Setup"
date: "2024-10-12"
summary: "How to setup a Hugo's website using Typo as a theme."
description: "Getting started with Typo theme"
toc: false
readTime: false
autonumber: true
math: false
showTags: false
hidePagination: true
---
## Installation
Below are the ways to get started with the Typo theme.
### Getting Started
First of all, create a new Hugo project as follows:
```bash
hugo new site <your site name> --config toml
```
### Downloading the Theme
Themes are contained in the `/themes` directory, there are different ways to get Typo there
**Submodule - Recommended**
```bash
git submodule add --depth=1 https://git.push-f.com/tastefejl themes/tastefejl
git submodule update --init --recursive
```
**Hugo module**
Installing Typo as a Hugo module requires Go to be installed in your development environment.
```bash
# Initialize your project as a Hugo module
hugo mod init <module_name>
# Install the theme
hugo mod get github.com/tomfran/typo
```
Then add the following to `hugo.toml`:
```toml
[module]
[[module.imports]]
path = "github.com/tomfran/typo"
```
Finally, remove the `theme = 'typo'` parameter from `hugo.toml`.
## Sample Config
Use those to get started with the theme. You can find a complete overview of the available features [here](https://tomfran.github.io/typo-wiki/features/).
[Here](https://github.com/tomfran/tomfran.github.io) you can find a repo using this theme.
### Site Config
Here is a sample `hugo.toml` config to get started with the theme.
```toml
baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'My website'
theme = 'tastefejl'
# Google analytics code
googleAnalytics = "G-xxxxxxxxx"
[taxonomies]
tag = 'tags'
[params]
# Meta description
description = "A Tech Blog"
# Appearance settings
theme = 'auto'
colorPalette = 'default'
hideHeader = false
# Collection to display on home
homeCollectionTitle = 'Posts'
homeCollection = 'posts'
# Lists parameters
paginationSize = 100
listSummaries = true
listDateFormat = '2 Jan 2006'
# Breadcrumbs
[params.breadcrumbs]
enabled = true
showCurrentPage = true
home = "Home"
# Main menu pages
[[params.menu]]
name = "home"
url = "/"
[[params.menu]]
name = "posts"
url = "/posts"
[[params.menu]]
name = "about"
url = "/about"
# Syntax highlight on code blocks
[markup]
[markup.highlight]
style = 'algol'
# Giscus comments
[params.giscus]
enable = false
repo = "user/repo"
repoid = "repoId"
category = "General"
categoryid = "categoryId"
mapping = "pathname"
theme = "preferred_color_scheme"
```
### Post Config
Sample post config.
```markdown
---
title: "Log-Structured Merge Tree"
author: "Francesco"
authorAvatarPath: "/avatar.jpeg"
date: "2023-11-12"
summary: "An LSM Tree overview and Java implementation."
description: "An LSM Tree overview and Java implementation."
toc: true
readTime: true
autonumber: true
math: true
tags: ["database", "java"]
showTags: false
hideBackToTop: false
fediverse: "@username@instance.url"
---
```
## Support
If you use the theme or found it useful you can support me by leaving a star :star: to Typo's Github repository or opening issues and PRs with fixes or new features.
|