Skip to content
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

Let extra_syntaxes_and_themes reference builtin syntaxes #2738

Open
wants to merge 16 commits into
base: next
Choose a base branch
from

Conversation

9999years
Copy link
Contributor

Closes #1607
Closes #1678

This lets syntax definitions in extra_syntaxes_and_themes reference builtin syntaxes (by scope: or include: or similar).

Unfortunately, re-building the SyntaxSet is rather expensive. On my (small) personal website, this makes Zola render my site in 469ms rather than 63ms — a slowdown of nearly 8x!

We could potentially mitigate this by serializing the computed SyntaxSet to a file, for example with a cached::DiskCache, but I don't see existing caching infrastructure so I'm not sure if that's a good tradeoff.

Is this wanted? The performance cost is not worth it with the current implementation, but maybe we can optimize it?


  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

Keats and others added 16 commits August 15, 2024 20:19
* feat: port zola release build to gh actions & support linux arm64

Signed-off-by: Henrik Gerdes <[email protected]>

* fix: add buildx support for multi-arch docker images

Signed-off-by: Henrik Gerdes <[email protected]>

* fix: pin gh release action to sha & allow pre-releases

Signed-off-by: Henrik Gerdes <[email protected]>

* fix: use env in gh action for linux arm build

Signed-off-by: Henrik Gerdes <[email protected]>

* chore: switch to dtolnay/rust-toolchain action for rust setup

Signed-off-by: Henrik Gerdes <[email protected]>

* fix: windows archive step

Signed-off-by: Henrik Gerdes <[email protected]>

---------

Signed-off-by: Henrik Gerdes <[email protected]>
Having a crate depend on files outside of its directory
breaks building Zola as a dependency using Nix
* Add pagination info to get_section

* Add documentation for pagination information

* Stick to section properties

`paginated` attributes removed
…nt (getzola#2688)

This adds semantic meaning to the footnotes organization and improves
accessibility by aiding disabled users who rely on assistive devices
such as screen readers which utilize semantic tags such as the footer
element in order to navigate properly.

The hr element is semantically defined as representing a paragraph-level
thematic break. Now that the footnotes are descendants of the footer
element, the hr element originally preceding the footnotes list is
no longer necessary (footnotes are no longer paragraph-level content)
and thus replaced. However, the footer element is given the class
"footnotes" to allow for styling, so the following CSS could be used to
provide a stylistically equivalent visible border separating the
footnotes from the content if so desired:

    .footnotes {
      border-top: 2px groove gray;
    }

Test snapshots are also updated to reflect the new footer elements.
* Add external links class option to Markdown configuration

* Validate external links class

* Rename external link test snapshots
…n-minify-html

* feat: do not minify js when minify html

* test: update tests
@Keats
Copy link
Collaborator

Keats commented Dec 18, 2024

That's a huge slowdown. Let's see if someone from syntect can weight in because that's too much IMO

@9999years
Copy link
Contributor Author

@Keats Yeah, agreed. I opened an issue upstream, we'll see what they think: trishume/syntect#562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extra syntaxes embedding built-in syntaxes fail Using embedding in custom sublime syntaxes causes panic