{"id":35694494,"url":"https://github.com/adobe/helix-importer","last_synced_at":"2026-04-02T12:55:22.908Z","repository":{"id":39889127,"uuid":"294113561","full_name":"adobe/helix-importer","owner":"adobe","description":"Foundation tools for importing website content into that can be consumed in an Helix project.","archived":false,"fork":false,"pushed_at":"2026-02-24T16:54:50.000Z","size":5411,"stargazers_count":13,"open_issues_count":13,"forks_count":19,"subscribers_count":22,"default_branch":"main","last_synced_at":"2026-02-24T20:59:50.783Z","etag":null,"topics":["helix","library"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adobe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-09T12:58:03.000Z","updated_at":"2026-02-24T16:55:08.000Z","dependencies_parsed_at":"2026-01-16T16:00:29.795Z","dependency_job_id":null,"html_url":"https://github.com/adobe/helix-importer","commit_stats":{"total_commits":218,"total_committers":6,"mean_commits":"36.333333333333336","dds":0.6605504587155964,"last_synced_commit":"01f91c573b70ff2e56fbf8748676c421616f650a"},"previous_names":[],"tags_count":267,"template":false,"template_full_name":null,"purl":"pkg:github/adobe/helix-importer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fhelix-importer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fhelix-importer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fhelix-importer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fhelix-importer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adobe","download_url":"https://codeload.github.com/adobe/helix-importer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fhelix-importer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30031983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T03:27:35.548Z","status":"ssl_error","status_checked_at":"2026-03-03T03:27:09.213Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["helix","library"],"created_at":"2026-01-06T00:17:16.514Z","updated_at":"2026-03-03T04:27:53.070Z","avatar_url":"https://github.com/adobe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Helix Importer\n\nFoundation tools for importing website content into that can be consumed in an Helix project.\n\nBasic concept of the importer: for an input url, transform the DOM and convert it into a Markdown / docx file.\n\n## Importer\n\nAn importer must extends [PageImporter](src/importer/PageImporter.js) and implement the `fetch` and `process` method. The general idea is that `fetch` receives the url to import and is responsible to return the HTML. `process` receives the corresponding Document in order to filter / rearrange / reshuffle the DOM before it gets processed by the Markdown transformer. `process` computes and defines the list of [PageImporterResource](src/importer/PageImporterResource.ts) (could be more than one), each resource being transformed as a Markdown document.\n\nGoal of the importer is to get rid of the generic DOM elements like the header / footer, the nav... and all elements that are common to all pages in order to get the unique piece(s) of content per page.\n\n### HTML2x helpers\n\n[HTML2x](src/importer/HTML2x.js) methods (`HTML2md` and `HTML2docx`) are convienence methods to run an import. As input, they take:\n- `URL`: URL of the page to import\n- `document`: the DOM element to import - a Document object or a string (see `createDocumentFromString` for the string case)\n- `transformerCfg`: object with the transformation \"rules\". Object can be either:\n  - `{ transformDOM: ({ url, document, html, params }) =\u003e { ... return element-to-convert  }, generateDocumentPath: ({ url, document, html, params }) =\u003e { ... return path-to-target; }}` for a single mapping between one input document / one output file\n  - `{ transform: ({ url, document, html, params }) =\u003e { ... return [{ element: first-element-to-convert, path: first-path-to-target }, ...]  }` for a mapping one input document / multiple output files (useful to generate multiple docx from a single web page)\n- `config`: object with several config properties\n  - `createDocumentFromString`: this config is required if you use the methods in a non-browser context and want to pass `document` param as string. This method receives the HTML to parse as a string and must return a Document object.\n  - `setBackgroundImagesFromCSS`: set to false to disable the `background-image` inlining in the DOM.\n\n### Importer UI\n\nThe Helix Importer has a dedicated browser UI: see https://github.com/adobe/helix-importer-ui\n\n## Installation\n\n```shell\nnpm i https://github.com/adobe/helix-importer \n```\n\nTODO: publish npm module\n\n## Usage\n\n```js\nimport { ... } from '@adobe/helix-importer';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadobe%2Fhelix-importer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadobe%2Fhelix-importer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadobe%2Fhelix-importer/lists"}