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

How to change the logoTitle font in the upper left? #298

Open
jiatongw opened this issue Apr 25, 2020 · 2 comments
Open

How to change the logoTitle font in the upper left? #298

jiatongw opened this issue Apr 25, 2020 · 2 comments

Comments

@jiatongw
Copy link

Hi, I am trying to change the logoTitle font in the upper left.
image
I tried the method mentioned in #7 , but it didn't work.

Could anyone help me on this? Thanks!

@big-mon
Copy link
Contributor

big-mon commented Jan 6, 2021

Try Edit in /assets/sass/_custom/_custom.scss

$logo-font-family: FONT_FAMILY_NAME_HERE;

My website, it's work.

@casperl
Copy link

casperl commented Jan 3, 2022

Update: There is something called Hugo-extended that allows you to work with SASS etc.

Uninstalling the Ubuntu snap for Hugo and re-installing with

sudo snap install hugo --channel=extended

This fixed this problem.


This is not working for me either. The SCSS is not being updated for the Hugo server serving to localhost:1313 and at this stage I have run out of ideas.

  1. In config.toml I set:

customCSS = ['custom.css']

  1. In ./themes/jane/assets/sass/_custom/_custom.scss I set $logo-font-family to the same as the default font.

Running sass jane.scss | less I get the code below for the logo class which indicates that the code in 2) is correct.

image

  1. Viewing the temporary css file served by the Hugo server to localhost after getting that file name from viewing the page source, I get this line which is the old line:

.logo-wrapper .logo{font-size:36px;font-family:cursive,LiSu,sans-serif}

I don't understand the mechanism whereby sass files are compiled or updated by Hugo, but I assume it happens sort of automatically. I searched for an actual css file that I could create manually, but could not locate such a file therefore I assume Hugo is responsible for the conversion from scss to css.

This reference does appear in the page source:

<link rel="stylesheet" href="/css/custom.css">

However attempting to view that custom.css file it does not exit and returns a 404 error.

I am running Ubuntu 20.04 with the latest Hugo v0.91.2 as a snap package and I have installed sass from the Ubuntu repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants