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

CSS theming #16

Open
stoiandan opened this issue Oct 11, 2023 · 1 comment
Open

CSS theming #16

stoiandan opened this issue Oct 11, 2023 · 1 comment

Comments

@stoiandan
Copy link

Hi,

I was wondering if there is a way to specify, or to include a CSS file to the generated HTML, so that the page can be customized.
Thanks!

@markvincze
Copy link
Owner

Hi @stoiandan,

Thanks for showing an interest in the library and sending the question!

At the moment there is no built-in feature to include one extra CSS file.

But you can replace the whole HTML template, and then you can include an additional CSS in it, or adjust the existing CSS file.
This is not a documented feature at the moment, but I just tested it now, and it works, you need to do the following:

  • In the folder where you maintain your docs and have the sabledocs.toml file, you have to create a templates folder, and another folder inside it with a name you choose, like mynewtemplate
  • From the sabledocs repo, copy the contents of src/sabledocs/templates/_default into your templates/mynewtemplate folder.
  • In your sabledocs.toml, set the following field: template = "mynewtemplate" (the value should be the name you chose for the template folder)
  • Now you can freely adjust the template, either adjust static/mystyles.css directly, or you can include a new CSS file in base.html

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