![]() ![]() For example if you search for css on the browser sends a GET request to /search?q=css&abunchoftrackingjunk (this is how form submissions work). More specifically they extract them from the search parameters (the bit after a ?). ![]() Most search engines (including Google) take search queries as part of the URL. If you just want the code you can see it on GitHub. This article goes into a lot of detail about how I built this feature. Luckily the DuckDuckGo search engine made it super easy to add custom site search. I didn't want to spend much time on this, and I definitely didn't want to change my site's architecture or goals (fully static HTML/CSS with as little JS as humanly possible). I don't have a ton of articles published, but as I start to add more shortform notes and bookmarks it will get harder to track down specific blog posts, so a search feature felt helpful. My site's new design has a searchbar front-and-centre. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |