Issue #1321 on hold

Must change custom CSS reference each time change is made

created an issue

My custom theme inherits Agogo; CSS is named "agogo.css_t", but must change reference in custom layout.html from <link href="../_static/agogo.css"> to <link href="../_static/agogo.css_t"> or vice-versa every time a change must be made.

This may be my error from not having 'make' installed for "make html", so "sphinx-build" is always run instead.

Comments (11)

  1. Georg Brandl repo owner

    css_t files should be automatically templated (and renamed to css afterwards). I just tested this with a css file in a custom static directory (referenced by html_static_path config value). Where does your agogo.css_t come from? If you don't need the templating, you don't need to call it css_t.

    "make" or "sphinx-build" does not matter; the Makefile is just a very thin shell.

  2. Alex reporter

    The file it inherits is located at "/Library/Python/2.7/site-packages/sphinx/themes/agogo/static/agogo.css_t", but I'm guessing you're asking about my custom file. That file is within my ~/[some_more_subfolders]/project/mytheme/mytheme/_static directory (not the project/_static directory.

    The html_static_path config value is set to ['mytheme/mytheme/_static']. The html_style value is set to 'agogo.css_t.css'.

  3. Georg Brandl repo owner

    Ok. Is there actually a Sphinx theme at mytheme/? (I.e., it has a theme.conf file) In that case the subdirectory would need to be called static (no underscore) and you don't have to add it to the static_path yourself.

  4. Georg Brandl repo owner

    OK, and you selected "mytheme" in the html_theme config value? Then this should actually work and rename agogo.css_t to agogo.css (and expand templates) while building.

  5. Alex reporter

    Yes, "mytheme" is the value for the html_theme setting in the main config file.

    I changed the _static folder in mytheme/mytheme to static, but also had to change the stylesheet value to agogo.css_t from agogo.css_t.css in my theme.conf file. I did a simple style change to see if it worked, and it did, but a further change does not get applied, so it appears I'm still in the same position I was before. I might change the stylesheet value back in theme.conf since that wasn't part of your suggestion but something that looked wrong to me now that I'm revisiting this project.

  6. Georg Brandl repo owner

    OK. At this point I think it would be best to send in a minimal test project (e.g. zipped) and I can try figure out what happens.

    Alternately, you can have a look at the minimal project I'll attach here.

  7. Log in to comment