[go: nahoru, domu]

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

Recommended way to use custom css with Archie #14

Closed
francisbarton opened this issue Oct 3, 2020 · 2 comments
Closed

Recommended way to use custom css with Archie #14

francisbarton opened this issue Oct 3, 2020 · 2 comments

Comments

@francisbarton
Copy link
Contributor
francisbarton commented Oct 3, 2020

Hi there
I am interested in adding a custom css file to make tweaks to my site's appearance. I think it is more sensible to work with a separate file rather than editing the built-in css files (main and dark). Please would you suggest a suitable place to put this file and how to link to it from config.toml so it can be read appropriately? Or is this not possible with this theme?

I've put a line under [params] in config.toml like this:

customCSS = "css/archie_tweaks.css"

but I don't think the theme is set up to include this? I have a file static/css/archie_tweaks.css with a couple of changes in it.

It would be great to have some clarification or guidance.
Thank you.

@athul
Copy link
Owner
athul commented Oct 4, 2020

Hey, Custom CSS isn't implemented yet, but it's easy to do so. Here is the code. Also add a customCSS key in the config.toml file for it to fully work

{{- if isset .Site.Params "customcss" }}
		<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}{{ .Site.Params.customCSS }}" />
{{- end }}

Just paste the code in https://github.com/athul/archie/blob/master/layouts/partials/header.html

It would also be great, If you would like to send a PR for the same:smile:

Cheers,
Athul

athul added a commit that referenced this issue Oct 4, 2020
Add custom CSS option - fixes issue #14
@athul athul closed this as completed Oct 4, 2020
@francisbarton
Copy link
Contributor Author

Thank you Athul!

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

2 participants