{"id":15290290,"url":"https://github.com/marktawa/blog-strapi","last_synced_at":"2025-06-27T14:06:37.461Z","repository":{"id":190007326,"uuid":"654078421","full_name":"Marktawa/blog-strapi","owner":"Marktawa","description":"Blog website using Strapi for the backend and Next.js for the frontend","archived":false,"fork":false,"pushed_at":"2024-02-29T10:26:42.000Z","size":24050,"stargazers_count":47,"open_issues_count":0,"forks_count":26,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T10:12:05.911Z","etag":null,"topics":["blog","jamstack","nextjs","strapi","webdev"],"latest_commit_sha":null,"homepage":"https://strapi.io/blog/build-a-blog-with-next-react-js-strapi","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/Marktawa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2023-06-15T10:43:32.000Z","updated_at":"2025-02-22T05:17:37.000Z","dependencies_parsed_at":"2025-04-13T09:43:38.298Z","dependency_job_id":null,"html_url":"https://github.com/Marktawa/blog-strapi","commit_stats":null,"previous_names":["marktawa/blog-strapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Marktawa/blog-strapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marktawa%2Fblog-strapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marktawa%2Fblog-strapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marktawa%2Fblog-strapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marktawa%2Fblog-strapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marktawa","download_url":"https://codeload.github.com/Marktawa/blog-strapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marktawa%2Fblog-strapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262270428,"owners_count":23285164,"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":["blog","jamstack","nextjs","strapi","webdev"],"created_at":"2024-09-30T16:06:49.178Z","updated_at":"2025-06-27T14:06:37.318Z","avatar_url":"https://github.com/Marktawa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blog using Next.js and Strapi\n\n[**TUTORIAL LINK**](https://strapi.io/blog/build-a-blog-with-next-react-js-strapi)\n\n\u003e **NOTE:**\n\u003e \n\u003e *This project is based on the [Strapi Starter Next 13, Tailwind, Typescript, and Strapi]() made by [Trecia](https://github.com/TreciaKS), [Daniel](https://github.com/malgamves) and [Paul](https://github.com/PaulBratslavsky) from the Strapi Team.*\n\n## Introduction\n\nThis project is a code repo for the Strapi blog article [Build a blog with Next.js and Strapi](https://strapi.io/blog/build-a-blog-with-next-react-js-strapi).\n\n## Getting Started\n\n1. Clone the repo locally:\n\n```bash\ngit clone https://github.com/Marktawa/blog-strapi\n```\n\n2. Set up backend dependencies:\n\n```bash\ncd blog-strapi\ncd backend\nyarn\n```\n\n3. Set up environment variables:\n\n```bash\ncp .env.example .env\n```\n\n4. Start your project by running the following command:\n\n```bash\n  yarn build\n  yarn develop\n```\n\nCreate your first admin user.\n\n![admin-user](https://user-images.githubusercontent.com/6153188/231865420-5f03a90f-b893-4057-9634-9632920a7d97.gif)\n\n## Seeding the Data\n\nAt the root of our project, we have our `seed-schema.tar` file. We will use it to update the schema for our Strapi app.\n\n1. Go back to your terminal and stop your Strapi backend server by pressing `CTRL` plus `C` on your keyboard.\n   \n2. Run the following command in the root of your project folder `blog-strapi` to update the schema:\n\n```bash\ntar xvf seed-schema.tar -C backend\n```\n3. Import data into your backend's database:\n\n```bash\ncd backend\nyarn strapi import -f ../seed-data.tar.gz\n```\n\nAnswer `y` to `The import will delete all assets and data in your database. Are you sure you want to proceed? (y/N)`\n\n4. After a successful import, rerun your Strapi backend server. \n\n```bash\nyarn develop\n```\n\nIn your browser, log in to your admin panel. You should see the newly imported `content` and `collection types`.\n\n![after-import](https://user-images.githubusercontent.com/6153188/231865491-05cb5818-a0d0-49ce-807e-a879f7e3070c.gif)\n\n## Frontend Setup\n\n1. Open up a new terminal session and navigate into your `frontend` folder. Set up frontend dependencies:\n\n```bash\ncd frontend\nyarn\n```\n2. Create `.env` file:\n\n```bash\ntouch .env\n```\n\n3. Paste in the following. \n\n```yaml\nNEXT_PUBLIC_STRAPI_API_TOKEN=your-api-token\nNEXT_PUBLIC_PAGE_LIMIT=6\nNEXT_PUBLIC_STRAPI_API_URL=http://127.0.0.1:1337\n```\n4. Before starting our Next JS app we need to go inside our Strapi Admin and create a token that we will be using for displaying our **content**.\n\nInside your Strapi Admin Panel navigate to `Settings` -\u003e `API Tokens` and click on the `Create new API Token`.\n\n![api-tokens](https://user-images.githubusercontent.com/6153188/231865572-cebc5538-374c-4050-91cd-c303fae25a3d.png)\n\nHere are our Token Settings\n\nName: Public API Token Content\nDescription: Access to public content.\nToken duration: Unlimited\nToken type: Custom\n\nIn Permissions let's give the following access.\n\n| Content         |   Permissions    |\n| --------------- | :--------------: |\n| Article         | find and findOne |\n| Author          | find and findOne |\n| Category        | find and findOne |\n| Global          |       find       |\n| Page            | find and findOne |\n| Product-feature | find and findOne |\n\n![permissions](https://user-images.githubusercontent.com/6153188/231865625-a3634d89-0f40-4a6d-a356-8f654abd88b9.gif)\n\nOnce you have your token add it to your `NEXT_PUBLIC_STRAPI_API_TOKEN` variable name in the `.env` file.\n\n5. Start your frontend\n\n```bash\nyarn dev\n```\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarktawa%2Fblog-strapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarktawa%2Fblog-strapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarktawa%2Fblog-strapi/lists"}