Skip to content

Commit c55cf0a

Browse files
committed
Update readme, contributing, toml, and add Makefile
1 parent 4d65dd3 commit c55cf0a

5 files changed

Lines changed: 83 additions & 14 deletions

File tree

CONTRIBUTING.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
# How to contribute to Typo
22

3-
The goal of this theme is to be as simple as possible, hence adding or changing existing
4-
features need some thought.
3+
The goal of this theme is to be as simple as possible, hence adding or changing existing features needs some thought.
4+
5+
Any change that is too niche or heavily tailored to a specific developer's need will be rejected, as that would make some features cumbersome to set up.
56

6-
Any change that is too niche or heavily tailored to a specific developer's need will be rejected, as
7-
that would make some features cumbersome to set up.
87
To avoid unnecessary work, please start a discussion or open an issue with a proposal.
98

10-
Any other reasonable changes are more than welcome, keep in mind the guidelines:
9+
**Guidelines**
10+
11+
Any other reasonable changes are more than welcome. Keep in mind the guidelines:
12+
1113
- keep the code as minimal as possible, and avoid comments in the code unless needed;
1214
- keep the parameters (e.g. in hugo.toml) as concise and clear as possible;
1315
- update the [wiki](https://github.com/tomfran/typo/tree/main/wiki) if needed, trying to maintain the current style of writing;
14-
- refrain from breaking existing behavior, for example, make a new feature disabled by default;
1516
- squash your change in a single commit.
1617

18+
**On Breaking Changes**
19+
20+
You should avoid breaking existing configs when possible, or you should have a good reason to do so and explain it in your PR.
21+
22+
When introducing a styling change, aim to keep it disabled by default to avoid tweaking people's websites without config changes.
23+
24+
---
1725
<br>
1826
Thank you, <br>
19-
Francesco
27+
Francesco

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.PHONY: release release-bump release-minor release-major
2+
3+
release:
4+
@./scripts/release.sh manual
5+
6+
release-bump:
7+
@./scripts/release.sh bump
8+
9+
release-minor:
10+
@./scripts/release.sh minor
11+
12+
release-major:
13+
@./scripts/release.sh major

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@ Typo is a theme backed by simplicity, as you can see in the screenshots below. T
2424

2525
![3](https://raw.githubusercontent.com/tomfran/typo/main/images/3.webp)
2626

27-
## 1 Wiki
27+
## Wiki
2828

2929
Typo's [Wiki](https://tomfran.github.io/typo-wiki/) is the place to find instructions on how to [setup](https://tomfran.github.io/typo-wiki/setup) the theme and an overview of the available [features](https://tomfran.github.io/typo-wiki/features).
3030

3131
Some of the most relevant are: heading auto-numbering, dark mode, color palettes, dark and light images, comments, etc.
3232

33-
## 2 Support
33+
## Support
3434

3535
If you use the theme or found it useful you can support me by leaving a star ⭐ to Typo's Github repository.
3636

3737
[Contributions](https://github.com/tomfran/typo/blob/main/CONTRIBUTING.md) are always welcome, feel free to open issues and PRs with fixes or new features.
3838

39-
## 3 Typo Users
39+
## Typo Users
4040

4141
If you're using Typo for your website, feel free to add your website to [the list](https://github.com/tomfran/typo/blob/main/USERS.md) alongside what you do! 😊
4242

43-
## 4 Questions or ideas?
43+
## Questions or ideas?
4444

4545
Use the [discussion tab](https://github.com/tomfran/typo/discussions) to share ideas/tips/questions about Typo or Hugo in general!
4646

47-
## 5 References
47+
## References
4848

4949
The SVGs for social icons are taken from [Simple Icons](https://github.com/simple-icons/simple-icons).
5050
Every SVG present on the website is usable on the theme.

scripts/release.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
TYPE=${1:-manual}
6+
7+
latest=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
8+
echo "Latest tag: $latest"
9+
10+
version=$(echo "$latest" | sed 's/v//')
11+
IFS='.' read -r major minor patch <<< "$version"
12+
13+
case "$TYPE" in
14+
bump|patch)
15+
patch=$((patch + 1))
16+
new_tag="v$major.$minor.$patch"
17+
;;
18+
minor)
19+
minor=$((minor + 1))
20+
new_tag="v$major.$minor.0"
21+
;;
22+
major)
23+
major=$((major + 1))
24+
new_tag="v$major.0.0"
25+
;;
26+
manual)
27+
read -p "Enter new tag: " new_tag
28+
if [ -z "$new_tag" ]; then
29+
echo "No tag provided, aborting."
30+
exit 1
31+
fi
32+
;;
33+
*)
34+
echo "Invalid type: $TYPE"
35+
echo "Usage: $0 [bump|minor|major|manual]"
36+
exit 1
37+
;;
38+
esac
39+
40+
read -p "Creating tag [$new_tag] Continue? [y/N] " confirm
41+
if [ "$confirm" = "y" ] || [ "$confirm" = "Y" ]; then
42+
git tag "$new_tag"
43+
git push origin "$new_tag"
44+
echo "Tag $new_tag created and pushed successfully."
45+
else
46+
echo "Tag creation cancelled."
47+
exit 1
48+
fi

theme.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = 'A simple Hugo theme'
55

66
homepage = 'https://github.com/tomfran/typo'
77

8-
demosite = 'https://tomfran.github.io/'
8+
demosite = 'https://tomfran.github.io/typo-wiki/'
99

1010
tags = [
1111
"responsive",
@@ -33,4 +33,4 @@ features = [
3333

3434
[author]
3535
name = 'Francesco Tomaselli'
36-
homepage = 'https://tomfran.github.io/'
36+
homepage = 'https://tomfran.github.io/typo-wiki/'

0 commit comments

Comments
 (0)