{"id":18605792,"url":"https://github.com/bernabe9/render-it","last_synced_at":"2025-06-12T01:09:38.639Z","repository":{"id":81375381,"uuid":"172510951","full_name":"bernabe9/render-it","owner":"bernabe9","description":"Render any JavaScript content to create static sites ready for SEO","archived":false,"fork":false,"pushed_at":"2019-04-23T02:57:28.000Z","size":195,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T06:09:05.579Z","etag":null,"topics":["crawler","javascript","prerender","prerenderio","puppeteer","render","seo","seo-tools","server-side-rendering","static-site","static-site-generator"],"latest_commit_sha":null,"homepage":"https://bernabe9.github.io/render-it","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/bernabe9.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-25T13:27:16.000Z","updated_at":"2021-01-09T22:24:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"8d2b418d-ec88-4595-bee8-349850a705d2","html_url":"https://github.com/bernabe9/render-it","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bernabe9/render-it","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernabe9%2Frender-it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernabe9%2Frender-it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernabe9%2Frender-it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernabe9%2Frender-it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bernabe9","download_url":"https://codeload.github.com/bernabe9/render-it/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernabe9%2Frender-it/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259374945,"owners_count":22847872,"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":["crawler","javascript","prerender","prerenderio","puppeteer","render","seo","seo-tools","server-side-rendering","static-site","static-site-generator"],"created_at":"2024-11-07T02:23:07.929Z","updated_at":"2025-06-12T01:09:38.630Z","avatar_url":"https://github.com/bernabe9.png","language":"JavaScript","readme":"# Render It :pencil:\n[![NPM version](https://img.shields.io/npm/v/render-it.svg?style=flat)](https://npmjs.org/package/render-it)\n\nRender any JavaScript content to create static sites ready for SEO.\n\n```bash\n$ yarn add --dev render-it\n```\nor\n```bash\n$ npm install --save-dev render-it\n```\n\n**Render it** uses [Headless Chrome](https://github.com/GoogleChrome/puppeteer) to render the JavaScript content and [JSDOM](https://github.com/jsdom/jsdom) to replace the content in the original HTML document.\n\n## Motivation\n\nIf you are here, you probably have a problem like this:\n\nYour server is returning a HTML structure without the content that JavaScript renders.\n\n```html\n\u003c!-- DOCUMENT HTML --\u003e\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cdiv\u003eContent from the server\u003c/div\u003e\n    \n    \u003cdiv id='root'\u003e\u003c/div\u003e \u003c!-- placeholder for JavaScript to render content --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nBut you want to return the document HTML with the content (usually for SEO and SMO).\n\n```html\n\u003c!-- DOCUMENT HTML --\u003e\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cdiv\u003eContent from the server\u003c/div\u003e\n    \n    \u003cdiv id='root'\u003eContent from the client\u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n**Render It** allows you to generate all the static pages WITH the content. It returns the same HTML structure from the server but with the JavaScript content inside the placeholder.\n\n## Why is it awesome?\n- Zero config required in the server side.\n- Zero config required in the client side.\n- Works with any server language.\n- Works with any JavaScript library or framework. (like React, VueJS, Angular)\n- Just render what you need.\n- Does not depend on Webpack.\n- Allows a production site URL to generate the static pages.\n\n## Usage\nCreate a Node task to generate the static pages.\n\n```javascript\n// render-it.js\n\nconst renderIt = require('render-it')\n\nconst config = {\n  url: 'http://localhost:3000',\n  paths: ['/', '/about', '/contact'],\n  selector: '#root',\n  outputFolder: 'dist'\n}\n\nrenderIt(config) \n```\n\nThen you can run it with: `node ./render-it.js`\n\nSo, you can use this task in any environment with Node.\n\n### Conguration\n\n| Option  | Default | Description |\n| ------------- | -------------- | ------------- |\n| url | none | URL of the site to crawl. If this parameter isn't present, render-it will run it's own static server using the output folder. |\n| outputFolder | output | Path of the folder to store the generated static pages |\n| paths | ['/'] | Url pathnames to render |\n| selector | #root | Selector to render the JavaScript content |\n| puppeteerConfig | `{ headless: true }` | Force to use another options for puppeteer |\n\n\n## Roadmap\n\n| Feature  | Status |\n| ------------- | ------------- |\n| CLI  | In progress  |\n| Render meta tags  | Pending  |\n| Auto crawling  | Pending  |\n| Wait to render  | Pending  |\n| Auto render  | Pending  |\n| Support multiple selectors  | Pending  |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernabe9%2Frender-it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbernabe9%2Frender-it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernabe9%2Frender-it/lists"}