-
Notifications
You must be signed in to change notification settings - Fork 97
patches for democards branch #276
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
patches for democards branch #276
Conversation
By default DemoCards sort the demos by their filenames.
For unknown reasons, the generated files are still empty when calling `makedemos` unless we wrap the `jl` file with IOBuffer.
|
I think all the difficulties and tricks here come from the fact that demos are stored in the main Plots.jl repo. This isn't very friendly for new contributors. For instance, I don't want to build the entire documentation in 30mins when I only want to add one single demo file. DemoCards's solution is to I would suggest that legacy examples in Plots.jl repo be kept for unit test purposes only, and start PlotDocs' own version of demos and folder structures. |
|
Thank you for me helping me out with this!
Since we can't run visual regression tests for all the backends, eyeballing the generated examples and comparing them is currently our best method to test and compare backend functionality. Which is why we need a consistent order and keep things in sync with the Plots.jl repo. That said I am all in for an extra user or showcase gallery, but we don't need that for every backend I'd say and that should be added in another PR. |
* Create docs.yml * Delete .travis.yml * run on democards-branch * remove hyphens * a start * usable gr-examples * remove TagBot, add manual trigger to build * fix #src * disable notebook generation * specify order * fix animations * change back devbranch * add attributes, empty cards, fix assets * don't write to file for unicodeplots * add gaston workaround * Update docs.yml * generate demo page per backend (#275) * generate demo page per backend Instead of generating all backend demos in one demo page, this commit generates one page per backend. This makes exploring the demos easier. - entry "id" is added to resolve the url-link issue - notebook generation is disabled - attributes are generated as hidden page * Update PlotDocs.jl Co-authored-by: Simon Christ <SimonChrist@gmx.de> * disable link redirection, add consistent order * tweak configs * Update src/PlotDocs.jl Co-authored-by: Johnny Chen <johnnychen94@hotmail.com> * patches for democards branch (#276) * use default order for demos By default DemoCards sort the demos by their filenames. * wrap source cards generation using IOBuffer For unknown reasons, the generated files are still empty when calling `makedemos` unless we wrap the `jl` file with IOBuffer. * correct backend name titlecase * try bulmagrid theme * add a few DemoCards comments * use empty card description * debug: try to sleep a while after each demo generation * restore order Co-authored-by: Simon Christ <SimonChrist@gmx.de> * init order * mover order * don't skip writing files Co-authored-by: Johnny Chen <johnnychen94@hotmail.com>
Address some of the issues in #256 with some extra changes.
Briefly speaking,
DemoCards.makedemoswould parse the title, description, and other information from the demo files. Unless explicitly specified by the YAML frontmatter, the description is the first markdown paragraph, the title is the first H1 header. Title, description, cover image will be displayed as a card in the index page.This is strange and is perhaps system-related. I noticed that generated files produced by
generate_cardsare sometimes empty when passing tomakedemos. This makes DemoCards try to parsing information from empty files, and thus the title is inferred from their filenames, e.g.,GR_ref19. bf52b07 is an attempt for this; it improves the status but doesn't fix all the issues.This is because the theme will display the title, cover and description. By default the description is the first paragraph. e1bd117 fixes this by forcing an empty description. I thus used the "bulmagrid" theme and removed your custom
src/gallery.cssfile in c2c5bb0Extra changes:
contrib/demosin the future. If we want this then it is not convenient to use explicit order for the auto-generated demos, thus I removed theordersection in 2287f78Plotlyjs=>PlotlyJS.I still can't build the entire documentation for unknown reasons...; it just hangs forever... The following is the result of building GR and plotlyjs with bulmagrid theme. The layout looks okay to me.
cc: @BeastyBlacksmith