You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
When you run the site npm run dev and you load it on the browser you get this error:
NotFound [Error]: Not found: /favicon.ico
at resolve (/home/josecelano/Documents/git/committer/me/github/torrust/torrust-website/node_modules/@sveltejs/kit/src/runtime/server/respond.js:483:13)
at resolve (/home/josecelano/Documents/git/committer/me/github/torrust/torrust-website/node_modules/@sveltejs/kit/src/runtime/server/respond.js:277:5)
at #options.hooks.handle (/home/josecelano/Documents/git/committer/me/github/torrust/torrust-website/node_modules/@sveltejs/kit/src/runtime/server/index.js:49:56)
at Module.respond (/home/josecelano/Documents/git/committer/me/github/torrust/torrust-website/node_modules/@sveltejs/kit/src/runtime/server/respond.js:274:40)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: 404
}
NotFound [Error]: Not found: /blog/favicons/favicon.ico
at resolve (/home/josecelano/Documents/git/committer/me/github/torrust/torrust-website/node_modules/@sveltejs/kit/src/runtime/server/respond.js:483:13)
at resolve (/home/josecelano/Documents/git/committer/me/github/torrust/torrust-website/node_modules/@sveltejs/kit/src/runtime/server/respond.js:277:5)
at #options.hooks.handle (/home/josecelano/Documents/git/committer/me/github/torrust/torrust-website/node_modules/@sveltejs/kit/src/runtime/server/index.js:49:56)
at Module.respond (/home/josecelano/Documents/git/committer/me/github/torrust/torrust-website/node_modules/@sveltejs/kit/src/runtime/server/respond.js:274:40)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: 404
}
… other minor errors
f7a737b Add search bar, fix storybook, fix other minor errors (Graeme Byrne)
Pull request description:
## Search Bar
This setup creates a `SearchBar` component that allows users to search for blog posts based on what they input into a search bar which appears in the `Header` on all pages. The functionality works as below:
* `types.ts` defines the structure of a `BlogPost`, including properties like tags, excerpt, title, etc. This type is then imported into other files to ensure consistency in data handling.
* `+layout.ts` in the root imports `filteredPosts` from a data source (`$lib/data/blog-posts`) and exports an async function `load()` that returns the filtered posts.
* `+layout.svelte`, also in the root, imports `BlogPost` type and receives data containing posts. It passes this data down to the `Header` component.
* The `Header.svelte` component contains the search bar UI. It imports the `BlogPost` type and receives an array of posts. When a user interacts with the search bar, it emits a search event. It also imports `SearchBar.svelte`, where the actual search logic resides.
* The `SearchBar.svelte` component handles the search functionality. It imports `BlogPost` type and receives an array of posts. It uses FlexSearch to create an index of posts and then performs a search based on the user input. The search results are updated dynamically as the user types.
* The `search.ts` module contains the search logic. It imports the `BlogPost` type and defines functions to create an index of posts (`createPostsIndex`) and search this index (`searchPostsIndex`). The `createPostsIndex` function initialises a FlexSearch index and adds each post to it, while the `searchPostsIndex` function performs a search based on the user input and returns the matching posts.
## Previous and Next Posts
In the `PrevNextPost.svelte` component which appears below each blog post, I switched previous and next post to make it natural by the user accessing newer posts by clicking right and older posts by clicking left.
## Storybook
Fixed errors in Histoire mentioned [here](https://github.com/torrust/torrust-website/issues/104#issuecomment-2129433448) by updating dependencies.
## Favicon error
Fixed error mentioned [here](https://github.com/torrust/torrust-website/issues/160) by fixing the file path in the `href` as below:
Before:
````
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
````
After:
````
<link rel="icon" type="image/x-icon" href="/favicons/favicon.ico" />
````
## Links error
Fixed error mentioned [here](https://github.com/torrust/torrust-website/issues/167) by finding `links` in the Table of Contents for `Containerizing Rust Applications` and `Deploying Torrust To Production` wasn't working due to a lack of `#` so changed from
```
- [Links](links)
```
to
```
- [Links](#links)
```
ACKs for top commit:
josecelano:
ACK f7a737b
Tree-SHA512: 9fd200946da04386fdb8f4b9ba84be36c771e1bd25e5c9e25d59558d1fd9d68082552e64323971fda1d2b5e2ff089b4b3df3cb4314b037f2bdd9ffa955b43e71
When you run the site
npm run dev
and you load it on the browser you get this error:However, in production there is a favicon:
https://torrust.com/favicons/favicon.ico
The text was updated successfully, but these errors were encountered: