{"id":18801241,"url":"https://github.com/velocitatem/garlic","last_synced_at":"2025-03-17T10:07:18.891Z","repository":{"id":94656400,"uuid":"608073234","full_name":"velocitatem/garlic","owner":"velocitatem","description":"🧄🧛  protect your website from being scraped by bots.","archived":false,"fork":false,"pushed_at":"2025-01-19T10:13:48.000Z","size":239,"stargazers_count":53,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-11T04:53:06.745Z","etag":null,"topics":["protection","react","scraping"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/garlic-react?activeTab=readme","language":"JavaScript","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/velocitatem.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}},"created_at":"2023-03-01T09:07:57.000Z","updated_at":"2025-01-19T10:13:50.000Z","dependencies_parsed_at":"2023-05-13T05:15:53.213Z","dependency_job_id":null,"html_url":"https://github.com/velocitatem/garlic","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":0.08333333333333337,"last_synced_commit":"50e7cf3ea7d80cfeed8e2acea598c8689bbdc2ad"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocitatem%2Fgarlic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocitatem%2Fgarlic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocitatem%2Fgarlic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocitatem%2Fgarlic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/velocitatem","download_url":"https://codeload.github.com/velocitatem/garlic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841212,"owners_count":20356443,"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":["protection","react","scraping"],"created_at":"2024-11-07T22:22:58.640Z","updated_at":"2025-03-17T10:07:18.853Z","avatar_url":"https://github.com/velocitatem.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Garlic 🧄🧛\n\nGarlic is a simple, fast and secure way to protect your website from being scraped by bots.\n\n\n---\n\nYou write your code and text as you would any other day, just let garlic protect your content from scraping.\n\n| POV          | Result                                |\n|--------------|---------------------------------------|\n| You Write    | `\u003cp\u003eThis is a test piece of text\u003c/p\u003e` |\n| Scraper Sees | ![final](https://raw.githubusercontent.com/velocitatem/garlic/main/media/final.png)           |\n| User Sees    | ![user](https://raw.githubusercontent.com/velocitatem/garlic/main/media/user.png)             |\n\n# Try Now!\n\n1. Go to this website: https://garlic-astro.netlify.app/\n2. You will see normal text the way it should be\n3. Run the following command: `wget https://garlic-astro.netlify.app/`\n4. Open the index.html\n5. You will see the encoded text :)\n\n\n\n# How?\nCurrently, this is in development, but the beta works like this:\n\n## React\n\nInstall the packages with `npm i garlic-react`, you should then import the `Garlic` class with:\n\n```js\nimport Garlic from 'garlic';\n```\n\nYou just need to wrap your html in the `Garlic.clove` method:\n\n```js\nfunction App() {\n  return Garlic.clove(\n          \u003cdiv className=\"App\"\u003e\n            \u003cp\u003eGo away robots :)\u003c/p\u003e\n          \u003c/div\u003e\n  );\n};\n```\n\nGo to `index.js` or anywhere before render. Add the following line of code:\n\n```js\nGarlic.peal(document);\n```\n\nAnd all is done!\n\n## Astro\n\ninstall the package with `npm i garlic-astro`. With Astro, you just need to import the `Garlic` and `Clove` components into your layout:\n\n```astro\nimport {Garlic, Clove} from 'garlic-astro';\n---\n\u003cGarlic\u003e\n\u003c!DOCTYPE html\u003e\n  \u003chtml lang=\"en\"\u003e\n      \u003chead\u003e\n          \u003ctitle\u003e{title}\u003c/title\u003e\n      \u003c/head\u003e\n      \u003cbody\u003e\n        \u003cClove\u003e\n          \u003cslot /\u003e\n        \u003c/Clove\u003e\n      \u003c/body\u003e\n  \u003c/html\u003e\n\u003c/Garlic\u003e\n```\n\nIdeally, `Garlic` should wrap the entire page, and `Clove` should wrap the content you want to protect. You can also use `Clove` multiple times, if you want to protect different parts of your page.\n\nYou can then use the layout in `.astro` or `.mdx` files, and the content will be protected.\n\n\n# Why?\nAI needs data, your website might end-up in the dataset it uses for training. Dont want that? Garlic should help :)\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/velocitatem/garlic.svg)](https://starchart.cc/velocitatem/garlic)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelocitatem%2Fgarlic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvelocitatem%2Fgarlic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelocitatem%2Fgarlic/lists"}