lukeorth / poison Goto Github PK
View Code? Open in Web Editor NEWProfessional Hugo theme for dev bloggers. Based on Mdo's classic Hyde theme.
Home Page: https://poison.lukeorth.com
License: GNU General Public License v3.0
Professional Hugo theme for dev bloggers. Based on Mdo's classic Hyde theme.
Home Page: https://poison.lukeorth.com
License: GNU General Public License v3.0
I downloaded this theme and installed the provided config, but when I tried to run hugo
it instead did the following:
hugo v0.92.2+extended linux/amd64 BuildDate=2023-01-31T11:11:57Z VendorInfo=ubuntu:0.92.2-1ubuntu0.1
Error: Error building site: render of "404" failed: execute of template failed: template: 404.html:1:3: executing "404.html" at <partial "head/head.html" .>: error calling partial: execute of template failed: template: partials/head/head.html:16:7: executing "partials/head/head.html" at <partial "head/meta.html" .>: error calling partial: "/home/cameron/Website/the-path/themes/poison/layouts/partials/head/meta.html:27:26": execute of template failed: template: partials/head/meta.html:27:26: executing "partials/head/meta.html" at <.Resources.Get>: can't evaluate field Get in type resource.Resources
I've never used HUGO before, so presumably the 404 page wants a brand image? I tried setting that parameter, no dice.
Seems to be an issue with the Local Storage value that is being set. Sometimes it's set properly, and other times it isn't.
I do the code you put as an example for projects. It works like a charm. I change the folder name and the config file and it doesn't work anymore. I can't custom name side bar sections? Why does it only give me a section when it is called project? Love the theme otherwise thank you!
menu = [
{Name = "About", URL = "/about/", HasChildren = false},
{Name = "Series", URL = "/series/", HasChildren = false}, #doesn't work
{Name = "Posts", URL = "/posts/", HasChildren = true, Limit = 5},
]
It would be nice if you could support adding taxonomies like "series" and "tags" as menu items.
Screenshot from the demo website:
This is below the recommended contrast for website text and is flagged (correctly, imo) as an accessibility issue. In general the colors there are defined weirdly in my opinion:
In light mode this works ok because --list-color uses a dark foreground color (as expected from light mode), and white has good contrast with that. But in dark mode this ends up with white on grey instead.
I don't have a strong preference on how to fix this, personally on my website I've overridden the tags to use code background/foreground colors instead and I think it looks nice :p
Maybe I the only one who uses Flickr -- however I thought it would be a useful addition to include the icon for it in the social sidebar.
{{ if .Site.Params.flickr_url }}
<a target="_blank" class="social" href="{{ .Site.Params.flickr_url }}">
<svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" viewBox="0 0 54 54">
<path fill="currentColor" d="M40,4.8c2.2,0,4.1,0.8,5.7,2.4c1.6,1.6,2.4,3.5,2.4,5.7v26.8c0,2.2-0.8,4.1-2.4,5.7c-1.6,1.6-3.5,2.4-5.7,2.4H13.3c-2.2,0-4.1-0.8-5.7-2.4c-1.6-1.6-2.4-3.5-2.4-5.7V12.9c0-2.2,0.8-4.1,2.4-5.7c1.6-1.6,3.5-2.4,5.7-2.4H40z M23,30.4c1.2-1.2,1.7-2.5,1.7-4.2s-0.6-3-1.7-4.2c-1.2-1.2-2.5-1.7-4.2-1.7s-3,0.6-4.2,1.7c-1.2,1.2-1.7,2.5-1.7,4.2s0.6,3,1.7,4.2s2.5,1.7,4.2,1.7S21.8,31.6,23,30.4z M38.7,30.4c1.2-1.2,1.7-2.5,1.7-4.2s-0.6-3-1.7-4.2c-1.2-1.2-2.5-1.7-4.2-1.7c-1.6,0-3,0.6-4.2,1.7c-1.2,1.2-1.7,2.5-1.7,4.2s0.6,3,1.7,4.2c1.2,1.2,2.5,1.7,4.2,1.7C36.1,32.2,37.5,31.6,38.7,30.4z">
</svg>
</a>
{{ end }}
There is an issue with the way menu items work. I can't use 2 word menu items with spaces. Because the menu name and URL have to match in the config.toml file, this basically makes 2 word menu items impossible because the link that is created with a space does not match the URL.
Plus, the home page only shows content from the posts directory. This means that I cannot rename the posts menu and have my posts show on the homepage. It would be convenient if there was a way to have the menu items allow sub-directories. For example "{Name = "Menu Item 1", URL = "/posts/menu_1", Pre = "Recent", HasChildren = true, Limit = 5}, {Name = "Menu Item 2", URL = "/posts/menu_2", Pre = "Recent", HasChildren = true, Limit = 5}," This would allow posts that you may not want in the home page to use a separate directory and menu item in the contents directory. It would allow much more flexibility.
Plus menu items with capitol letters that are not the first letter in the name will not match either.
Hello, my Hugo website suddenly stopped building after I updated it to the latest version.
HOWTO:
Just create a new Hugo website and enable the theme, then use hugo server
to start the server
Error log:
╭─frank@frank-confidential ~/Documents/frankruan ‹master●›
╰─$ hugo server
Start building sites …
hugo v0.92.2+extended linux/amd64 BuildDate=2023-01-31T11:11:57Z VendorInfo=ubuntu:0.92.2-1ubuntu0.1
ERROR 2023/07/11 22:07:32 render of "taxonomy" failed: execute of template failed: template: _default/list.html:1:3: executing "_default/list.html" at <partial "head/head.html" .>: error calling partial: execute of template failed: template: partials/head/head.html:16:7: executing "partials/head/head.html" at <partial "head/meta.html" .>: error calling partial: "/home/frank/Documents/frankruan/themes/poison/layouts/partials/head/meta.html:27:26": execute of template failed: template: partials/head/meta.html:27:26: executing "partials/head/meta.html" at <.Resources.Get>: can't evaluate field Get in type resource.Resources
ERROR 2023/07/11 22:07:32 render of "taxonomy" failed: execute of template failed: template: _default/list.html:1:3: executing "_default/list.html" at <partial "head/head.html" .>: error calling partial: execute of template failed: template: partials/head/head.html:16:7: executing "partials/head/head.html" at <partial "head/meta.html" .>: error calling partial: "/home/frank/Documents/frankruan/themes/poison/layouts/partials/head/meta.html:27:26": execute of template failed: template: partials/head/meta.html:27:26: executing "partials/head/meta.html" at <.Resources.Get>: can't evaluate field Get in type resource.Resources
Error: Error building site: failed to render pages: render of "home" failed: execute of template failed: template: index.html:1:3: executing "index.html" at <partial "head/head.html" .>: error calling partial: execute of template failed: template: partials/head/head.html:16:7: executing "partials/head/head.html" at <partial "head/meta.html" .>: error calling partial: "/home/frank/Documents/frankruan/themes/poison/layouts/partials/head/meta.html:27:26": execute of template failed: template: partials/head/meta.html:27:26: executing "partials/head/meta.html" at <.Resources.Get>: can't evaluate field Get in type resource.Resources
Built in 48 ms
I'm trying to include links with a target to _blank. I don't think markdown allows for that and I've read the solution is to just use real html:
<a href="https://ASiteWithArticles.com/" target="_blank">Articles!</a>
But, my Hugo/Poison environment seems to strip these completely. Is there a solution to this issue?
Thank you for your help!
When we send our blog with others, But they have question only related to a small head, It's easy to redirect them.
Here for example I'm going to use different theme who already did it.
Let's take a scenario, There is a person who don't know how to set up config yml
I can just send him this url, Rest he'll do right.
https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/#sample-configyml
Can apply to different scenario.
And thanks for providing this amazing theme.
I might (not promising) like to contribute.
I made little changes already, I added Matrix icon since you didn't :)
If PR needed for that, I'll do that.
Good day, can you add support https://remark42.com/ commenting engine?
Example - https://blog.lasall.dev/post/hugo-and-comments-with-remark42/
Thank you.
Good day. Thank you for this excellent theme!
Can you possibly add a navbar (top of the page)?
Thank you.
Markdown code blocks seem to not have proper colors applied to them using this Hugo theme. By markdown code block I mean:
```
foo
```
Rendering in dark mode:
Rendering in light mode:
The Hugo {{< highlight >}}
blocks do render correctly, so that's usable as a workaround, but normal code blocks should probably be adjusted to use a similar styling.
Let me start by saying what a great theme Poison is. I'm new to Hugo and I'm struggling to get the brand image to render. I've placed a number of images in the /images/ folder and even tested with the logo on the demo site to no avail. No matter what I have done so far, the result is a linked "brand image" text that does appears to refresh the page when I click on it.
Here is my config.toml code:
brand_image = "/images/logo.jpg"
Hi, I am currently setting up a blog according to this theme, but I cannot figure out how to reorder the sidebar entries as they seem to be ordered alphabetically. For instance, a dummy project with the following entries would build a sidebar with entries "aa, bb, cc, dd" as far as I can tell, right?
menu = [
{Name = "aa", URL = "/aa/"},
{Name = "cc", URL = "/cc/"},
{Name = "bb", URL = "/bb/"},
{Name = "dd", URL = "/dd/"},
]
With the following post:
---
title: title
---
## preface
list 1
* this one uses list color
list 2
* This doesn't use list color
* And neither does this.
I get the following result:
Looking at the produced source code we can see that the multiline list elements get wrapped in a <p>
tag, but not the singleton list element:
<h2 id="preface">preface</h2>
<p>list 1</p>
<ul>
<li>this one uses list color</li>
</ul>
<p>list 2</p>
<ul>
<li>
<p>This doesn’t use list color</p>
</li>
<li>
<p>And neither does this.</p>
</li>
</ul>
I'm not sure what's the expected behaviour here, but would be good to have them behave the same way. Personally I don't see a reason to use list-color here, it's simply harder to read.
Hi, love the design, however, could you provide us some stock templates from the demo?
Thanks.
When I added XMPP in social media,
the HTML output is <a target="_blank" class="social" href="#ZgotmplZ">
for sample you can use my repo.
git clone https://github.com/ARBoyGo/arboygo.github.io.git
cd main
hugo server
For now I manually edited.
My site
The way currently pushing is very bad. I need to use github CLI.
Greetings,
I have been attempting to incorporate a copy button into code snippets, however, I wasn't successful in doing so. I would really appreciate any help in implementing this feature.
Thank you.
I'm think this is more my ignorance than an issue, but when I have images in a post they don't appear on the main page. To see them you need to click on the post itself.
I have previously used the Strange Case theme and this worked as I expected it to.
I tried consulting the Hugo documentation, but it was a bit over my head. It's certainly not a show-stopper, but if anyone knows how to get this working, I would appreciate it.
thanks,
So, I saw social icons in Poison are actually textual representations of SVG files, instead of icons as other themes use them. Thus, I'd like help/ directions on what to do to add additional social icons as SVG. I'm thinking about Mastodon, Micro.blog, Literal.club, besides an e-mail and RSS feed icons.
Can you point me out on how to do it?
Thanks!
I've got this in config.toml
:
menu = [
# ... /content/about/about.md
{Name = "About", URL = "/about/", HasChildren = false},
# ... /content/publications/publications.md
{Name = "Publications", URL = "/publications/", HasChildren = false},
# ... /content/posts/introducing-poison.md
{Name = "Posts", URL = "/posts/", HasChildren = true, Limit = 20},
]
But publications seems to think it should be a list:
Is this expected?
Is it possible to disable the contents section on the right side of the post page - visible on wider monitors?
I've found for my posts, it doesn't provide much value.
I'd like to disable it - if that's possible. Ideally, it would be configurable in the front matter.
If not, maybe I'll roll up my sleeves and make an attempt to contribute.
If you add content in post or page that uses $ to indicate currency and there is more than one on a line it triggers renderMathInElement()
and converts the text to mathml.
So this content
They do qualify the comment by saying "As mobile games go," but the idea that paying $120 US a
year to play a game like Marvel Snap is "standard" is shocking. I think that I spent less than $10 Cnd
on [Core Defense and its single DLC](https://zacgaming.wordpress.com/2023/01/06/core-defense-an-appreciation/)
and while this is probably not a price that reflects that quality of the game
(and a topic for another post?) it is a long jump from $10US to $120US. And this is for a game that
has ridiculously priced IAPs as well. Marvel Snap is yet another in a long, long, long, long line of
"games" that have $100+ purchases you can make.
starts to have sections of it rendered as mathml starting and ending with the currency characters.
Even if you try to escape them the content still gets rendered as mathml
Hi
I am trying to build a sidebar menu with poison. I have the following declared in my config.toml file
menu = [
{Name = "About", URL = "/about/", HasChildren = false},
{Name = "Links", URL = "/links/", HasChildren = false},
{Name = "Recent Posts", URL = "/posts/", HasChildren = true, Limit = 5}
]
The pages are saved in the following structure
content /
about/
about.md
links/
links.md
When I view the site the About menu item works correctly but the Links item is a blank page with a "Links" title instead of the title I have defined in the links.md frontmatter
There is an index.html file at /content/links/links/index.html that is rendered but the file at /content/links/index.html has no content in it.
Any idea why that page would not be rendering? Also, any other test pages I add have the same issue.
Thanks
So after clicking on the name in the left hand menu and getting a list of all posts under menu, I am consistently being shown the wrong post dates on this page. The dates are perfect in the actual posts. I have tried every date format I can think of. The closest one I can find is yyyy-mm-dd. If I'm simply using the wrong format, it's a quick fix by adding into the default archetype file.
the link in the post pointing to the current series page is wrong
other posts in this series is showing wrongly in the post.
Possible Clone of #6
First of all, thanks for the great template @lukeorth! Very simple, minimalist and elegant!
Can't enable anything other than Posts
and Projects
in the sidebar. Specially, wanted to enable About
but it doesn't work.
Current Directory Structure:
>> tree
.
├── about
│ └── about.md
├── posts
│ ├── hello-world.md
│ └── reset.md
├── projects
│ ├── project-1.md
│ ├── project-2.md
│ └── project-3.md
└── test
├── test-1.md
└── test.md
Current config.toml file
baseURL = 'https://localhost'
languageCode = 'en-us'
title = 'Hugo'
theme = 'poison'
[params]
brand = "Testing Hugo" # name of your site - appears in the sidebar
description = "Random Thoughts"
dark_mode = false # optional - defaults to false
menu = [
{Name = "About", URL = "/about/", HasChildren = false},
{Name = "Posts", URL = "/posts/", Pre = "Recent", HasChildren = true, Limit = 5},
{Name = "Projects", URL = "/projects/"},
{Name = "Test", URL = "/test/"},
]
Adding "About" using different name for "project" works (see 5th line entry in menu items below). But, notice Test
still doesn't show up.
menu = [
{Name = "About", URL = "/about/", HasChildren = false},
{Name = "Posts", URL = "/posts/", Pre = "Recent", HasChildren = true, Limit = 5},
{Name = "Projects", URL = "/projects/"},
{Name = "Test", URL = "/test/"},
{Name = "About", URL = "/projects/", HasChildren = false},
]
Print sections: code modified in menu.html
Whoa, why is it appending "s" to the section names? Like "Abouts
", "Tests
" etc? This seems to be an issue.
If we update menu item URLs with "abouts" and "tests" then this finally displays the items.
menu = [
{Name = "About", URL = "/abouts/", HasChildren = false},
{Name = "Posts", URL = "/posts/", Pre = "Recent", HasChildren = true, Limit = 5},
{Name = "Projects", URL = "/projects/"},
{Name = "Test", URL = "/tests/"},
]
Hello. I have 2 posts.
First post has a date "2023-02-04". The post shows up on website.
Second post has a date "2023-02-05" The post doesn't show up on website.
If I switch the dates across posts, then only the post with an earlier date will be shown.
I can't create a new post because dates are somehow messed up, the only temporary fix for now is to remove the "date:" property on all posts completely, but then it says "January 1, 0001".
Please fix this.
On a fresh install of hugo and poison,
hugo (via brew): hugo v0.109.0+extended darwin/arm64 BuildDate=unknown
poison (via github): updated within the last 15 minutes.
The sidebar does not scroll at all, regardless of the state of the main / content section.
Unless the viewer zooms out / reduces the font size, they will not see the full content in the sidebar, such as the copyright and hugo / poison attribution.
Great Theme!!
hey sorry if this isn’t the right place for this. I didn’t see a link to a discord or anything.
I’ve created a simple blog using the theme
https://blog.roycedavis.net/
when I try to share a link on Twitter I don’t see an image. Is it easy to set a feature image on posts or maybe the brand image from the nav to show up like most sites do when you share them out?
Currently, the JS for katex is included in every page, regardless of the page using katex or not. This increases the size of the sent javascript considerably. (~200kb, or most of the example site). If its not possible to only conditionally insert katex, would it be possible to render it serverside? (as katex does support that)
I'm new to Hugo and I've tried to find a setting for this, but nothing has worked. On my index page, there are summaries of the posts, but they're collapsed. Spacing between paragraphs conveys some meaning, so it would be good if the collapsed summary retained that formatting. Is there a setting for keeping the formatting in the summary? Or showing the entire post on the summary?
I tried maxShownLines = -1
in my hugo.toml, as this seems to work with some themes, but as far as I could tell, not with Poison. Thank you for your help!
I'm new to site-development in Hugo so this may be my own ignorance, but when I click off of my site's intial homepage (such as clicking on a post) my brand image stops rendering.
I've updated config.toml "brand_image" line with a relative path to an image in my static/images directory, and it loads as expected on my homepage. However, then when I click on an individual post it disapears from the sidebar, replacing itself with the text "brand image."
I appreciate any guidance, and really appreciate the poison theme!
For privacy Enthusiast, They mostly use Matrix and XMPP for Communication.
I've already made it. Soon I'll commit it.
stroke="{{ .Site.Params.sidebar_bg_color }}"
If sidebar_bg_color is not explicitly set in the site's params, the mailto envelope icon is just a white rectangle. This should likely default to the same #202020 as used in the CSS. Alternatively, this could be hardcoded like every other social icon's stroke color.
menu = [
{Name = "About", URL = "/about/", HasChildren = false},
{Name = "Series", URL = "/series/", HasChildren = false},
{Name = "Posts", URL = "/posts/", Pre = "Recent", HasChildren = true, Limit = 10},
]
Hi there! I'm new to this Hugo and Posison template. I have an issue, I have this (above) configured on config.toml
but only About and Post are showing up in the side menu. The Series is not showing up or any other menu item I add.
Thanks in advance!
Ron
Hello,
I've setup your great Poison theme for gohugo, but it seems like the "Tabs" feature is broken and is not responding to click.
You can experience it directly from your demo: https://poison-theme.netlify.app/posts/introducing-poison/ trying to change tab doesn't work.
Thanks,
Sylvain
I want to show TOC in my about page.
Is the file katex.zip needed in static/katex.zip? There is also a directory with the same contents.
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.