summaryrefslogtreecommitdiff
path: root/doc/_static
Commit message (Collapse)AuthorAgeFilesLines
* Overhaul demo and support running it locally (#2141)amitkummer2022-05-212-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Make target for building Pyodide with currently checked out Pygments Add a target to the documentation's Makefile to make Pyodide with Pygments from the current checkout. Additionally, use this target when building the documentation with the demo page. The new target works by building Pyodide on a Docker container, and then exporting the build artifacts back to the host. The Dockerfile used by the new target is based on the Dockerfile which was used for building Pyodide on the CI: https://github.com/pygments/pyodide-artifacts/blob/master/container/Dockerfile The main difference between the two is that the new Dockerfile uses the newest Pyodide base image, which is built by a repository which is actively maintained (the Iodide project is no longer maintained). The purpose of this change is to allow running the demo locally, which was not possible previously, as Pyodide was only built by the CI when deploying to Github Pages. * Add instructions on how to run the demo locally to the README * Update demo to work with Pyodide v0.20 Remove usage of Pyodide functionality which was deprecated in Pyodide v0.17: - Loading Pyodide using `languagePluginURL` and `languagePluginLoader`. - Access to globals via `pyodide.globals.x` has changed to `pyodide.globals.get("x")`. Source: https://pyodide.org/en/stable/project/release-notes/v0.17.0.html?highlight=languageplugin#api-changes * Fix #2137 * Fix use of `styles` variable before it's defined The `styles` variable was being used before it's value was set (which is done when Pyodide finishes loading). * Remove GitHub action for building Pyodide This action is obsolete, as building Pyodide is now done using `make pyodide`. * Upgrade Pages deployment action version * Add to .dockerignore all files in .gitignore * Change `pyodide` target to be a phony target
* demo: remove Highlight button (update automatically)Martin Fischer2021-12-262-16/+49
|
* demo: limit height of formatted code (overflow)Martin Fischer2021-12-261-2/+15
| | | | | | For large files it's better to have a viewport because then you can view both the form as well as the part of the output you are interested in at the same time.
* demo: display warning for styles with poor contrastsMartin Fischer2021-12-262-0/+11
|
* demo: support tokens formatterMartin Fischer2021-12-263-7/+59
|
* demo: save and load style to/from URLMartin Fischer2021-12-261-16/+24
|
* demo: streamline interface (and improve accessibility)Martin Fischer2021-12-261-0/+8
| | | | | | | | | | * "Try out Pygments!" is more descriptive than "Try it out!" * Moved the description of the implementation to the end. * Added a <noscript> tag suggesting `pip install` and pygmentize. * Added a <label> for the textarea. * Disable spell checking for the textarea. * Reduced the scope of the reset button to the file input. * Added autofocus for the language select.
* demo: fix lexer guessing based on filenameMartin Fischer2021-12-262-14/+10
|
* demo: use URLSearchParams browser APIMartin Fischer2021-12-261-19/+8
|
* demo: clean up markupMartin Fischer2021-12-261-0/+1
|
* demo: instantly apply style changes by avoiding re-lexingMartin Fischer2021-12-263-8/+27
|
* demo: guess lexer if none selectedMartin Fischer2021-12-263-36/+68
|
* demo: disable copy link when URI too long for web serverMartin Fischer2021-12-261-3/+15
|
* demo: stop using deprecated Document.execCommand()Martin Fischer2021-12-261-9/+8
| | | | Use the modern navigator.clipboard API instead.
* demo: stop blocking main thread by using web workerMartin Fischer2021-12-262-40/+59
| | | | | | | | | | Previously highlighting a large file with a complex lexer just hung the whole browser tab (meaning you couldn't interact with the page anymore). This commit outsources the higlighting to another thread by using a web worker. Depending on web workers shouldn't reduce browser compatability since the page already depends on WASM (and according to caniuse.com any browser that supports WASM also supports web workers).
* demo: make form usable while Pyodide is loadingMartin Fischer2021-12-262-42/+22
| | | | | | | | | | | | | | Previously the form could only be filled out after Pyodide finished loading (since the <select> options were generated via Pyodide). This commit changes this, so that the <select> options are already in the static HTML. The "Loading Python..." form overlay is removed, instead just the Highlight button is disabled, letting users fill out the form while Pyodide is loading. When a ?code query parameter is given a "Loading Python..." message is displayed below the form, since in that case users probably want to wait for the highlighted code (instead of filling out the form).
* demo: Sort options in lexer select (#1958)Martin Fischer2021-11-171-0/+1
|
* doc/demo: add ability to highlight text given in url query; copy link featureGeorg Brandl2020-12-162-1/+47
|
* demo: rebuild WASM with every pushGeorg Brandl2020-09-011-3/+0
|
* demo: show Pygments version in useGeorg Brandl2020-09-011-0/+3
|
* make download feature more compatible, credit to PyodideGeorg Brandl2019-11-242-9/+16
|
* add feature to download generated HTMLGeorg Brandl2019-11-241-0/+12
|
* add pyodide-based demo for the websiteGeorg Brandl2019-11-243-0/+119
|
* Update hg/bitbucket -> git/github everywhere.Georg Brandl2019-11-101-0/+0
|
* merge default into stableGeorg Brandl2016-01-173-0/+0