<?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: Özgür Dinç</title>
    <description>The latest articles on DEV Community by Özgür Dinç (@ozgurodun).</description>
    <link>https://dev.to/ozgurodun</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%2F7286%2FK9I8NM2m.jpg</url>
      <title>DEV Community: Özgür Dinç</title>
      <link>https://dev.to/ozgurodun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ozgurodun"/>
    <language>en</language>
    <item>
      <title>Setting up Hugo with Enwrite</title>
      <dc:creator>Özgür Dinç</dc:creator>
      <pubDate>Thu, 02 Nov 2017 19:39:47 +0000</pubDate>
      <link>https://dev.to/ozgurodun/setting-up-hugo-with-enwrite-2k2</link>
      <guid>https://dev.to/ozgurodun/setting-up-hugo-with-enwrite-2k2</guid>
      <description>&lt;p&gt;TLDR; First post here and new to blogging, telling how to setup my new blog with hugo.&lt;/p&gt;

&lt;p&gt;Hi,&lt;br&gt;
This will be first post here, i don't like writing much but seeing people post on dev.to and sharing experiences made me think about writing what i like and what i do. Hope you'll enjoy.&lt;br&gt;
First post will be about setting up my new site.&lt;/p&gt;
&lt;h1&gt;
  
  
  Story Part
&lt;/h1&gt;

&lt;p&gt;I had this domain &lt;a href="https://ozgurodun.com" rel="noopener noreferrer"&gt;ozgurodun.com&lt;/a&gt; for a long time, i tried to setup blogs a few time, but never commit any content. As i said before i am a lazy person when it comes to writing. After dev.to opened i read a lot of developers posts (Many thanks to Ben and Jess for this great platform) and start thinking about sharing. So i decide to setup a blog one more time. This time i will write at least once a month :)&lt;/p&gt;
&lt;h1&gt;
  
  
  Technology
&lt;/h1&gt;

&lt;p&gt;For a long time i wanted to setup a static web site. For this i am using &lt;a href="https://gohugo.io" rel="noopener noreferrer"&gt;Hugo&lt;/a&gt;, fastest framework for building static websites.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbrux9mpg0azjx5yhvu06.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbrux9mpg0azjx5yhvu06.png" alt="Hugo" width="412" height="218"&gt;&lt;/a&gt;&lt;br&gt;
Hugo is easy to deploy and fast but in the end i didnt want to go in cli or using git webhooks for adding new posts. So i searched a bit and found &lt;a href="https://github.com/zzamboni/enwrite" rel="noopener noreferrer"&gt; enwrite &lt;/a&gt;. This will work as a cms for my site. Enwrite syncs up with evernote account and searches for specific notebook and "published" tag then fetches those notes as markdown files or html files to your public directory.&lt;br&gt;
I will use a debian installed vps and glue all this together.&lt;/p&gt;
&lt;h1&gt;
  
  
  Setup
&lt;/h1&gt;
&lt;h3&gt;
  
  
  Hugo
&lt;/h3&gt;

&lt;p&gt;At first i started by installing hugo, which has a ton of documentation &lt;a href="https://gohugo.io/documentation" rel="noopener noreferrer"&gt;here&lt;/a&gt;. I didnt mess with building from source so i downloaded the deb &lt;a href="https://github.com/gohugoio/hugo/releases" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
install and build a new site:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ dpkg -i hugo_0.30.2_Linux-64bit.deb
$ hugo new site my_site_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a new site template( folders and basic configuration files ). And &lt;code&gt;$ hugo server -D&lt;/code&gt; will start a server to use in testing. and -D option will build draft files too.&lt;/p&gt;

&lt;h3&gt;
  
  
  Theme
&lt;/h3&gt;

&lt;p&gt;After this i go to &lt;a href="https://themes.gohugo.io/" rel="noopener noreferrer"&gt;Hugo Themes&lt;/a&gt; and choose "introduction theme". Installing themes are pretty easy too.&lt;br&gt;
Just create a directory named "themes" in your new my_site_name directory and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/hivickylai/hugo-theme-introduction.git introduction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every hugo themes have different feature some have builtin support for disqus, some are designed minimal, some are for portfolios some are for one page cvs. You can choose what fits you better. Thanks to &lt;a href="https://vickylai.io/" rel="noopener noreferrer"&gt;Vicky Lai&lt;/a&gt; she prepared an example site in this repository and i setup my site looking at her example config file.  I played with setting and make some little changes in layout files. I win a cookie by the way when looking in codes. Thanks :)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83q8h94v8t4u0b9rnkby.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83q8h94v8t4u0b9rnkby.png" alt="Vicky Lai's cookie" width="797" height="149"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Enwrite
&lt;/h3&gt;

&lt;p&gt;To install enwrite i needed to apt-get install rubygems, then :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ gem install enwrite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Installation is easy but after playing with enwrite a little bit i realised last commit to enwrite was 3 years ago and after that hugo had many updates. So easy enwrite is not compatible with latest hugo. After hesitating a little i decided to clone the enwrite repository and fix the issue. Luckily code was documented well, and the fix is really small; i changed and build enwrite. And made my first pull request if zzamboni accepts :D (Better late than never).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ enwrite -n my_notebook -t published -o ~/my_new_site
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This searches notes tags "published" in "my_notebook" in evernote and  outputs them to my_new_site folder.&lt;br&gt;
For tests i write a few "lorem ipsum" posts, and run enwrite command with "--rebuild_all"&lt;/p&gt;

&lt;h3&gt;
  
  
  Cron
&lt;/h3&gt;

&lt;p&gt;Finally i made two cron jobs, one for hugo and one for enwrite and every five minutes they will search for new note and build to public folder.&lt;/p&gt;

&lt;h1&gt;
  
  
  Final
&lt;/h1&gt;

&lt;p&gt;This is basicly how i setup my blog. If you have any questions you can ask in comments section.&lt;br&gt;
Have a nice day!! :D&lt;/p&gt;

</description>
      <category>go</category>
      <category>hugo</category>
      <category>blog</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Hi, I'm Ã–zgÃ r DinÃ§</title>
      <dc:creator>Özgür Dinç</dc:creator>
      <pubDate>Fri, 21 Apr 2017 07:11:34 +0000</pubDate>
      <link>https://dev.to/ozgurodun/hi-im-zgr-din</link>
      <guid>https://dev.to/ozgurodun/hi-im-zgr-din</guid>
      <description>&lt;p&gt;I have been coding for [number] years.&lt;/p&gt;

&lt;p&gt;You can find me on Twitter as &lt;a href="https://twitter.com/OzgurOdun" rel="noopener noreferrer"&gt;@ozgurOdun&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I live in Ankara.&lt;/p&gt;

&lt;p&gt;I mostly program in these languages: C, Go.&lt;/p&gt;

&lt;p&gt;I am currently learning more about Golang interfaces and concurrency.&lt;/p&gt;

&lt;p&gt;Nice to meet you.&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
