Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUSTOM to MAIN (DON'T MERGE! JUST FOR INSPECTION !) #13

Open
wants to merge 80 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
f677fba
show related posts if present
mugli Dec 29, 2020
a832f69
Allow default .Site.Params.showAllPostsArchive
jasonrogena Jul 8, 2021
b7eed44
No need for robots meta as a default
Nizzlay Jul 29, 2021
090766d
Create setting to noindex the archive pages
Nizzlay Jul 29, 2021
584768a
add customizable copyright
yishanhe Sep 5, 2021
0379547
Actually disable comments in head,
jtagcat Sep 10, 2021
abf1a10
[ImgBot] Optimize images
ImgBotApp Oct 21, 2021
f1849e1
Merge branch 'imgbot' into robbinespu
RobbiNespu Nov 3, 2021
2d9fbda
from https://github.com/monkeyWzr/hugo-theme-cactus/pull/110
RobbiNespu Nov 3, 2021
c35bd24
Restyled by prettier-markdown
restyled-commits Nov 3, 2021
9c91c97
Restyled by whitespace
restyled-commits Nov 3, 2021
0326c44
Merge pull request #3 from RobbiNespu/restyled/copyright
RobbiNespu Nov 3, 2021
f0a3816
Restyle Robot meta - from https://github.com/monkeyWzr/hugo-theme-cac…
restyled-io[bot] Nov 3, 2021
e47041a
Merge pull request #7 from Nizzlay/robot-meta
RobbiNespu Nov 3, 2021
f14db82
Restyled by whitespace
restyled-commits Nov 3, 2021
1515d7c
Merge pull request #10 from RobbiNespu/restyled/default-showAllPostsA…
RobbiNespu Nov 3, 2021
04d5c75
Restyled by whitespace
restyled-commits Nov 3, 2021
6934e44
Merge pull request #12 from RobbiNespu/restyled/related-content
RobbiNespu Nov 3, 2021
142bfd7
css cache buster
RobbiNespu Nov 3, 2021
081a966
add img
RobbiNespu Nov 3, 2021
1a30357
resize font
RobbiNespu Nov 3, 2021
d35034a
disable body height 100%
RobbiNespu Nov 4, 2021
f1057c4
added disclaimer on footer
RobbiNespu Nov 4, 2021
90d812a
Add param to control related page displayed or not
RobbiNespu Nov 4, 2021
387c47f
fix flex layout, now can use body height 100%
RobbiNespu Nov 4, 2021
da25a31
remove disclaimer
RobbiNespu Nov 4, 2021
8f40cee
cool logo
RobbiNespu Nov 4, 2021
b749ca4
added logo on single post
RobbiNespu Nov 4, 2021
f19e037
change table display from "block" to "table"
RobbiNespu Nov 4, 2021
583293a
Made with ❤️ and Hugo.
RobbiNespu Nov 4, 2021
7a69781
use svg as logo
RobbiNespu Nov 4, 2021
a510431
force print background
RobbiNespu Nov 4, 2021
3faacd0
set which part for NO-PRINT
RobbiNespu Nov 4, 2021
f0cfa87
adjust line height from 1.725 to 1.45
RobbiNespu Nov 4, 2021
af33d29
hav with h4 should be readable
RobbiNespu Nov 4, 2021
d56aba5
remove HTML border top (don't include on print)
RobbiNespu Nov 4, 2021
f7b4b60
force print background
RobbiNespu Nov 5, 2021
0f01c97
draft
RobbiNespu Nov 5, 2021
18c7ddc
drop-down menu
RobbiNespu Nov 5, 2021
edcb1b6
Merge branch 'dropdown' into robbinespu
RobbiNespu Nov 5, 2021
62c60a3
restyle {whitespace, prettier,clang format}
RobbiNespu Nov 5, 2021
db7978b
🎨 redesign footer
RobbiNespu Nov 25, 2021
00163e5
Fix 🐛 - IsSet unsupport type "ptr" (*hugolib.SiteInfo) and hide author
RobbiNespu Nov 25, 2021
264db8a
Fix 🐛 - SCSS not loaded correctly for blockquote, pullquote and caption
RobbiNespu Dec 4, 2021
ae3d3e5
🎨 redesign content.h1 (overwrite 'margin-top' from extend scss)
RobbiNespu Dec 4, 2021
d94926e
📌 Sorry TUI browser, I still need JS for dropdown
RobbiNespu Dec 4, 2021
12ea579
✂️ change fontawesome to emoji
RobbiNespu Dec 4, 2021
ab4ce35
Restyle by BOT
restyled-io[bot] Dec 5, 2021
c532b5a
🎨 hide footer nav on small screen
RobbiNespu Dec 5, 2021
58501f0
🎨 use #282a36 as bg-color for code
RobbiNespu Dec 5, 2021
59e798e
✂️ remove blank space before emoji
RobbiNespu Dec 5, 2021
1cf0b00
🎨 use #282a36 as bg-color for code using scss variable
RobbiNespu Dec 5, 2021
c72d25b
🎨 Look much better
RobbiNespu Dec 17, 2021
97d8085
✨ News section on homepage
RobbiNespu Dec 29, 2021
556466e
Restyle CUSTOM to MAIN (DON'T MERGE! JUST FOR INSPECTION !) (#18)
restyled-io[bot] Dec 29, 2021
460d9ac
🐛 Don't stray the tags
RobbiNespu Dec 29, 2021
96d4f59
🚚revert name back to default.md
RobbiNespu Dec 31, 2021
3260dd6
🧱 Add robots.txt
RobbiNespu Feb 19, 2022
c99bc2e
🔍️ Add "search" functionality
RobbiNespu Feb 19, 2022
8f16776
🎨 Force print header logo on printer
RobbiNespu Feb 19, 2022
30beb84
🎨 refactoring meta (tags) from upper to bottom positions
RobbiNespu Mar 10, 2022
d621d0f
💥 Introduce $color-border-code and $color-text-code:
RobbiNespu Mar 10, 2022
d868820
💄 article-tag look much cooler like this way
RobbiNespu Mar 10, 2022
a4e2483
📱 Hide .article-read-time and .article-category on mobile
RobbiNespu Mar 11, 2022
e49b261
🎨 change logo to general genre
RobbiNespu Mar 11, 2022
87e9e46
📝update exampleSite
RobbiNespu Mar 11, 2022
e626e98
🚨 Added missing "news" component for 97d8085a659f
RobbiNespu Mar 11, 2022
ff0ce1c
✨automatic related content (old features but not activate correctly)
RobbiNespu Mar 11, 2022
8392c67
✨shortcode for table
RobbiNespu Mar 11, 2022
20c7669
✨shortcode for twitter (need enhancement to use API directly)
RobbiNespu Mar 11, 2022
c0141df
👷 Attempt for i18n multi languange 🌐
RobbiNespu Mar 11, 2022
5cf81ef
Restyle 👷 Attempt for i18n multi languange 🌐 (#20)
restyled-io[bot] Mar 11, 2022
a2696e6
🌐 Implement i18n multilingual toggle
RobbiNespu Mar 11, 2022
c22706b
🌐 Translate all string
RobbiNespu Mar 11, 2022
db8cb08
Merge pull request #19 from RobbiNespu/feature_Multilingual-i18n
RobbiNespu Mar 11, 2022
b3dc792
⚖ Added my name on license
RobbiNespu Mar 11, 2022
fdccaa8
💥Add missing $color-border-code and $color-text-code
RobbiNespu Mar 12, 2022
226d7f1
💥Added translation
RobbiNespu Mar 12, 2022
51280e7
🌐Added verbose menu for "about"
RobbiNespu Mar 14, 2022
c68c209
✂️ Re-factor params
RobbiNespu Mar 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 ZERAN WU
Copyright (c) 2022 ZERAN WU, ROBBI NESPU

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
72 changes: 44 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Some works are still in progress. See [TODOS](#todos) below.
## Install

1. clone cactus to your hugo site's `themes` folder.

```
git clone https://github.com/monkeyWzr/hugo-theme-cactus.git themes/cactus
```

2. change your theme to cactus in your site config

```toml
# config.toml

Expand All @@ -22,6 +24,7 @@ theme = "cactus"

3. config your site. See [Config] or a [complete config sample](exampleSite/config.toml)
4. test your site

```
hugo server
```
Expand Down Expand Up @@ -75,57 +78,60 @@ weight = 4

### Homepage settings

* description: description will be displayed in the homepage. Markdown syntax is supported in the description string.
- description: description will be displayed in the homepage. Markdown syntax is supported in the description string.

```toml
[params]

description = "Hugo is a general-purpose website framework. Technically speaking, Hugo is a static site generator. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website’s end users and an ideal writing experience for website authors."
```

* set your main section (used as the link for the "writings" title on the homepage)
- set your main section (used as the link for the "writings" title on the homepage)

```toml
[params]
mainSection = "posts"
```

* change the default main section title from Writings, to something else:
- change the default main section title from Writings, to something else:

```toml
[params]
mainSectionTitle = "Blog"
```

* Show only the 5 most recent posts (default)
- Show only the 5 most recent posts (default)

```toml
[params]
showAllPostsOnHomePage = false
postsOnHomePage = 5
```
* show all posts

- show all posts

```toml
[params]
showAllPostsOnHomePage = true
postsOnHomePage = 5 # this option will be ignored
```

* show tagsoverview (default) or not
*
- show tagsoverview (default) or not
-

```toml
[params]
tagsOverview = true
```

* display the table of contents inline on blog posts, rather than as part of the navigation menu:
- display the table of contents inline on blog posts, rather than as part of the navigation menu:

```toml
[params]
tocInline = true
```

* show projects list (default) or not.
- show projects list (default) or not.

```toml
[params]
Expand All @@ -141,20 +147,21 @@ Create your projects data file `data/projects.yaml|toml|json`. Hugo support yaml
for former hexo cactus users: please assign your json array to a `list` key.

for example, `data/projects.json`:

```json
{
"list": [
{
"name":"Hexo",
"url":"https://hexo.io/",
"desc":"A fast, simple & powerful blog framework"
},
{
"name":"Font Awesome",
"url":"http://fontawesome.io/",
"desc":"The iconic font and CSS toolkit"
}
]
"list": [
{
"name": "Hexo",
"url": "https://hexo.io/",
"desc": "A fast, simple & powerful blog framework"
},
{
"name": "Font Awesome",
"url": "http://fontawesome.io/",
"desc": "The iconic font and CSS toolkit"
}
]
}
```

Expand All @@ -178,17 +185,20 @@ The `name` key expects the name of a [Font Awesome icon](https://fontawesome.com

### Copyright

Assign your copy right to `.Site.Copyright`. Cactus will append current year to the head.

TODO: Customizable copyright year
Assign your copy right to `.Site.Params.Copyright.Name`.

```toml
copyright = "Zeran Wu" # cactus theme will use site title if copyright is not set
[params.copyright]
enabled = true # default
name = "Zeran Wu" # cactus will use title if copyright is not set
startYear = 2020 # if not provided, will use current year.
endYear = 2021 # if not provided, will use current year.
```

### Comments

Comments is disabled by default. Enable comments in your `.Site.Params`.

```toml
[params]
[params.comments]
Expand All @@ -197,6 +207,7 @@ Comments is disabled by default. Enable comments in your `.Site.Params`.
```

You can also enable/disable comments per post. in your posts' front matter, add:

```yaml
comments: true
```
Expand Down Expand Up @@ -236,11 +247,13 @@ default config:
Cactus uses hugo's bulit in analytics templates. Check [hugo's documents](https://gohugo.io/templates/internal#google-analytics) for details.

Set you tracking id in your site config.

```toml
googleAnalytics = "UA-XXXXXXXX-XX" # or G-XXXXXXXX if you are using Google Analytics v4 (gtag.js)
```

If you are using Google Analytics v3 (analytics.js), you can switch to asynchronous tracking by set `params.googleAnalyticsAsync` to `true`.

```toml
[params]
googleAnalyticsAsync = true # not required
Expand All @@ -262,19 +275,22 @@ Please also check [Configure RSS](https://gohugo.io/templates/rss/#configure-rss
### Mathjax

Cactus supports mathjax. Just add `mathjax` option in your site config:

```toml
[params]
mathjax = true # not required
```

You can also enable/disable mathjax per post. In your posts' front matter, add:

```yaml
mathjax: true # or false
```

The site config will be ignored when `mathjax` option exists in front matter.

### Archive
### Archive

Pagination on posts archive can be disabled to show all posts in chronological order

```toml
Expand All @@ -290,9 +306,9 @@ Pagination on posts archive can be disabled to show all posts in chronological o
- [x] Analytics
- [ ] Local Search
- [ ] toc template
- [ ] Customizable copyright year
- [x] Customizable copyright year
- [ ] gallery
- [ ] expose [mathjax configuration](https://docs.mathjax.org/en/latest/web/configuration.html#web-configuration)
- [ ] expose [mathjax configuration](https://docs.mathjax.org/en/latest/web/configuration.html#web-configuration)

## License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

5 changes: 3 additions & 2 deletions assets/scss/_extend.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ table {
text-align: left;
font-size: $font-size - 2px;
overflow: auto;
display: block;
//display: block;
display: table;
}
th {
padding: 8px;
Expand All @@ -116,4 +117,4 @@ th {
td {
padding: 0 8px;
border-bottom: none;
}
}
6 changes: 3 additions & 3 deletions assets/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
$font-family-body: "JetBrains Mono", monospace;
$font-family-mono: "JetBrains Mono", monospace;
$font-family-tt: "Inconsolata", monospace;
$font-size: 14px;
$line-height: 1.725;
$font-size: 16px;
$line-height: 1.45;
$page-width: 48rem;
// Logo
$logo-width: 50px;
$logo-height: 50px;
$logo-grayout: true;
// Colors
$colors: "dark" // white dark light classic
$colors: "dark"; // white dark light classic
4 changes: 3 additions & 1 deletion assets/scss/colors/classic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ $color-text: #22272a;
$color-accent-1: #cc2a41;
$color-accent-2: rgba(86, 124, 119, .8);
$color-accent-3: #666;
$color-quote: #cc2a41;
$color-quote: #cc2a41;
$color-border-code: #282a36;
$color-text-code: white;
4 changes: 3 additions & 1 deletion assets/scss/colors/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ $color-text: #c9cacc;
$color-accent-3: #cccccc;
$color-accent-2: #eeeeee;
$color-accent-1: #2bbc8a;
$color-quote: #ccffb6;
$color-quote: #ccffb6;
$color-border-code: #282a36;
$color-text-code: white;
4 changes: 3 additions & 1 deletion assets/scss/colors/light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ $color-text: #363533;
$color-accent-3: #666666;
$color-accent-2: #111111;
$color-accent-1: #d44375;
$color-quote: #ab2251;
$color-quote: #ab2251;
$color-border-code: #282a36;
$color-text-code: white;
4 changes: 3 additions & 1 deletion assets/scss/colors/white.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ $color-text: #383838;
$color-accent-3: #8c8c8c;
$color-accent-2: #383838;
$color-accent-1: #2bbc8a;
$color-quote: #2bbc8a;
$color-quote: #2bbc8a;
$color-border-code: #282a36;
$color-text-code: white;
Loading