getgrav / getgrav/grav-plugin-highlight

How to disable this plugin on error pages?

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
29
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Hello!

Is there a way to disable this plugin on error pages?

I created a error folder in my pages, with template: error, as my theme has a error.html.twig template. It's working great to replace the error page from the default Error plugin. But, even if I put

```
highlight:
enabled: false
```

in the frontmatter, the js and css of Highlight are loaded.

If I make this error page routable and go to mysite.xyz/error, I can see that the js and css are *not* loaded.

Maybe I'm not using the right way to customise my error page, but I found close to nothing about that in the documentation :(

Thanks in advance.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the error folder, error.html.twig template, and the Highlight frontmatter setting described in the report. Compare the routable /error page with the custom error page and trace how the Error plugin handles each; done means the JavaScript and CSS are not loaded when highlighting is disabled on error pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.