Comments (13)
It seems like yes, but you really would want it to be called index.rst, so that the root would work. I am making another test repository to narrow down the problem (it happens with only sphinx+sphinx-copybotton, so after I narrow down some more, I will report it to sphinx-copybutton while I continue investigating)
from sphinx-lesson.
After some investigation...
Looking at the source, this is the element of the copy button itself. It seems the icon is not showing, and instead the alt text is, which :
<img src="#_static/copy-button.svg" alt="Copy to clipboard">
Note the extra #
on it, so the image link doesn't work. My sites don't have that #
there. If I add the #
on my site, I get the same behavior as you see there.
I have no idea yet where that #
can come from. I downloaded that repository and built it myself, and it worked. Has it always been this way? I notice this directly has a code-block
inside of a signature
class, and I couldn't find any other examples of that. Could you try varying different things and see if you can find any other patterns of it occuring. Does it happen when building locally?
My current hope is there was some bug in some upstream version of libraries, which is fixed now, so this will go away by itself...
from sphinx-lesson.
I have tried to move the code block outside the signature
directive and it still shows the alt-text. It happens only for code blocks (or literal includes) in index.rst
anywhere else in the document the icon is shown correctly. It also happens when building through the GitHub action :(
from sphinx-lesson.
from sphinx-lesson.
Nope, it does not work locally either.
from sphinx-lesson.
Update!
make html
works on the main pagemake dirhtml
fails on the main page
Also index.rst
is the only document which keeps its name: all other get renamed to index.html
and put into a sub-directory, to have pretty URLs. This isn't the first error of an executablebooks project for the dirhtml builder, but I can't yet see how it could be a problem of sphinx-copybutton itself... I will investigate more.
from sphinx-lesson.
Reply from ENCCS/intermediate-mpi#42, since I commented on the wrong issue:
A-ha! Thanks for the detective work! So if we renamed index.rst to something else it would fix the problem?
from sphinx-lesson.
Many thanks for digging!
from sphinx-lesson.
I think it is a Sphinx problem. Debugging found here:
executablebooks/sphinx-copybutton#110
from sphinx-lesson.
Fixes for Sphinx and sphinx_rtd_theme:
But these require an upstream release to properly fix. Next up, local hackish command to do it.
from sphinx-lesson.
My workaround for fixing is this is currently
sed -i 's/url_root="#"/url_root=""/' _build/dirhtml/index.html || true
Let's see if it works for intermediate-mpi before I apply it here.
from sphinx-lesson.
It worked! Thanks!
from sphinx-lesson.
This is now fixed upstream in both sphinx and sphinx_rtd_theme. sphinx-book-theme is not affected. Other themes may possible need fixing, if they have copied the wrong code.
I think this workaround should be maintained for quite a while, though, since things will be slow to update everywhere, and we don't want to strongly tie to any particular versions.
Thanks for reporting this!
from sphinx-lesson.
Related Issues (20)
- "git checkout s-l-t/master -- conf.py" is outdated HOT 8
- Add .jupyter_cache/ to .gitignore
- Should this repo be a template repo? HOT 3
- Can we color boxes differently? HOT 17
- Dropdown boxes shown by default HOT 2
- Are the symbols emojis? Or something else? HOT 6
- How to make the side menu collapsible? HOT 5
- Is it possible to make the notebooks executable? HOT 13
- Automatic counters for challenges HOT 4
- Build problems on Python 3.9.2 HOT 8
- Unknown directive type "exercise". HOT 2
- Wrong link in PyP HOT 2
- cssname method now missing HOT 2
- exerciselist directive sometimes only shows the solution HOT 8
- The exercise list doesn't work with links in the exercises HOT 1
- error locally after upgrading sphinx_lesson HOT 4
- problem rendering math HOT 3
- Prompt (e.g. `$` is copied with sphinx-copybutton) HOT 1
- should `discussion` be included in the exercise list directive? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx-lesson.