Repository navigation
feat: search, tags, RSS and SEO files - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stage 4: search, tags, RSS and SEO files.
Changes
enandruanalyzers by postlang. Field boosts: title > tags > description > body. Fuzziness depends on word length (0 / 1 / 2), plus prefix match on the last word. Query is built in code, capped at 200 characters and 10 terms. Snippets are sanitized down to<mark>.GET /search?q=&tag=&page=works without JS and hasnoindex.static/search.jsswaps the results while you type (debounced,history.replaceState)./tags/<tag>is paginated. Chips on cards and posts use 24 hash-based hue buckets. A test checks WCAG AA contrast (≥ 4.5) for every bucket in both themes./rss.xml:content:encoded, with absolute URLs;dc:creatorfromAUTHOR_NAME;atom:updatedandatom:link rel=self.cover, elseDEFAULT_OG_IMAGE);BlogPostingfromjson.Marshal;/sitemap.xml,/robots.txt,/llms.txt,/posts/<slug>.md,/<INDEXNOW_KEY>.txt.width/heightare read from the mirror (PNG, JPEG, GIF, WebP viagolang.org/x/image, SVG). Any asset change re-renders all posts.AUTHOR_NAME(defaultSITE_NAME);DEFAULT_OG_IMAGEmust be a file insideassets/;INDEXNOW_KEYformat is checked.Checks
go vet,staticcheck,govulncheckandgo test -raceall pass. govulncheck reports onegolang.org/x/cryptoadvisory in a module, but our code does not call it.FuzzSearch,FuzzSVGSize,FuzzParse..mdchecked with curl.Not checked
RATE_LIMIT_SEARCHcomes in stage 5./searchis unlimited until then; the code has ashortcut:comment.