{"id":28401206,"url":"https://github.com/fern-api/docs-custom-js-example","last_synced_at":"2026-05-14T12:33:41.957Z","repository":{"id":223386378,"uuid":"754906919","full_name":"fern-api/docs-custom-js-example","owner":"fern-api","description":"Fern Docs example with custom headers and footers","archived":false,"fork":false,"pushed_at":"2025-06-30T15:54:28.000Z","size":231,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-30T09:46:28.668Z","etag":null,"topics":["built-with-fern","custom-components","mdx"],"latest_commit_sha":null,"homepage":"https://custom-js-example.docs.buildwithfern.com/","language":"TypeScript","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/fern-api.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":"2024-02-09T01:48:16.000Z","updated_at":"2025-07-10T17:22:21.000Z","dependencies_parsed_at":"2024-02-20T00:46:51.203Z","dependency_job_id":null,"html_url":"https://github.com/fern-api/docs-custom-js-example","commit_stats":null,"previous_names":["fern-api/docs-custom-js-example"],"tags_count":0,"template":false,"template_full_name":"fern-api/docs-starter","purl":"pkg:github/fern-api/docs-custom-js-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Fdocs-custom-js-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Fdocs-custom-js-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Fdocs-custom-js-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Fdocs-custom-js-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fern-api","download_url":"https://codeload.github.com/fern-api/docs-custom-js-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fern-api%2Fdocs-custom-js-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278909715,"owners_count":26066887,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["built-with-fern","custom-components","mdx"],"created_at":"2025-06-01T11:38:07.163Z","updated_at":"2025-10-08T07:39:18.896Z","avatar_url":"https://github.com/fern-api.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Fern Docs: Custom Headers and Footers\n\nThis repo contains a basic react-app example that inserts a custom header and footer into Fern docs using custom JS and CSS.\n\n### Custom header\n```javascript\nReactDOM.render(\n  React.createElement(NavHeader),\n  document.getElementById('fern-header'),\n)\n```\n\u003cimg width=\"1269\" src=\"https://github.com/fern-api/docs-custom-js-example/assets/693032/a8c84dce-3a15-4464-87ee-7d3872e1fb2c\"\u003e\n\n### Custom footer\n```javascript\nReactDOM.render(\n  React.createElement(NavFooter),\n  document.getElementById('fern-footer'),\n)\n```\n\u003cimg width=\"1267\" alt=\"Screenshot 2024-02-19 at 6 42 49 PM\" src=\"https://github.com/fern-api/docs-custom-js-example/assets/693032/7cbfe507-4c47-4413-96da-fd291161562e\"\u003e\n\n\n\n## Getting started\n1. `cd custom-app`\n2. `yarn build`\n3. `fern generate --docs`\n\n### Important notes\n\n1.  This approach is subject to change as we make improvements to the plugin architecture\n2.  `ReactDOM.render()` may need to be called multiple times to prevent it from unmounting (this side-effect will be removed in the future).\n3.  `yarn build` or `npm build` must output `dist` files with deterministic names. This example uses [this vite config](https://github.com/fern-api/docs-custom-js-example/blob/main/custom-app/vite.config.ts#L11-L12) to accomplish it. Then, reference the [js/css files in the docs.yml](https://github.com/fern-api/docs-custom-js-example/blob/main/fern/docs.yml#L22-L27) to get picked up by Fern Docs.\n4. You may need to update your CD steps to include [building the react-app](https://github.com/fern-api/docs-custom-js-example/blob/main/.github/workflows/publish-docs.yml#L19-L24).\n5. If you use tailwind, make sure to prefix the [tailwind classes and disable preflight](https://github.com/fern-api/docs-custom-js-example/blob/main/custom-app/tailwind.config.js#L66-L69) to deconflict with the Fern's stylesheet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffern-api%2Fdocs-custom-js-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffern-api%2Fdocs-custom-js-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffern-api%2Fdocs-custom-js-example/lists"}