huyb1991 / hugo-lamp

A light Hugo AMP responsive theme for blogger ⚡.
https://themes.gohugo.io/theme/hugo-lamp/
MIT License
53 stars 28 forks source link

add emoji and a custom css #67

Closed alastor2831 closed 4 years ago

alastor2831 commented 4 years ago

Hi. Any idea on how i can add emoji in the title/subtitle of my website? I know I can change the these parameters in the config.toml but is there a shortcut to add emoji?

Was also wondering how do I go to add a custom css on top of the default ones, just to change a few colors and backgrounds. I looked into the styles folder but I only see scss files and I'm not sure how I could load mine.

alastor2831 commented 4 years ago

I managed to do both:

  1. To enable emoji just add enableEmoji = true to the config.toml and then also add | emojify to the string {{ .Site.Params.subtitle}} in the header.html

  2. To add a custom css I added <link href="/css/custom.css" rel="stylesheet"> at the end of the head.html and then created a custom.css file in public/css

huyb1991 commented 4 years ago

@nickeatingpizza

  1. For emoji, you're doing correct way follow this PR: https://github.com/gohugoio/hugo/pull/1892 - This related to Hugo and markdown template.

  2. Your way can work, but not best practice, because 2 css files, and your custom will override styles. I build sass system for template, you can update styles by your own in sass files by update variable colors at _variables.scss, then run build script.

Hope this help.

alastor2831 commented 4 years ago

@huyb1991 Thanks for the reply! I figured that my css solution was not the cleanest but for now I think I'll keep it cause I don't have time to learn sccs (I'm using RStudio and blogdown to make my website). Can I ask you if you are still developing this theme? If so, do you plan on making a dark version of the theme (with a toggle to switch between the bright one?)

huyb1991 commented 4 years ago

@nickeatingpizza I'm busy on other project, no plan to adding dark theme yet, PR's welcome.