{"id":22688277,"url":"https://github.com/emanuelefavero/strapi-markdown-blog","last_synced_at":"2026-04-15T19:36:00.395Z","repository":{"id":172423758,"uuid":"618639676","full_name":"emanuelefavero/strapi-markdown-blog","owner":"emanuelefavero","description":"This is a blog starter project that uses the Strapi Rich Text Data Type and react-markdown","archived":false,"fork":false,"pushed_at":"2023-03-24T23:28:58.000Z","size":1400,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T11:26:05.419Z","etag":null,"topics":["blog","markdown","nextjs","react-markdown","strapi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/emanuelefavero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-03-24T23:28:33.000Z","updated_at":"2023-11-04T05:37:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"b20f1c05-3392-43da-b38c-a904ca9d6670","html_url":"https://github.com/emanuelefavero/strapi-markdown-blog","commit_stats":null,"previous_names":["emanuelefavero/strapi-markdown-blog"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emanuelefavero/strapi-markdown-blog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emanuelefavero%2Fstrapi-markdown-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emanuelefavero%2Fstrapi-markdown-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emanuelefavero%2Fstrapi-markdown-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emanuelefavero%2Fstrapi-markdown-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emanuelefavero","download_url":"https://codeload.github.com/emanuelefavero/strapi-markdown-blog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emanuelefavero%2Fstrapi-markdown-blog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31857483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blog","markdown","nextjs","react-markdown","strapi"],"created_at":"2024-12-10T00:13:43.310Z","updated_at":"2026-04-15T19:36:00.325Z","avatar_url":"https://github.com/emanuelefavero.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Strapi Markdown Blog\n\nThis is a blog starter project that uses the Strapi Rich Text Data Type and react-markdown to render the content.\n\n#### Screenshot\n\n\u003cimg src=\"screenshot.png\" alt=\"screenshot\" width=\"300\"\u003e\n\n## Run the project\n\n- clone this repo and `cd` into it\n\n### Run the backend\n\n- `cd` into the `backend` folder\n- run the following command to start Strapi in development mode:\n\n```bash\nnpm run develop\n```\n\n### Run the frontend\n\n- `cd` into the `frontend` folder\n- run the following command to start Next.js in development mode:\n\n```bash\nnpm run dev\n```\n\n## **Steps to create a new project like this**\n\n### Setup NVM\n\n\u003e This version of Strapi needs a specific version of Node. We recommend using NVM to manage your Node versions.\n\u003e\n\u003e Follow these instructions to install NVM if you don't have it already: [nvm installation instructions](https://github.com/nvm-sh/nvm)\n\n- create a new `.nvmrc` file in the root of your project and add the following line:\n\n```bash\nv18.13.0\n```\n\n- run the following command to install the correct version of Node:\n\n```bash\nnvm install\n```\n\n- run the following command to use the correct version of Node:\n\n```bash\nnvm use\n```\n\n## Install the backend\n\n### Create a new Strapi project\n\n\u003e Note: The Strapi project will be the backend of this project\n\n- run the following command to create a new Strapi project:\n\n```bash\nnpx create-strapi-app backend  --quickstart\n```\n\n- after the project is created, strapi will open the browser and prompt you to create an admin user. Create the user.\n\n- create **collection types, fields, content and permissions** as you see fit (don't forget to give permission to the public role to read the content)\n\n### Run Strapi in development mode\n\n- `cd` into the `backend` folder\n- run the following command to start Strapi in development mode:\n\n```bash\nnpm run develop\n```\n\nNOTE: If you get an error like this:\n\n```bash\nError: The module ... was compiled against a different Node.js version using\nNODE_MODULE_VERSION 108. This version of Node.js requires\nNODE_MODULE_VERSION 111. Please try re-compiling or re-installing\nthe module ...\n```\n\n- delete the `node_modules` folder in the `backend` folder\n- run `npm install` again\n- run `npm run develop` again\n\n\u003e Login to the strapi admin panel\n\n## Install the frontend\n\n### Create a new Next.js project\n\n- `cd` back into the root of the project\n- run the following command to create a new Next.js project as the frontend:\n\n```bash\nnpx create-next-app frontend\n```\n\n\u003e remove Next.js boilerplate\n\n#### Copy the following frontend code from this repo into the `frontend` folder:\n\n- `config/server.ts`\n- `pages/index.tsx`\n- `pages/posts/[slug].tsx`\n- `pages/_app.tsx`\n- `styles/globals.css`\n- `types.ts`\n\n## **IMPORTANT**\n\n### If you want to use slug instead of id in the url\n\n- open `backend/src/api/post/controllers/post.js`\n- replace `module.exports = createCoreController('api::post.post');` with the following code:\n\n```js\nmodule.exports = createCoreController('api::post.post', ({ strapi }) =\u003e ({\n  // Method 3: Replacing a core action\n  async findOne(ctx) {\n    const { id } = ctx.params\n    const entity = await strapi.db.query('api::post.post').findOne({\n      where: { slug: id },\n    })\n    const sanitizedEntity = await this.sanitizeOutput(entity, ctx)\n\n    return this.transformResponse(sanitizedEntity)\n  },\n}))\n```\n\n## Add react-markdown\n\n- `cd` into the `frontend` folder\n- run the following command to install react-markdown:\n\n```bash\nnpm install react-markdown\n```\n\n- import react-markdown in `pages/posts/index.tsx` and `pages/posts/[slug].tsx`:\n\n\u003e In particular when you have post.attributes.content that is a rich text field (markdown)\n\n```js\nimport ReactMarkdown from 'react-markdown'\n```\n\n- use react-markdown to render the content:\n\n```js\n\u003cReactMarkdown\u003e{post.attributes.content}\u003c/ReactMarkdown\u003e\n```\n\n## Resources\n\n- [react-markdown](https://github.com/remarkjs/react-markdown#install)\n- [Strapi](https://strapi.io/)\n- [Next.js](https://nextjs.org/)\n\n## License\n\n- [MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femanuelefavero%2Fstrapi-markdown-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femanuelefavero%2Fstrapi-markdown-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femanuelefavero%2Fstrapi-markdown-blog/lists"}