{"id":16738080,"url":"https://github.com/dc7290/microcms-richedit-processer","last_synced_at":"2026-02-26T11:31:13.977Z","repository":{"id":38123814,"uuid":"381346669","full_name":"dc7290/microcms-richedit-processer","owner":"dc7290","description":"microCMSのリッチエディタから取得した値を加工したり、目次リストを作成します。","archived":false,"fork":false,"pushed_at":"2026-02-12T10:46:59.000Z","size":909,"stargazers_count":24,"open_issues_count":12,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-12T19:17:40.132Z","etag":null,"topics":["microcms","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/dc7290.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-06-29T11:52:18.000Z","updated_at":"2024-10-30T11:30:25.000Z","dependencies_parsed_at":"2023-09-28T21:14:27.999Z","dependency_job_id":"3dd5da19-78a0-4b24-8b5f-ea4ec372fa00","html_url":"https://github.com/dc7290/microcms-richedit-processer","commit_stats":{"total_commits":232,"total_committers":5,"mean_commits":46.4,"dds":"0.35344827586206895","last_synced_commit":"c2fdfa0b640e8638b147c710d38674b48d4d18df"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/dc7290/microcms-richedit-processer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dc7290%2Fmicrocms-richedit-processer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dc7290%2Fmicrocms-richedit-processer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dc7290%2Fmicrocms-richedit-processer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dc7290%2Fmicrocms-richedit-processer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dc7290","download_url":"https://codeload.github.com/dc7290/microcms-richedit-processer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dc7290%2Fmicrocms-richedit-processer/sbom","scorecard":{"id":329414,"data":{"date":"2025-08-11","repo":{"name":"github.com/dc7290/microcms-richedit-processer","commit":"c2fdfa0b640e8638b147c710d38674b48d4d18df"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/node.js.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/dc7290/microcms-richedit-processer/node.js.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/dc7290/microcms-richedit-processer/node.js.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/dc7290/microcms-richedit-processer/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/dc7290/microcms-richedit-processer/release.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'","Warn: branch protection not enabled for branch 'release'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-hj9c-8jmm-8c52","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-f9xv-q969-pqx4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T03:13:18.970Z","repository_id":38123814,"created_at":"2025-08-18T03:13:18.970Z","updated_at":"2025-08-18T03:13:18.970Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29857469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: 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":["microcms","typescript"],"created_at":"2024-10-13T00:29:11.548Z","updated_at":"2026-02-26T11:31:13.950Z","avatar_url":"https://github.com/dc7290.png","language":"TypeScript","readme":"# microcms-richedit-processer\n\n[![npm version](https://img.shields.io/npm/v/microcms-richedit-processer)](https://www.npmjs.com/package/microcms-richedit-processer) [![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/dc7290/microcms-richedit-processer/blob/master/LICENSE) [![downloads](https://img.shields.io/npm/dt/microcms-richedit-processer)](https://www.npmjs.com/package/microcms-richedit-processer)\n\n\u003cimg src=\"https://microcms-richedit-processer.vercel.app/img/logo-bg-black.svg\" /\u003e\n\nmicroCMSのリッチエディタから取得できるHTMLデータを自動処理します。\n\n# Feature\n\n## HTML データの加工機能について\n\n- img タグ\n  - 遅延読み込み(現在、遅延読み込みライブラリの`lazysizes`のクラス名をサポート)\n  - レスポンシブ画像のサポート(srcSet, sizes 属性によってウインドウ幅に合わせて最適な画像を配信する技術)\n  - placeholder 画像の設定\n  - imgix パラメータの追加\n  - width, height 属性の自動設定\n- iframe タグ\n  - 遅延読み込み(現在、遅延読み込みライブラリの`lazysizes`のクラス名をサポート)\n  - レスポンシブ対応\n- pre タグ内の code タグ\n  - シンタックスハイライトのためにクラス名の追加(現在、`highlight.js`をサポート)\n- 共通\n  - クラス名の追加\n  - 任意の属性値の追加\n\n## HTML データから別データの自動作成機能について\n\n- 目次リストの作成\n\n# Usage\n\n```bash\nnpm i microcms-richedit-processer\n# yarn add microcms-richedit-processer\n```\n\nNext.jsの場合\n\n```typescript\nimport { GetStaticProps, NextPage } from \"next\";\n\nimport { createTableOfContents, processer } from \"microcms-richedit-processer\";\n\ntype Props = {\n  body: string;\n  toc: {\n    id: string;\n    text: string;\n    name: string;\n  }[];\n};\n\nexport const getStaticProps: GetStaticProps\u003cProps\u003e = async () =\u003e {\n  const { contents } = await fetch(\n    \"https://{サービスID}.microcms.io/api/v1/{エンドポイント}\",\n    {\n      headers: {\n        \"X-API-KEY\": \"{APIキー}\",\n      },\n    }\n  ).then((res) =\u003e res.json());\n\n  // contents.bodyにHTMLデータが取得できる想定です。\n\n  return {\n    props: {\n      body: await processer(contents.body),\n      // オプションを渡す場合\n      // body: processer(contents.body, {}),\n      toc: createTableOfContents(contents.body),\n      // オプションを渡す場合\n      // toc: createTableOfContents(contents.body, {}),\n    },\n  };\n};\n```\n\n詳しい使い方はZennの記事に書いています！\nhttps://zenn.dev/d_suke/articles/e18352797bbe00bdabb6\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdc7290%2Fmicrocms-richedit-processer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdc7290%2Fmicrocms-richedit-processer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdc7290%2Fmicrocms-richedit-processer/lists"}