{"id":21525784,"url":"https://github.com/bkwld/vue-embed","last_synced_at":"2025-04-09T23:22:56.559Z","repository":{"id":146043416,"uuid":"416532589","full_name":"BKWLD/vue-embed","owner":"BKWLD","description":"Parse html from the CMS for use with statically generated sites","archived":false,"fork":false,"pushed_at":"2023-09-20T23:15:01.000Z","size":345,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T11:02:01.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/BKWLD.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-12T23:56:37.000Z","updated_at":"2023-12-14T08:16:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"1f1245be-dfe8-40df-8a4b-c126456cf8b4","html_url":"https://github.com/BKWLD/vue-embed","commit_stats":{"total_commits":15,"total_committers":4,"mean_commits":3.75,"dds":0.7333333333333334,"last_synced_commit":"399032c0fdb44e3d84656f4f4ccc07e491a739e2"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-embed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-embed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-embed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-embed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BKWLD","download_url":"https://codeload.github.com/BKWLD/vue-embed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248126728,"owners_count":21052014,"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":[],"created_at":"2024-11-24T01:38:29.295Z","updated_at":"2025-04-09T23:22:56.530Z","avatar_url":"https://github.com/BKWLD.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue Embed\nA component that takes a plain text field with script tags and script links and parses\n\n## Props\n\n- `html`: The markup coming from the CMS\n- `showLoading`: When true, shows \"Loading\" on the front end while the external scripts are loading.\n\n## Usage\n\n```javascript\nimport Embed from '@bkwld/vue-embed'\nVue.component 'embed', Embed\n```\n\n```pug\nvue-embed(:html='your_html_here')\n```\n\n## Why use vue-embed?\n\n`vue-embed` solves the problem of `script` tags not executing on client-rendered pages.  Often these same `script` tags execute normally when the page is loaded via SSG.  A common scenario for this is a CMS with an Embed Block that renders `script` tags to the front end, such as embedded videos or publisher tags.  \n\n## How does vue-embed work?\n\n- On SSG and SSR, `vue-embed` renders the provided HTML code with the `script` tags removed.\n- On `mounted`, `vue-embed` finds all `script` tags with external URLs and appends them to the document head with `async=\"true\"`\n- On `mounted`, `vue-embed` finds all `script` tags with inline code and executes them using `eval()`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkwld%2Fvue-embed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbkwld%2Fvue-embed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkwld%2Fvue-embed/lists"}