The search results page template
It's time to create the third template for our wiki project. Create a new file and name it search-results.ejs
. As with the previous template, make sure you keep the name the same or update the value in _data.json
for this template. Before we jump into coding the page, let's see what it will look like when we're done:
You'll notice that the search results page is similar to our other pages, but with one major difference. It has a different sidebar. Previously, I had you creating a second sidebar file and as part of this section. We will code it and insert it into the layout. In the case of the search results page, it has some specific search-related content and filters that we want to show in place of the regular categories. That's why I've created a second sidebar for this template.
Updating the page title
Before you jump into the body of the page, you'd want to change the <h1>
tag to search results. In this case, we won't have an Edit button, so the only...