{"id":15288491,"url":"https://github.com/gouravkhunger/jekyll-hashsert","last_synced_at":"2026-03-03T03:07:09.884Z","repository":{"id":62953492,"uuid":"563007905","full_name":"gouravkhunger/jekyll-hashsert","owner":"gouravkhunger","description":"A jekyll plugin that inserts random hashes of custom length into strings.","archived":false,"fork":false,"pushed_at":"2023-04-26T09:29:01.000Z","size":44,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T21:43:45.644Z","etag":null,"topics":["jekyll","jekyll-plugin","ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"http://hashsert.gourav.sh/","language":"Ruby","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/gouravkhunger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-11-07T18:04:23.000Z","updated_at":"2023-04-24T08:04:28.000Z","dependencies_parsed_at":"2024-11-15T07:27:35.076Z","dependency_job_id":"57dcf3b1-3bc5-46ce-a850-ee86b30e8b4e","html_url":"https://github.com/gouravkhunger/jekyll-hashsert","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"a54df56428b8759fdf3a3401a825eb6cb8c13157"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gouravkhunger/jekyll-hashsert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gouravkhunger%2Fjekyll-hashsert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gouravkhunger%2Fjekyll-hashsert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gouravkhunger%2Fjekyll-hashsert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gouravkhunger%2Fjekyll-hashsert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gouravkhunger","download_url":"https://codeload.github.com/gouravkhunger/jekyll-hashsert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gouravkhunger%2Fjekyll-hashsert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30030839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T00:31:48.536Z","status":"online","status_checked_at":"2026-03-03T02:00:07.650Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-plugin","ruby","ruby-gem"],"created_at":"2024-09-30T15:49:46.610Z","updated_at":"2026-03-03T03:07:09.857Z","avatar_url":"https://github.com/gouravkhunger.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jekyll::Hashsert\n\nA jekyll plugin that inserts random hashes of custom length into strings.\n\n## Installation\n\nAdd this line to your project's Gemfile inside the `jekyll_plugins` group:\n\n```ruby\ngroup :jekyll_plugins do\n    # other gems\n    gem \"jekyll-hashsert\"\nend\n```\n\nThen, enable the plugin by adding it to the `plugins` section in the `_config.yml` file:\n\n```yaml\nplugins:\n    # - other plugins\n    - jekyll-hashsert\n```\n\nAnd then execute:\n\n```shell\nbundle install\n```\n\n## Usage\n\nThis plugin is essentially a liquid filter. You can pass any string to the filter:\n\n```liquid\n{% assign hash = \"$\" | hashsert %}\n{{ hash }}\n```\n\nThe `$` symbol will be replaced with a random alphanumeric string of length 64\n\n\u003e **Note**: By default, the plugin replaces all the `$` symbols in the input string with alphanumeric string hashes of length `64`. Each `$` will be replaced with a different hash.\n\n### Custom symbol\n\nTo use a custom replacement symbol instead of the default `$`, please pass it as a parameter to the filter:\n\n```liquid\n{% assign hash = \"o_o\" | hashsert: \"_\" %}\n{{ hash }}\n```\n\nThe `_` symbol will be replaced while the surrounding text will be preserved.\nOutput will look like: `o\u003chash\u003eo`.\n\n\u003e **Note**: The symbol should only be one character long and should **not** be alphnumeric.\n\n### Custom length\n\nTo set a custom length for the generated hash, pass the required number as a 2nd argument, after the symbol:\n\n```liquid\n{% assign hash = \"o_o\" | hashsert: \"_\", 5 %}\n{{ hash }}\n```\n\nThe `_` symbol will be replaced with a string of length 5 while the surrounding text will be preserved.\nOutput will look like: `o\u003calphanumeric string of length 5\u003eo`.\n\n\u003e **Note**: The 2nd argument should only be an integer. If you intend to set a custom length then you must also set a symbol. You may still pass `$` if you wish to retain the default behavior.\n\n## Use case\n\nThe most prominent use case for this plugin is to insert random alphanumeric characters into strings. For example, GitHub requires hashes to serve versions of open graph images for repositories. To use the latest versions you need a new random hash:\n\n```\nhttps://opengraph.githubassets.com/\u003cany_hash_number\u003e/\u003cowner\u003e/\u003crepo\u003e\n```\n\nYou can use this plugin to generate such urls:\n\n```liquid\n{% assign image = \"https://opengraph.githubassets.com/$/gouravkhunger/jekyll-hashsert\" | hashsert %}\n\n\u003cimg src=\"{{ image }}\" alt=\"Open graph image for gouravkhunger/jekyll-hashsert GitHub repository\" /\u003e\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://github.com/gouravkhunger/jekyll-hashsert/blob/main/LICENSE).\n\n```\nMIT License\n\nCopyright (c) 2022 Gourav Khunger\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgouravkhunger%2Fjekyll-hashsert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgouravkhunger%2Fjekyll-hashsert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgouravkhunger%2Fjekyll-hashsert/lists"}