adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
9.72k stars 2.62k forks source link

feat: remove json index on search-hidden pages #1499

Open Singularity0909 opened 5 months ago

Singularity0909 commented 5 months ago

What does this PR change? What problem does it solve?

To remove JSON index on the page set search-hidden param as true.

Was the change discussed in an issue or in the Discussions before?

No.

PR Checklist

I'm not sure about the last check item.

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Singularity0909 commented 5 months ago

How does this affect Search? json schema has no effect on search.

For context searchHidden is to hide pages from site's search index and not for any search engine's

@adityatelange Thanks for reviewing. In my view, currently the JSON index only works for blog searching, and it will be useless when the search function is turned off.

Sometimes I need to encrypt partial content of my blog pages.

https://github.com/Li4n0/hugo_encryptor

Through this tool, some parts of an article will be encrypted with AES and encoded into base64. However, JSON of the entire original content in the header of the webpage cannot be encrypted, which may be spied on.