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

[Help]Using Google Fonts with Elegant #606

Closed
1 task done
nandac opened this issue Apr 11, 2020 · 3 comments
Closed
1 task done

[Help]Using Google Fonts with Elegant #606

nandac opened this issue Apr 11, 2020 · 3 comments
Labels

Comments

@nandac
Copy link

nandac commented Apr 11, 2020

  • I am using latest production release of Elegant

I am trying to use Google fonts with elegant, but I am not sure how I would modify the HTML header in base.html to add the Google Fonts in the section.

You recommend not changing the templates code as it is a maintainability nightmare which I agree with. What would the best way to do this?

Is overriding a template possible? Such as overriding base.html so that I can just add my customizations have that be taken as the new base.

Kindly let me know.

Thanks in advance.

@talha131
Copy link
Member

Elegant already has a Google font. See the code here.

You can use custom.css to override it.

Can you tell me why you want to change the font?

@nandac
Copy link
Author

nandac commented Apr 12, 2020

Thank you @talha131 for your reply.

My friend is moving over his site from another platform and likes your theme but he is very particular about fonts and typography.

He wishes to use the Noto Serif font and I wanted to know how I would go about it. Usually, I would have to add the link rel attribute of a Google Font to the of the document to be able to use it.

But does your theme download whatever font the user wants to use just by changing the custom CSS without specifying a specific link rel? Please tell me how this works and demystify me.

Lastly, I have a question about overriding templates. Let us say I wanted to be able to order the links on the navigation bar in a particular way and need to add some jinja code. I do not want to go into your theme's template and do this, instead, I would like to specify my own base.html and make the theme use that. How would I go about this?

I am newbie to Pelican and am just trying to help a friend out with his website and learning as I am going along.

Cheers.

@talha131
Copy link
Member

But does your theme download whatever font the user wants to use just by changing the custom CSS without specifying a specific link rel? Please tell me how this works and demystify me.

You do not need to modify <head> to get Google font. You can import the fonts in CSS.

https://stackoverflow.com/a/14676665/177116

Let us say I wanted to be able to order the links on the navigation bar in a particular way

We plan to add this feature in our next major release. #139

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

No branches or pull requests

2 participants