{"id":15545562,"url":"https://github.com/davbree/maroon-sloth","last_synced_at":"2026-04-11T02:52:19.756Z","repository":{"id":140317506,"uuid":"399752222","full_name":"davbree/maroon-sloth","owner":"davbree","description":"Jamstack site created with Stackbit","archived":false,"fork":false,"pushed_at":"2021-08-25T08:52:00.000Z","size":2232,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T03:40:45.423Z","etag":null,"topics":["git","headless","jamstack","nextjs","ssg","stackbit","static"],"latest_commit_sha":null,"homepage":"https://jamstack.new","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/davbree.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}},"created_at":"2021-08-25T08:51:57.000Z","updated_at":"2021-08-25T08:52:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"c10f0062-9019-4efd-a9b9-a1b3e9d200eb","html_url":"https://github.com/davbree/maroon-sloth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davbree/maroon-sloth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fmaroon-sloth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fmaroon-sloth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fmaroon-sloth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fmaroon-sloth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davbree","download_url":"https://codeload.github.com/davbree/maroon-sloth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fmaroon-sloth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267977389,"owners_count":24175145,"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-07-31T02:00:08.723Z","response_time":66,"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":["git","headless","jamstack","nextjs","ssg","stackbit","static"],"created_at":"2024-10-02T12:50:53.254Z","updated_at":"2026-04-11T02:52:14.720Z","avatar_url":"https://github.com/davbree.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stackbit Nextjs V2\n\nA Nextjs page builder, component library and data fetcher.\n\n## Quickstart\n\n```\nnpm install\n```\n\n```\nnpm run dev\n```\n\n\n# How It Works\n## Content\n\nContent is sourced from the filesystem using [Sourcebit](https://github.com/stackbit/sourcebit). It loads markdown and json files stored in `content/pages` and `content/data` and tranforms them into page objects which are used by `getStaticProps()`. \n\n* This theme comes with a pre-configured sourcebit config `sourcebit.js`\n* This theme comes pre-configured to use `sourcebit.fetch()` in the `next.config.js`\n\n\n```js\n// next.config.js\n\nconst sourcebit = require('sourcebit');\nconst sourcebitConfig = require('./sourcebit.js');\n\nsourcebit.fetch(sourcebitConfig);\n\nmodule.exports = {\n  ...\n}\n```\n\nWhenever you run `npm run dev` or `npm run build` Sourcebit fetches content and outputs the `.sourcebit-nextjs-cache.json` file which contains an array of page objects. \n\nInside a Nextjs page route like `src/pages/[[...slug]].js` you can load page data by it's path using the `sourcebitDataClient.getStaticPropsForPageAtPath(path)` function inside of `getStaticProps`\n\n```js\n// src/pages/[[...slug]].js\n\nexport async function getStaticProps({ params }) {\n  const props = await sourcebitDataClient.getStaticPropsForPageAtPath(params.slug);\n  return { props };\n}\n```\n\n## Components\n\nThis theme uses the [Stackbit component library](https://github.com/stackbit/stackbit-components) \n\n* This theme comes pre-configured to use `withStackbitComponents()` in the `next.config.js`\n\n```js\n// next.config.js\n\nconst withStackbitComponents = require('@stackbit/components/with-stackbit-components');\n\nmodule.exports = withStackbitComponents({\n  componentsMapPath: '.stackbit/components-map.json',\n  ...\n})\n```\n\n`withStackbitComponents` generates a dynamic import map for the Stackbit component library. This provides a framework to override existing Stackbit components and add your own new components. This approach reduces the bundle size by only importing components that are used.\n\n* Generates `.stackbit/components-map.json` - Edit this file to override or add new components\n* Generates `.stackbit/dynamic-components.js` - This file is dynamically generated from `components-map.json` and should not be edited or committed to git.\n\nYou can now use `getDynamicComponent(ComponentName)` in a Nextjs page. \n\n```\n// src/pages/[[...slug]].js \nimport { getDynamicComponent } from '@stackbit/components/components-registry';\n\nfunction Page(props) {\n  console.log(props);\n  const { page, site } = props;\n  const { layout } = page;\n\n  const PageLayout = getDynamicComponent(layout);\n\n  return \u003cPageLayout page={page} site={site} /\u003e;\n}\n```\n\n\n## Tailwind\n\nYou can edit the tailwind config in `tailwind.config.js`\n\nThe Stackbit component library includes a number of preset Tailwind themes which you can use.\n\n```js\n// tailwind.config.js\n\nmodule.exports = {\n  presets: [require('@stackbit/components/themes/tailwind.bold.config')],\n  mode: 'jit',\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavbree%2Fmaroon-sloth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavbree%2Fmaroon-sloth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavbree%2Fmaroon-sloth/lists"}