monkeywzr / hugo-theme-cactus Goto Github PK
View Code? Open in Web Editor NEWCactus theme for hugo
License: MIT License
Cactus theme for hugo
License: MIT License
It seems that currently not a single generated page has valid HTML
For example see results by w3's official validator:
Can you please add a setting that makes it possible to turn off the copyright information?
Also id appreciate if you could change titles of sections like the ones for projects so it says something else instead.
Wouldnt mind to be able to use markdown in the description or use the sections as shortcode instead aswell.
because the new code added to head.html
:
{{- $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") -}}
{{- $styles := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "scss/style.scss" . | resources.ToCSS $options | resources.Fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}">
hugo reports errors when I copy head.html
from the themes directory to the project directory
I hosted my site on Netlify, and got a page with no CSS styling. Looking at the console shows I am getting the following error when loading the CSS:
Subresource Integrity: The resource 'https://example.com/css/styles.3293cde0ba45207bc30ea388dcd0b13853ce2a765f7062b3b64049d144d97ff3ebebfe523de731ae740d355ea236be1fb55794d29a7f84012e98e293c9da881c.css' has an integrity attribute, but the resource requires the request to be CORS enabled to check the integrity, and it is not. The resource has been blocked because the integrity cannot be enforced.
I had to add a crossorigin="anonymous"
attribute to the stylesheet link here to resolve the error and get the CSS loaded.
Happy to do a PR if that's ok by you.
Hello, I like your project.
hugo server
and refresh the browser but it doesn't seem to work.config.toml
is like this:
colortheme = "classic"
i have also followed the recommended documentation as in this link.
glad if anyone can help me, thanks.
Is there any plan to support PWA?
Have you ever considered modifying the 'table' displayed in markdown to make it look a little better?
table in markdown to make it more visible or beautiful.
I would like to see if further development is possible.
@monkeyWzr Thanks for making such a great theme.
It would be better if I can disable it
Would be nice to be able to point to custom logo and ico files in a easy for an user way.
I want to use Solid Font Awesome icons in the "Find me on" section on the homepage, but currently only brand icons are supported. I thought I would be able to do this change myself, but I just can not figure out what adds "fab fa-" to the beginning of the icon name. Can anyone point me in the right direction?
Hugo has native support for SCSS. It would be a better fit for the project. It can result in not having to include the pre-rendered CSS files in the source. Can use Hugo to minify the resulting CSS, and provide sourcemaps.
Is there a way to change font from toml file?
Is there a way to show the categories on the main page? The same way as tags with the tagsOverview parameter on config.
If not, I would really like to see it.
Thanks, awesome theme.
Not sure exactly what it's used for at the moment, but I believe in modern development it's no longer necessary.
It seems that ga script is not loaded
How can I add "Reading Time" to each posts?
Seems this pull request introduced an issue where if the .Site.Params.showAllPostsArchive
variable is not set, pagination breaks such that you only see the first page. The README suggests that the default value for .Site.Params.showAllPostsArchive is false. Temporary fix is to add the following in the site's config.toml:
[params]
showAllPostsArchive = false
would be great!
looks like KaTeX is faster.
https://katex.org/
Really appreciate your work!
i'd like to set new Font variables $font-family-body and $font-size. What's the best way to do this?
I'm getting a 522 timeout when loading style.css
in public/index.html
, L10 <link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
. Originally, coming from the theme, the line is at themes/cactus/layouts/partials/head.html
L7 <link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
.
It's preventing the webpage from loading altogether, how can I fix this? Note that this is happening both in netlify and local server.
Note that I'm in fact seeing the same behavior when I load the demo webpage at https://www.takuzen.me/hugo-theme-cactus/.
Given that many of us make use this theme to do personal blog
I am wondering anyone wants to add a news section, like below?
If this one is needed I can send a PR for this. Thanks.
My current way of doing this is very similar to how the project section is done.
An alternative way is to do it like post with a new archetype, which I think might be too tedious to add one post per news.
Is there any plan to support switch theme? maybe need a toggle button to switch light mode / dark mode.
I have a fairly vanilla hugo-theme-cactus setup for my blog. But with this setup, though the main site page (index) has both the site title and site logo, none of the post pages do: they only have the post title (they do have the collapsed menu off to the right).
I'm not really sure what to look at to fix this.
Goal: each post page shows the site title + logo + maybe the description above the post title.
Hello,
so I have this in my config.toml:
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "Posts"
url = "/posts"
weight = 2
[[menu.main]]
name = "Photos"
url = "https://my.externalurl.com"
weight = 3
How would I make "Photos" link to open in new tab (_blank) ?
Thank you
Currently, there is no support for the custom icon in the header. Can we add support for that?
Thanks
My index.md file inside content/about/ shows as a post in the website's home page. Is it possible to prevent this from happening?
Thanks!
Only two that show up for me are email and ycombinator, but I see in share.html
there's also code for facebook, linked in, etc.
What determines which links show up? Is it related to what you have defined in [params.social]
in config.toml
? I have only gitlab and email defined there, not ycombinator....
I've tried to use these methods.
They both are not able to show two tags, so is it possible to use multiple tags?
Btw I've searched online but didn't find a solution or explanation.
Thank you guys for creating such beautiful theme!
According to the W3's validator, there's errors in the CSS: https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fwww.takuzen.me%2Fhugo-theme-cactus%2Fcss%2Fstyle-white.css&profile=css3svg&usermedium=all&warning=1&vextwarning=&lang=en
Calling images in a markdown, or Rmarkdown post causes them to appears in the beginning of the post (just link a header/featured image) and in the position where they were called. Follows an example in Hugo 0.81.0:
---
title: bug
author: Kamigauti
date: '2021-04-05'
slug: []
categories:
- programming
tags:
- R
- R Blogdown
draft: no
---
# Here comes a image
image:
![](images/ROD_D_03_PM10_ARM_Unmix.png)
# Here comes another image
another one:
![](images/50049767_1006060356246518_5288004544639235541_n.jpg)
I do not know if it is indeed a bug or my lack of knowledge about the theme. Thanks for the attention!
If you have
[params]
showProjectsList = false
in your config file, but you also have a data/projects.json
in your project, the main page will display the projects anyway.
I wanted to fix it by changing the index.htm
l template with
{{ $showProjectsList := false }}
{{ if (isset .Site.Params "showProjectsList") }}
{{ $showProjectsList = .Site.Params.showProjectsList }}
{{ else if .Site.Data.projects }}
{{ $showProjectsList = true }}
{{ end }}
but it still does not work (projects are still shown), I'm not a go template expert though
I don't like having to go to the hamburger menu just to get a link back to the home page, and I feel the design is already minimalistic enough that users could have a sticky top bar with those links and it wouldn't occupy too much vertical space.
At the very least, make it not sticky, but have it there without the need of additional clicks.
If we use few tags very frequently, the tags page turns into a bad UI.
I'm getting the following error
ERROR 2020/11/03 15:47:45 render of "home" failed: "/home/xxxx/sites/quickstart/themes/cactus/layouts/index.html:47:118": execute of template failed: template: index.html:47:118: executing "main" at <$elem.Page.Permalink>: can't evaluate field Page in type hugolib.OrderedTaxonomyEntry
when using tags. Reading online, this seems to occur if the version is below 0.55. Currently it is 0.48.
https://github.com/monkeyWzr/hugo-theme-cactus/blob/master/theme.toml#L8
Posts are the only pages which have an H1 at the moment. For SEO purposes every single pages should have their own H1 title tag.
hugo-theme-cactus/layouts/index.html
Line 101 in 0b41aca
Currently, the 'projects' section has a static title "Projects". Users are therefore unable to modify the section title to other languages or formatting.
I propose adding a configurable projectsSectionTitle
variable similar to mainSectionTitle
.
Here I make an example of "links". You can see the final result in YoobinPage.
<% if (site.data.links) { %>
<section id="links">
<span class="h1"><a href="<%- url_for(theme.links_url) %>"><%= __('index.links') %></a></span>
<ul class="link-list">
<% for(var obj in site.data.links){ %>
<li class="link-item">
<a href="<%= site.data.links[obj].url %>"><%= site.data.links[obj].name %></a>: <%- markdown(site.data.links[obj].desc) %>
</li>
<% } %>
</ul>
</section>
<% } %>
.link-list
padding: 0
list-style: none
.link-item
margin-bottom: 5px
p
display: inline
links: Friend Links
[
{
"name":"",
"url":"",
"desc":""
}
]
cd to root file, input command in the terminal:
hexo new page links
open /cactus/_config.yml, insert:
links_url = /links/
Examples can be seen in the post : https://chenxofhit.com/posts/2021tumudayi/
I have included my GA 4 id to my config.toml
file as described in the README (see in my repo). The necessary ga scripts get added to all the public/
pages (for examples index.html
), and the google analytics request in my browser gets Status: 200
. Everything looks fine. However, the data doesn't get sent to google-analytics! I just keep getting in GA the message that "Data collection isn’t active for your website. If you installed tags more than 48 hours ago, make sure they are set up correctly." Is this an issue with Cactus Theme? I've logged this issue on discourse.hugo.io as well.
I think copy code button on code blocks would be a nice addition to this already a great theme.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.