{"id":15462690,"url":"https://github.com/devidw/hugo-theme-component-search","last_synced_at":"2026-01-07T14:06:39.095Z","repository":{"id":105128535,"uuid":"469197394","full_name":"devidw/hugo-theme-component-search","owner":"devidw","description":"Make your hugo blog posts searchable.","archived":false,"fork":false,"pushed_at":"2022-03-13T18:58:26.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T21:04:24.687Z","etag":null,"topics":["hugo-search","hugo-theme-component","search"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devidw.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-03-12T20:51:03.000Z","updated_at":"2024-09-08T15:47:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"8dab7b33-0ce1-44b4-83f8-0eb4e5cb4322","html_url":"https://github.com/devidw/hugo-theme-component-search","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"9704688fdb06893af63186975f1be1e40b64cf94"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devidw%2Fhugo-theme-component-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devidw%2Fhugo-theme-component-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devidw%2Fhugo-theme-component-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devidw%2Fhugo-theme-component-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devidw","download_url":"https://codeload.github.com/devidw/hugo-theme-component-search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246017725,"owners_count":20710240,"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":["hugo-search","hugo-theme-component","search"],"created_at":"2024-10-02T00:03:29.500Z","updated_at":"2026-01-07T14:06:39.090Z","avatar_url":"https://github.com/devidw.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"= Search\n\nMake your hugo blog searchable by simply search for blog posts in the auto-generated RSS feed file `index.xml`. \n\nNo need to generate extra `.json` search index files.\n\nSince the theme component looks for the RSS feed file, make sure you have it available in your builded site.\n\n== Installation\n\n=== 1. Add submodule\n\nClone this theme component to your project's `themes` directory:\n\n[source,cmd]\n----\ngit submodule add https://github.com/devidw/hugo-theme-component-search ./themes/hugo-theme-component-search\n----\n\n\n=== 2. Add config\n\nAdd this theme component to your list of themes inside your project's `config` file (either `.yaml`, `.toml` or `.json`):\n\n|===\n| Format | Syntax\n\n| `config.yaml`\na|\n[source,yaml]\n----\ntheme: \n  - \"…\"\n  - \"hugo-theme-component-search\"\n  - \"…\"\n----\n\n| `config.toml`\na| [source,toml]\n----\ntheme = [\"…\", \"hugo-theme-component-search\", \"…\"]\n----\n\n| `config.json`\na| [source,json]\n----\n\"theme\": [\"…\", \"hugo-theme-component-search\", \"…\"]\n----\n|===\n\n\n\n=== 3. Embed theme component\n\n\n==== Partial(s)\n\nInclude the available theme component partial(s) in your theme's template file(s):\n\n[source,html]\n----\n\u003c!-- ... --\u003e\n\n{{ if templates.Exists \"partials/vendor/devidw/search/include.html\" }}\n    {{ partial \"vendor/devidw/search/include.html\" . }}\n{{ end }}\n\n\u003c!-- ... --\u003e\n----\n\n\n== Examples\n\n=== Standalone search page\n\nYou can embed the partial everywhere you want in to appear on your site.\n\nIf you want to have a standalone search page, you can create a page template for your search page. \n\nTo do so, create a `search/single.html` template file in your theme's `layouts/` directory.\n\nNOTE: `search` can be any name you want.\n\nInside the template file, include the partial as mentioned above.\n\nYou propably want to wrap the partial inside a block definition block to extend your main layout:\n\n[source,html]\n----\n{{define \"main\"}}\n  {{ if templates.Exists \"partials/vendor/devidw/search/include.html\" }}\n    {{ partial \"vendor/devidw/search/include.html\" . }}\n  {{ end }}\n{{ end }}\n----\n\nNOTE: Make sure to adjust the block name to your needs, if you main block is not named `main`.\n\nWhen you have set up the template file, you can create the actual search page by creating a `search.adoc` file in your `content/` directory.\n\nNOTE: `search.adoc` can be any valid hugo content file name. For example, `search.md` or `search.html` are just fine as well.\n\nAdd the following frontmatter to your `search.adoc` file:\n\n[source,yaml]\n----\ntitle: \"Search\"\ndescription: \"Quickly find what you are looking for.\"\ntype: \"search\"\n# ...\n----\n\nNOTE: The `type` frontmatter is important. It is used to determine the page type. Any other frontmatter can be specified as you wish.\n\nYou should now have a standalone search page accessible under the address based on your permalink settings.\n\n***\n\n_This https://gohugo.io/hugo-modules/theme-components/[hugo theme component] was scaffolded with the https://github.com/devidw/cookiecutter-hugo-theme-component[cookiecutter-hugo-theme-component] template._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevidw%2Fhugo-theme-component-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevidw%2Fhugo-theme-component-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevidw%2Fhugo-theme-component-search/lists"}