{"id":26962272,"url":"https://github.com/unicolored/jekyll-meilisearch","last_synced_at":"2026-02-26T06:35:46.342Z","repository":{"id":283556346,"uuid":"952148824","full_name":"unicolored/jekyll-meilisearch","owner":"unicolored","description":"Indexes your jekyll’s content into Meilisearch","archived":false,"fork":false,"pushed_at":"2025-03-30T21:27:26.000Z","size":62,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T21:29:47.480Z","etag":null,"topics":["jekyll","jekyll-plugins","meilisearch","rubygems"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/unicolored.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"unicolored","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"unicolored","thanks_dev":null,"custom":null}},"created_at":"2025-03-20T20:10:34.000Z","updated_at":"2025-03-21T16:46:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"b423fa5a-0a16-43fc-a2df-8b2ca0b5c52a","html_url":"https://github.com/unicolored/jekyll-meilisearch","commit_stats":null,"previous_names":["unicolored/jekyll-meilisearch"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicolored%2Fjekyll-meilisearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicolored%2Fjekyll-meilisearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicolored%2Fjekyll-meilisearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicolored%2Fjekyll-meilisearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unicolored","download_url":"https://codeload.github.com/unicolored/jekyll-meilisearch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045225,"owners_count":21038552,"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":["jekyll","jekyll-plugins","meilisearch","rubygems"],"created_at":"2025-04-03T05:19:37.768Z","updated_at":"2026-02-26T06:35:46.337Z","avatar_url":"https://github.com/unicolored.png","language":"Ruby","funding_links":["https://github.com/sponsors/unicolored","https://buymeacoffee.com/unicolored"],"categories":[],"sub_categories":[],"readme":"# Jekyll Meilisearch Plugin\n\nA Jekyll plugin that indexes your site’s content into Meilisearch, a fast and lightweight search engine. This plugin supports incremental indexing, ensuring efficient updates by only syncing changes between your Jekyll site and Meilisearch.\n\n[![Gem Version](https://badge.fury.io/rb/jekyll-meilisearch.svg)](https://badge.fury.io/rb/jekyll-meilisearch)\n\n## Features\n- Indexes Jekyll collections (e.g., posts, pages) into Meilisearch.\n- Incremental updates: adds new documents, deletes obsolete ones, and skips unchanged content.\n- Configurable via _config.yml: customize fields, collections, and ID formats.\n- Robust error handling with retries and fallback to full indexing if needed.\n- Pagination support for large sites.\n\n## Installation\n\nAdd the gem to your Jekyll site’s Gemfile:\n\n```ruby\ngem \"jekyll-meilisearch\"\n```\n\nAnd then add this line to your site's `_config.yml`:\n\n```yml\nplugins:\n  - jekyll-meilisearch\n```\n\n## Configuration\nAdd the following to your Jekyll _config.yml (or a separate config file like _config.prod.yml):\n\n```yaml\nmeilisearch:\n    url: \"http://localhost:7700\"  # Your Meilisearch instance URL\n    api_key: \"your-api-key\"       # Meilisearch API key\n    index_name: \"my_site\"         # Optional: defaults to \"jekyll_documents\"\n    collections:\n        posts:\n          fields: [\"title\", \"content\", \"url\", \"date\"]  # Fields to index\n          id_format: \"default\"                         # Optional: \"default\" or \"path\"\n        pages:\n          fields: [\"title\", \"content\", \"url\"]\n```\n\n## Configuration Options\n* `url`: The Meilisearch server URL (required).\n* `api_key`: The Meilisearch API key (required). Recommended: use a dedicated api key for your index, not the admin one.\n* `index_name`: The name of the Meilisearch index (optional, defaults to jekyll_documents).\n* `collections`: A hash of Jekyll collections to index.\n  * `fields`: Array of fields to extract from each document (e.g., title, content, url, date).\n  * `id_format`: How to generate document IDs:\n    * \"default\" | \"id\": Uses collection-name-number if a number field exists, otherwise sanitizes the document ID.\n    * \"url\": Uses the document’s URL, sanitized.\n    * fallback: if \"number\" exists, uses \"collection_name\" + \"number\"\n\nRun your Jekyll build:\n\n```shell\nbundle exec jekyll build\n```\n\nOr with multiple config files:\n\n```shell\nbundle exec jekyll build --config _config.yml,_config.prod.yml\n```\n\n## Usage\nEnsure Meilisearch is running and accessible at the configured url.\nConfigure your _config.yml with the necessary meilisearch settings.\nBuild your site. The plugin will:\n- Create the Meilisearch index if it doesn’t exist.\n- Fetch existing documents from Meilisearch.\n- Delete obsolete documents.\n- Index only new or updated collections defined in the config\n- Logs will output to STDOUT with details about the indexing process.\n- Skip indexing if the meilisearch host is unavailable\n\nInclude the following for adding search to your front :\n```html\n\n\u003c!-- Search Input --\u003e\n\u003cdiv class=\"border m-6 mb-6 p-4\"\u003e\n  \u003cinput type=\"text\" id=\"search\" class=\"border p-2 w-full\" placeholder=\"Rechercher...\"\u003e\n  \u003cdiv id=\"results\" class=\"mt-2 border p-4\"\u003eResults will appear here.\u003c/div\u003e\n\u003c/div\u003e\n\n\u003c!-- Meilisearch JS SDK --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/meilisearch@0.40.0/dist/bundles/meilisearch.umd.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  const meilisearchConfig = {\n    host: \"{{ site.meilisearch.url | default: 'http://localhost:7700' }}\",\n    apiKey: \"{{ site.meilisearch.search_api_key}}\"\n  };\n  const client = new MeiliSearch(meilisearchConfig);\n  const index = client.index('{{site.meilisearch.index_name}}');\n\n  document.getElementById('search').addEventListener('input', async (e) =\u003e {\n    const query = e.target.value;\n    if (query.length \u003c 2) {\n      document.getElementById('results').innerHTML = '';\n      return;\n    }\n    try {\n      const results = await index.search(query);\n      document.getElementById('results').innerHTML = results.hits\n        .map(hit =\u003e `\u003cp\u003e\u003ca href=\"${hit.url}\" class=\"text-blue-500 hover:underline\"\u003e${hit.title}\u003c/a\u003e\u003c/p\u003e`)\n        .join('');\n    } catch (error) {\n      console.error('Search error:', error);\n      document.getElementById('results').innerHTML = '\u003cp class=\"text-red-500\"\u003eSearch failed. Please try again.\u003c/p\u003e';\n    }\n  });\n\u003c/script\u003e\n\n```\n\n## Skip development\n\nUse `disable_in_development: true` if you want to turn off meilisearch indexation when `jekyll.environment == \"development\"`,\nbut don't want to remove the plugin (so you don't accidentally commit the removal). Default value is `false`.\n\n```yml\nmeilisearch:\n  disable_in_development: true\n```\n\n## Contributing\n\n1. Fork it (https://github.com/unicolored/jekyll-meilisearch/fork)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicolored%2Fjekyll-meilisearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funicolored%2Fjekyll-meilisearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicolored%2Fjekyll-meilisearch/lists"}