Fix: Always load nojs.css
irrespective of build_search_index
setting
#131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the
nojs.css
file is only loaded whenconfig.build_search_index
returns false. This file is responsible for hiding JavaScript elements when JavaScript is disabled in the user's browser.In practice, this means JavaScript elements like the theme switcher button or the encoded email (in the socials section) are mistakenly visible when JavaScript is disabled, as long as
build_search_index
is not set totrue
inconfig.toml
. This is contrary to the expected behavior where these elements should be hidden when JavaScript is disabled, irrespective of thebuild_search_index
setting.This PR fixes this issue by removing the conditional, effectively ensuring that the
nojs.css
file is always loaded when JavaScript is disabled. This change aligns the behavior with the intended functionality of hiding specific JavaScript-dependent elements when JavaScript is not enabled.