Closed maximlt closed 1 year ago
Very cool, thanks! Could you make the header on the page fit on one line by putting the "Download project" link right-justified after the other items?
A full header may have multiple authors and two additional links (run notebook + open app). I also imagine we could add Twitter/LinkedIn share buttons.
Right now the header has authors + date on the first row and the links on the second row. This is using a flex component, they'll wrap on small screens.
I draw some inspiration from the article-info component provided by Sphinx-Design. I wish I could have reused it as is but it didn't quite fit our use case, I think.
Could you make the header on the page fit on one line by putting the "Download project" link right-justified after the other items?
You have no idea how long it took me to come up with this little header! :) And it's probably poorly designed.
What you're asking can certainly be done, I just don't really know how and I am sure it will take me way to long compared to the benefits we'll get from it :)
I need to merge this PR to work on the deployments. Let's revisit the header later.
Sure! :-)
This PR adds the machinery (relies on a non yet merged branch of nbsite) to add a metadata block at the beginning of each notebook page, that metadata being pulled from the anaconda-project.yml file.
Previously deployments were looked for by nbsite, by hitting potential endpoints and adding those that respond successfully. Instead of doing that a scheme is added to the
examples_config
entry to define the deployments. The metadata header will rely on that info to add or not links to the deployments.This PR also reworked on the assets are handled. The temporary assets folder (created by tasks, and then copied by nbsite to
buitdocs/
. It has this structure:assets
_archives
: project archives (e.g. boids.zip, ...)projectname
:assets
: assets (e.g. screenshot.png)It would be nice not to have to deal with the assets at all and delegate all to Sphinx. I did find a way to delegate the project archives to Sphinx using the
download:
role, but its UI was pretty bad so I reverted that. But I didn't find a way to handle the assets a project may have.The changes made to the assets avoid name clashes, as assets were all copied to a flat directory.