{"id":17422242,"url":"https://github.com/alexzhangs/jekyll-hooks","last_synced_at":"2026-04-29T01:03:42.559Z","repository":{"id":90923328,"uuid":"421026527","full_name":"alexzhangs/jekyll-hooks","owner":"alexzhangs","description":"A Jekyll plugin to do find-and-replace in site content through hooks.","archived":false,"fork":false,"pushed_at":"2021-10-28T11:54:03.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-08T13:51:54.654Z","etag":null,"topics":["github-pages","jekyll","jekyll-hooks","jekyll-plugins","plugins"],"latest_commit_sha":null,"homepage":"","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/alexzhangs.png","metadata":{"files":{"readme":"README.md","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":"2021-10-25T13:03:46.000Z","updated_at":"2022-04-17T04:11:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"07771a01-88e9-4963-b460-cfddbd5fd2c2","html_url":"https://github.com/alexzhangs/jekyll-hooks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexzhangs%2Fjekyll-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexzhangs%2Fjekyll-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexzhangs%2Fjekyll-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexzhangs%2Fjekyll-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexzhangs","download_url":"https://codeload.github.com/alexzhangs/jekyll-hooks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239487556,"owners_count":19647014,"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":["github-pages","jekyll","jekyll-hooks","jekyll-plugins","plugins"],"created_at":"2024-10-17T03:14:17.434Z","updated_at":"2025-11-06T08:30:20.221Z","avatar_url":"https://github.com/alexzhangs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jekyll-hooks\nA Jekyll plugin to do find-and-replace in site content through hooks.\n\nThe most requirements like this are implemented by putting a simple hooks plugin into `_plugins` folder.\nBut it's not gonna work with Github Pages, even at local.\nGithub Pages locks down the `safe=true`, the `_plugins` folder won't work at all.\n\nWith this plugin, for the local build, it works.\nFor he remote build on Github Pages, of course it won't work by default.\nBut with [jekyll-deploy-action](https://github.com/jeffreytse/jekyll-deploy-action) together, it will.\n\n## Sample Configuration\n\n```yaml\n# _config.yml\n\n# jekyll-hooks\nhooks:\n  actions:\n    - type: posts\n      exts: [markdown,mkdown,mkdn,mkd,md]\n      # ![alt](/path/to/image \"title\"){:.class}\n      find: \u003e\n        !\\[([^\\]]*)\\]\\(((?!http[s]?://)[^\"'\\n]+)(?:\\s['\"]([^'\"]*)['\"])?\\)(?:\\{:\\.([^{]+)\\})?\n      # both present and non-present quotes matter\n      replace: \u003e\n        {% picture \\2 --alt \\1 --img class=\"\\4\" title=\"\\3\" %}\n      case-insensitive: true\n      disabled: false\n  disabled: false\n```\n\nThis configuration is turning the following markdown code:\n\n```markdown\n![A happy dog](/assets/images/a-happy-dog.png \"Leica iiif, Summaron 35mm/F3.5\"){:.photo}\n```\n\ninto a [jekyll_picture_tag](https://github.com/rbuchberger/jekyll_picture_tag)\ntag format which is used to generate responsive images HTML code:\n\n```\n{% picture /assets/images/a-happy-dog.png --alt A happy dog --img class=\"photo\" title=\"Leica iiif, Summaron 35mm/F3.5\" %}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexzhangs%2Fjekyll-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexzhangs%2Fjekyll-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexzhangs%2Fjekyll-hooks/lists"}