<?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: Jhon Paredes</title>
    <description>The latest articles on DEV Community by Jhon Paredes (@snesjhon).</description>
    <link>https://dev.to/snesjhon</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%2F11248%2F2cf7bee1-d67d-4b97-ad79-3e944e8907a7.jpg</url>
      <title>DEV Community: Jhon Paredes</title>
      <link>https://dev.to/snesjhon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/snesjhon"/>
    <language>en</language>
    <item>
      <title>README.md as a Personal Site</title>
      <dc:creator>Jhon Paredes</dc:creator>
      <pubDate>Tue, 11 Dec 2018 02:33:24 +0000</pubDate>
      <link>https://dev.to/snesjhon/readmemd-as-a-personal-site-1km7</link>
      <guid>https://dev.to/snesjhon/readmemd-as-a-personal-site-1km7</guid>
      <description>&lt;p&gt;After reading this article &lt;a href="https://dev.to/dstarner/evolution-of-my-personal-site-1849"&gt;Evolution of My Personal Site&lt;/a&gt; I recalled how often I’d change my personal site as well. Most of the time I’d adopt a new framework with a new design. But I was always dissatisfied. &lt;/p&gt;

&lt;p&gt;I found that by the time I’d setup the site, chosen a theme, figured out the workflow (not to mention wrangle all the dependencies) I’d already be disinterested with how I’d update this site continuously. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I wanted something simpler. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here are the requirements I was looking for: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Minimal setup&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I didn’t want to deal with components, routers, boilerplates. &lt;/li&gt;
&lt;li&gt;Local dev workflows are nice, but it depends on how often you'd envision updating this site. For me, it wasn't very frequent. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Clean/Simple Theme&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I enjoy tinkering with themes, but I just wanted to manipulate a couple of simple css rules and be on my way.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Easy to publish -- Anywhere.&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Just push and publish. On my local or phone.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most recently I'd gone through the personal site rabbit hole with GatsbyJS. Although it's a great package -- again, by the time I'd setup everything I'd given up on keeping up with the site. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sometimes too many options is not what everyone wants.&lt;/em&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Inspiration
&lt;/h1&gt;

&lt;p&gt;While reading the &lt;a href="https://github.com/thepracticaldev/dev.to"&gt;dev.to&lt;/a&gt; README.md I was struck with how pleasant it must've been to write it. &lt;/p&gt;

&lt;p&gt;Not only was it clear, but it conveyed enough information to get the developer started. &lt;/p&gt;

&lt;p&gt;So I figured there must be a way of just converting a simple README.md file to a full fledged website and just use that as my personal site. One caveat -- I wanted what I saw on the markdown to be the website. Not another theme or styling, just Github Flavored Markdown style. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Welp. Not so simple.&lt;/em&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Github Pages, Gitlab Pages + showdown.js
&lt;/h1&gt;

&lt;p&gt;Here are my current options when trying to convert a markdown to a personal site. (disclaimer: I'm not saying any of these services are bad -- they just didn't fit my use case)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Github Pages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;As detailed &lt;a href="https://blog.github.com/2016-12-09-publishing-with-github-pages-now-as-easy-as-1-2-3/"&gt;here&lt;/a&gt;, you're able to upload a markdown file and have that as a Github Page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;However, Github Pages are closely tied with Jekyll Themes. They also add a title and header that aren't part of the markdown file. I had to use css to hide unwanted parts of the jekyll theme. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Gitlab Pages + showdown.js&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://about.gitlab.com/product/pages/"&gt;Gitlab Pages&lt;/a&gt; were another option as they have a commit &amp;amp; push pipeline runner. Which is great because I could utilize any markdown cli converter to publish an index.html. &lt;/li&gt;
&lt;li&gt;After searching on &lt;a href="https://github.com/showdownjs/showdown"&gt;many&lt;/a&gt;, &lt;a href="https://pandoc.org/getting-started.html"&gt;many&lt;/a&gt; converters I found that they were great when you wanted to output html -- but not a complete &lt;code&gt;index.html&lt;/code&gt;. That makes sense as they were built to output to a surrounding framework. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  So why not just a simple &lt;code&gt;html&lt;/code&gt; file?
&lt;/h3&gt;

&lt;p&gt;As I learned from the @dstarner blog, sometimes it's best to keep it simple. I wrote up a simple index.html file, added GFM css, and was done! &lt;/p&gt;

&lt;p&gt;But -- well -- have you tried to write html on your phone. It's not the most pleasant experience. Why can't I just write markdown?&lt;/p&gt;




&lt;h1&gt;
  
  
  (Over)Engineering a Solution
&lt;/h1&gt;

&lt;p&gt;I'm thoroughly convinced that 96.4% of all npm modules were written because someone couldn't solve their problem so they wrote it themself. &lt;/p&gt;

&lt;p&gt;SO! I wrote a small cli to solve my problem. &lt;/p&gt;

&lt;p&gt;I called it &lt;a href="https://gitlab.com/snesjhon/singlemd"&gt;singlemd&lt;/a&gt; and it accomplishes exactly what I want wanted. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here's a &lt;a href="https://snesjhon.gitlab.io/singlemd/"&gt;demo site&lt;/a&gt;, and the &lt;a href="https://gitlab.com/snesjhon/singlemd/blob/master/README.md"&gt;README.md&lt;/a&gt; source. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My website is now just a simple markdown file, which I can modify anywhere. And with Gitlab Pages pipeline I can add a &lt;code&gt;.gitlab-ci.yml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;image: node:8.12.0 

pages:
  cache:
    paths:
    - node_modules/

  script:
  - npm install singlemd -g
  - singlemd --input ./README.md --output index.html --style ./public/style.css --title "snesjhon | Jhon Paredes"
  - mv index.html ./public
  artifacts:
    paths:
    - public
  only:
    - master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And anytime I update my README.md my website is updated. &lt;strong&gt;FUN!&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here's my &lt;a href="https://snesjhon.com/"&gt;personal site&lt;/a&gt; and the &lt;a href="https://gitlab.com/snesjhon/snesjhon.gitlab.io"&gt;repo&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Lessons
&lt;/h3&gt;

&lt;p&gt;This is the first npm package that I've published and I'm glad that it was something that I'm actively utilizing. Lots of work left to do, but overall a great experience learning how to create + publish a cli package. &lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>personalsite</category>
      <category>githubpages</category>
      <category>gitlabpages</category>
    </item>
  </channel>
</rss>
