<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bugra</title>
    <description>The latest articles on DEV Community by Bugra (@habubey).</description>
    <link>https://dev.to/habubey</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1093121%2F9e1d84c7-fe72-4f3a-88ac-cb255aaec74b.jpeg</url>
      <title>DEV Community: Bugra</title>
      <link>https://dev.to/habubey</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/habubey"/>
    <language>en</language>
    <item>
      <title>Build a Blog Website with ReactJs-PrimeReact and Hygraph Headless CMS</title>
      <dc:creator>Bugra</dc:creator>
      <pubDate>Mon, 07 Aug 2023 07:10:07 +0000</pubDate>
      <link>https://dev.to/habubey/build-a-blog-website-with-reactjs-primereact-and-hygraph-headless-cms-m7a</link>
      <guid>https://dev.to/habubey/build-a-blog-website-with-reactjs-primereact-and-hygraph-headless-cms-m7a</guid>
      <description>&lt;p&gt;Today, the world of technology is constantly advancing and websites have become an essential part of digital assets. In this fast-changing environment, content management systems (CMS) are of great importance for building websites and managing content. While traditional CMSs offer user-friendly interfaces and ease of management, a headless CMS's a more flexible and lightweight alternative for modern web applications, has recently attracted attention. In this article, we will discuss how Hygraph CMS can be used in websites and integrated with other technologies, including&lt;br&gt;
✅&lt;strong&gt;Next.js&lt;/strong&gt;&lt;br&gt;
✅&lt;strong&gt;PrimeReact&lt;/strong&gt;&lt;br&gt;
✅&lt;strong&gt;PrimeDesigner&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Special thanks to my friend, collegue and collabrator of this project and content &lt;a class="mentioned-user" href="https://dev.to/gucal"&gt;@gucal&lt;/a&gt; ✨&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  About the Website
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.cosmedicistanbul.com/"&gt;CosmedicIstanbul&lt;/a&gt;, the most important features of this blog website offering medical aesthetic services are the following:&lt;/p&gt;

&lt;p&gt;1️⃣ - &lt;strong&gt;User Friendly Administration:&lt;/strong&gt; The website administrator or service provider can add or remove their own pages and change their content easily. Thanks to this feature, content updates can be made quickly and without any difficulties.&lt;/p&gt;

&lt;p&gt;2️⃣ - &lt;strong&gt;Original Design:&lt;/strong&gt; A remarkable feature of Cosmedic Istanbul is that it uses its own original design without being dependent on paid templates. In this way, the look of the website is completely unique to the company and the styling process is greatly simplified with the contributions of open source projects such as &lt;a href="https://primereact.org/"&gt;PrimeReact&lt;/a&gt; and &lt;a href="https://designer.primereact.org/#/"&gt;PrimeReact Designer&lt;/a&gt;. Thus, a professional look is achieved without having to write pages of CSS code.&lt;/p&gt;

&lt;p&gt;3️⃣ - &lt;strong&gt;Completely Free to Build:&lt;/strong&gt; All elements and third party projects used in the site are completely free of charge and do not cost anything for the developers.&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://primereact.org/"&gt;PrimeReact&lt;/a&gt; and &lt;a href="https://designer.primereact.org/#/"&gt;PrimeReact Designer&lt;/a&gt; offered by open source projects, &lt;a href="https://www.cosmedicistanbul.com/"&gt;CosmedicIstanbul&lt;/a&gt; has managed to have a unique website that reflects its own style while making the work easier in design and content management.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pLbJmPIH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0zwi7g1hbckxot9nb050.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pLbJmPIH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0zwi7g1hbckxot9nb050.png" alt="CosmedicIstanbul" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What is Hygraph Headless CMS?
&lt;/h2&gt;

&lt;p&gt;Hygraph headless CMS is a content management system that separates the presentation layer (where content is delivered) from the backend (where content is managed). It uses GraphQL content APIs on the fly to distribute content. Hygraph headless CMS allows you to manage content in one place and distribute that content to any digital channel you choose.&lt;/p&gt;
&lt;h2&gt;
  
  
  Genarating Slugs with one Schema
&lt;/h2&gt;

&lt;p&gt;Once you have created your schema you can add rich texts, assests etc. The important thing is how you can call them in your Next.js code. Image below you can see part of the creation of your schema&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XOZrA0Qw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9obvs0qhqnaofytq1yw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XOZrA0Qw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9obvs0qhqnaofytq1yw.png" alt="Hygraph" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Using Slug on the Frontend
&lt;/h2&gt;

&lt;p&gt;An example REST API request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const { slug } = params
  const graphQLClient = new GraphQLClient(
    'https://api-eu-central-1-shared-euc1-02.hygraph.com/v2/&amp;lt;Your Token&amp;gt;/master'
  )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An example GraphQL Query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const response = await graphQLClient.request(
    `query Blog {
      blog(where:{slug: "${slug}"}){
        id
        title
        img {
          width
          height
          url
        }
        voices {
          url
        }
        seo {
          ... on Seo {
            metaDescription
            metaTitle
          }
     }
    }    `

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why I used PrimeReact for UI library?
&lt;/h2&gt;

&lt;p&gt;PrimeReact is an excellent choice for several reasons. Firstly, it offers an extensive component library with over 90 pre-designed components, allowing for quick and easy development. These components include various interface elements, form elements, and graphics.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iWrjkdIG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pjp3e92vxgo6tawy8v9l.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iWrjkdIG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pjp3e92vxgo6tawy8v9l.jpeg" alt="PrimeReact" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, PrimeReact provides developer-friendly editing facilities with a simple and consistent API design, making it easy to switch between components and edit them. This can significantly improve the efficiency of development teams and positively impact project timelines. PrimeReact also offers pass-through features, allowing for the addition of extra functionality to its components without altering their core features. &lt;br&gt;
Lastly, PrimeReact will soon provide &lt;em&gt;&lt;strong&gt;unstyled mode support&lt;/strong&gt;&lt;/em&gt;, giving users greater control over the style and will allows you to use favorite CSS library like &lt;em&gt;Tailwind, Bootstrap and more&lt;/em&gt;. Overall, PrimeReact offers a comprehensive and flexible solution for web development needs.&lt;/p&gt;

</description>
      <category>react</category>
      <category>nextjs</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
