{"id":19564493,"url":"https://github.com/dioxuslabs/dioxus-search","last_synced_at":"2025-04-27T00:33:02.981Z","repository":{"id":183780327,"uuid":"668930376","full_name":"DioxusLabs/dioxus-search","owner":"DioxusLabs","description":"[moved]: Integrate a search index into your dioxus projects","archived":true,"fork":false,"pushed_at":"2025-02-05T00:02:40.000Z","size":40,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T02:46:47.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/DioxusLabs/docsite/tree/main/packages/search","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DioxusLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-21T00:14:55.000Z","updated_at":"2025-04-04T03:05:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c0a4728-d6cc-44bb-b5e9-ab55de8aa2f5","html_url":"https://github.com/DioxusLabs/dioxus-search","commit_stats":null,"previous_names":["dioxuslabs/dioxus-search"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DioxusLabs%2Fdioxus-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DioxusLabs%2Fdioxus-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DioxusLabs%2Fdioxus-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DioxusLabs%2Fdioxus-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DioxusLabs","download_url":"https://codeload.github.com/DioxusLabs/dioxus-search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251073596,"owners_count":21532005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T05:22:15.569Z","updated_at":"2025-04-27T00:33:02.969Z","avatar_url":"https://github.com/DioxusLabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# This crate has moved!\n\nhttps://github.com/DioxusLabs/docsite/tree/main/packages/search\n\n# Dioxus Search\n\nDioxus search creates a prebaked search index for all your static Dioxus routes.\n\nIt integrates with the Dioxus router to find all the static routes in your application and search for any rendered HTML files for those files.\n\nExample:\n\n```rust\n#[cfg(feature = \"ssr\")]\n{\n    // Generate all static routes in the ./static folder using Dioxus fullstack\n    // ...\n\n    // Create search index\n    dioxus_search::SearchIndex::\u003cRoute\u003e::create(\n        \"searchable\",\n        dioxus_search::BaseDirectoryMapping::new(\"./static\")\n    );\n}\n\n// After the first build the search index is cached at compile time inline in your program\nstatic SEARCH_INDEX: dioxus_search::LazySearchIndex\u003cRoute\u003e = dioxus_search::load_search_index! {\n    \"searchable\"\n};\n\n\n#[component]\nfn Homepage() -\u003e Element {\n    let search_text = use_signal(String::new);\n    let results = SEARCH_INDEX.search(\u0026search_text.get());\n\n    render!{\n        input {\n            oninput: move |e| {\n                search_text.set(e.value.clone());\n            },\n            value: \"{search_text}\",\n        }\n        ul {\n            for result in results.map(|i| i.into_iter()).ok().into_iter().flatten() {\n                li {\n                    Link {\n                        target: result.route.clone(),\n                        \"{result:#?}\"\n                    }\n                }\n            }\n        }\n    }\n}\n```\n\nFor a full working demo, see the [searchable example](./examples/searchable/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdioxuslabs%2Fdioxus-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdioxuslabs%2Fdioxus-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdioxuslabs%2Fdioxus-search/lists"}