{"id":26197532,"url":"https://github.com/acquia/sitestudio-nextjs-example","last_synced_at":"2025-07-05T23:08:16.550Z","repository":{"id":199297048,"uuid":"697313286","full_name":"acquia/sitestudio-nextjs-example","owner":"acquia","description":"Nextjs example for consuming Site Studio JSON:API","archived":false,"fork":false,"pushed_at":"2025-07-04T16:46:48.000Z","size":139,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-07-04T17:44:57.447Z","etag":null,"topics":["no-cortex","no-pipeline","no-sonarqube"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/acquia.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}},"created_at":"2023-09-27T13:29:53.000Z","updated_at":"2023-10-09T14:24:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f0b2816-c0fd-48ab-b989-418de69ae128","html_url":"https://github.com/acquia/sitestudio-nextjs-example","commit_stats":null,"previous_names":["acquia/sitestudio-nextjs-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/acquia/sitestudio-nextjs-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acquia%2Fsitestudio-nextjs-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acquia%2Fsitestudio-nextjs-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acquia%2Fsitestudio-nextjs-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acquia%2Fsitestudio-nextjs-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acquia","download_url":"https://codeload.github.com/acquia/sitestudio-nextjs-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acquia%2Fsitestudio-nextjs-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263819236,"owners_count":23516122,"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":["no-cortex","no-pipeline","no-sonarqube"],"created_at":"2025-03-12T02:42:42.799Z","updated_at":"2025-07-05T23:08:16.528Z","avatar_url":"https://github.com/acquia.png","language":"JavaScript","readme":"# About \n\nThis very simple example shows how JSON:API and Site Studio can be leveraged to generate a static site with Next.js\n\nThe example is hooked up to a Drupal site that has a number of nodes each with a Site Studio layout canvas and the JSON:API enabled.\n\nThe example fetches the list of nodes and their Layout Canvas data and uses it to build a list of recipes and, for each recipe, renders some components based on the configuratin defined on the Layout Canvas in Drupal.\n\n# Configuration\n\nIn next.config.js the hostname and pathname have been set to allow Next.js to download/resize images at build time.\n\n# Getting started\n\n## Next.js\n\nFork or clone this repo\nIn the top directory run `npm run dev`\nThe site should spin up on [http://localhost:3000/](http://localhost:3000/).\n\n## Drupal\n\nWhile the application is hardcoded to point to a live Drupal example site, you may wish to point it to your own so you can alter settings.\n\n- You will need to create a **Drupal 10** site with **Site Studio 7.4.0** or later.\n- You need the JSON:API module enabled\n\nCreate some components in Site Studio. Don't worry about adding elements to the Layout Canvas - you simply need to add fields to the Component Form Builder and ensure they have machine names set.\n\nNow create a Node on your Drupal site with a Layout Canvas field and add your components to it.\n\n## Access the Layout Canvas data via JSON:API\n\nInside `/lib/posts.js` you can find a (hard coded) example of how to access the JSON:API to pull out the list of Nodes (`getAllPostsData()`) and then the Layout canvas from a specific node (`getPostData(id)`).\n\n\n\nBased on the Next.js starter template at [Learn Next.js](https://nextjs.org/learn).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facquia%2Fsitestudio-nextjs-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facquia%2Fsitestudio-nextjs-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facquia%2Fsitestudio-nextjs-example/lists"}