<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Lemys López</title>
    <description>Lemys López thougs</description>
    <link>http://lemyskaman.com/</link>
    <atom:link href="http://lemyskaman.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Fri, 11 Aug 2023 18:12:52 +0000</pubDate>
    <lastBuildDate>Fri, 11 Aug 2023 18:12:52 +0000</lastBuildDate>
    <generator>Jekyll v3.9.3</generator>
    
      <item>
        <title>prueba</title>
        <description>&lt;p&gt;esta es una pagina de prueba&lt;/p&gt;
</description>
        <pubDate>Fri, 11 Aug 2023 00:00:00 +0000</pubDate>
        <link>http://lemyskaman.com/prueba</link>
        <guid isPermaLink="true">http://lemyskaman.com/prueba</guid>
        
        
      </item>
    
      <item>
        <title>PHP Diferentes versiones en un servidor</title>
        <description>&lt;p&gt;Aveces queremos compartir los recursos disponibles de nuestro servidor entre diferentes aplicaciones o soluciones escritas en diferentes versiones de PHP, Sin embargo por lo general en el repositorio de nuestro sistema operativo (alemnos en debian y ubuntu ) solo encontramos una version disponible o un muy limitado rango de versiones a instalar.&lt;/p&gt;

&lt;p&gt;Si bien la comunidad que desarrolla php junto a la mayoría de los cms, aplicaciones y frameworks desarrollados en php, hacen lo posible en respetar la filosofía de “backward compatibility” (que traducido al español es compatibilidad hacia atrás), algunos cambios y mejoras introducidas en la especificación de el lenguaje junto a a la eliminación de características marcadas como obsoletas impiden que código escrito en versiones antiguas sean correctamente ejecutadas por el interprete de php.&lt;/p&gt;

&lt;p&gt;Una solucion simple y directa para que coexistan diferentes versiones de php, probada en ubuntu 18.04 que deberia funcionar tambien en versiones superiores, seria añadir el  &lt;a href=&quot;https://launchpad.net/~ondrej/+archive/ubuntu/php&quot;&gt;repositorio PPA&lt;/a&gt;  de &lt;a href=&quot;https://twitter.com/oerdnj&quot;&gt;Ondřej Surý&lt;/a&gt; que nos pone a disposicion la version 5.6 de php y las mayores a 7.0 y desde donde podemos instalarlas para que coexistan (todas inclusive) en un mismo sistema operativo.&lt;/p&gt;

&lt;p&gt;Para añadir el repositorio a nuestro sistema solo es necesario ejecutar el siguiente comando:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$sudo add-apt-repository ppa:ondrej/php
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Luego actualizamos la lista de paquetes:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$sudo apt-get update 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Si usas Apache como servidor http puedes ejecutar cualquiera de los siguientes comandos segun la version que deseas instalar:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$sudo apt install php5.6   [PHP 5.6]
$sudo apt install php7.0   [PHP 7.0]
$sudo apt install php7.1   [PHP 7.1]
$sudo apt install php7.2   [PHP 7.2]
$sudo apt install php7.3   [PHP 7.3]
$sudo apt install php7.4s   [PHP 7.4]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Si el caso es nginx entonces debes instalar la fpm de la version:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$sudo apt install php5.6-fpm   [PHP 5.6]
$sudo apt install php7.0-fpm   [PHP 7.0]
$sudo apt install php7.1-fpm   [PHP 7.1]
$sudo apt install php7.2-fpm   [PHP 7.2]
$sudo apt install php7.3-fpm   [PHP 7.3]
$sudo apt install php7.4-fpm   [PHP 7.4]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Tue, 24 Mar 2020 20:00:00 +0000</pubDate>
        <link>http://lemyskaman.com/PHP-diferentes-versiones-en-un-servidor</link>
        <guid isPermaLink="true">http://lemyskaman.com/PHP-diferentes-versiones-en-un-servidor</guid>
        
        <category>guides_and_tutorials</category>
        
        
        <category>es</category>
        
        <category>posts</category>
        
      </item>
    
      <item>
        <title>PHP Running Multiple Versions on a Server</title>
        <description>&lt;p&gt;Most of the time we want to share the resources of our server among different applications written in also different php versions. But normaly our web server os, ships with a close range of different php versions or with only one available version to install.&lt;/p&gt;

&lt;p&gt;The people behind php and its community including cms, apps and frameworks creators, do their best on what  is known as backward compatibility. But some changes and upgrades introduced on the language specification together with the deprecation of some characteristics makes hard to allow legacy code to be interpreted by the php preprocesor&lt;/p&gt;

&lt;p&gt;One proved simple solution to allow the coexistence of multiple php versions  on ubuntu &amp;gt;=18.04 would be to add the &lt;a href=&quot;https://launchpad.net/\~ondrej/+archive/ubuntu/php&quot;&gt;PPA&lt;/a&gt; repository of  &lt;a href=&quot;https://twitter.com/oerdnj&quot;&gt;Ondřej Surý&lt;/a&gt;, in which we can find the 5.6 version and all above 7.0, available to install in the same OS.&lt;/p&gt;

&lt;p&gt;We only need to run the next command to add the repository:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$sudo add-apt-repository ppa:ondrej/php
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then we update all packages:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$sudo apt-get update 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you use Apache as http server you can run any of the next commands depending of the versions you want to install&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$sudo apt install php5.6   [PHP 5.6]
$sudo apt install php7.0   [PHP 7.0]
$sudo apt install php7.1   [PHP 7.1]
$sudo apt install php7.2   [PHP 7.2]
$sudo apt install php7.3   [PHP 7.3]
$sudo apt install php7.4s   [PHP 7.4]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Otherwise if you are nginx user the you should use the related fpm version:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$sudo apt install php5.6-fpm   [PHP 5.6]
$sudo apt install php7.0-fpm   [PHP 7.0]
$sudo apt install php7.1-fpm   [PHP 7.1]
$sudo apt install php7.2-fpm   [PHP 7.2]
$sudo apt install php7.3-fpm   [PHP 7.3]
$sudo apt install php7.4-fpm   [PHP 7.4]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Tue, 24 Mar 2020 20:00:00 +0000</pubDate>
        <link>http://lemyskaman.com/PHP-running-multiple-versions-on-a-server</link>
        <guid isPermaLink="true">http://lemyskaman.com/PHP-running-multiple-versions-on-a-server</guid>
        
        <category>guides_and_tutorials</category>
        
        
        <category>en</category>
        
        <category>posts</category>
        
      </item>
    
      <item>
        <title>Sitio web con jekyll en github</title>
        <description>&lt;p&gt;Github es bien conocido como “la base de datos más grande de código fuente de software” pero hoy en día parte de su cartera de servicios gratis, te permite servir archivos web estáticos para tu propio sitio, (de la misma forma como funciona este sitio). Estas líneas pretenden ser una guía en el proceso de publicar en github archivos web, generados por una herramienta bastante popular creada con ruby llamada Jekyll, usando la consola de comandos.&lt;/p&gt;

&lt;p&gt;En esta guía &lt;strong&gt;yo asumo que cuentas con algo de conocimientos sobre cómo funciona un sitio web, algo de experiencia usando git con una cuenta de github,&lt;/strong&gt; y también que usas una versión reciente de alguna distribución Debian o basada en Debian como Ubuntu, me centraré únicamente en el proceso de crear un sitio nuevo de jekyll localmente y entonces subirlo a github.&lt;/p&gt;

&lt;h4 id=&quot;instalando-dependencias&quot;&gt;Instalando Dependencias&lt;/h4&gt;

&lt;p&gt;Jekyll fue programado con ruby, y por tanto hace bastante uso de algunas de sus gemas, también son necesarias algunas librerías y archivos de cabecera, distribuidas para nosotros dentro de los paquetes .deb: build-essential y zlib1-dev. Estos paquetes pueden ser instalados con tu gestor de paquetes favoritos o con apt como a continuación:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo apt-get install ruby-full build-essential zlib1g-dev git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;configurando-las-gemas-que-son-necesarias&quot;&gt;Configurando las gemas que son necesarias&lt;/h4&gt;

&lt;p&gt;No es buena idea instalar las gemas de ruby como superusuario, es por esto que es recomendable crear un directorio en la carpeta personal de nuestro usuario de nuestro sistema operativo, así que sera esto lo que haremos con los siguientes comandos&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ cd ~
$ mkdir gems
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Ahora es necesario editar el archivo ~/.bashrc, añadiendo una variable de entorno nueva(&lt;strong&gt;GEM_HOME&lt;/strong&gt;), y actualizando el valor de una existente (&lt;strong&gt;PATH&lt;/strong&gt;),  puedes usar tu editor de texto favorito aunque yo prefiero nano:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ nano .bashrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Luego al final del archivo escribe lo siguiente:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#gemas
export GEM_HOME=&quot;$HOME/gems&quot;
export PATH=&quot;$HOME/gems/bin:$PATH&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Finalmente cargamos el script, y estamos listos para usar las gemas de ruby:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;instalando-jekyll-y-github-pages&quot;&gt;Instalando jekyll y github-pages&lt;/h4&gt;

&lt;p&gt;Ahora con un entorno ruby instalado correctamente, nosotros podemos continuar con la instalación de jekyll, de una utilidad llamada bundler y de una gema creada por la gente de github.com con todo lo necesario para para hacer funcionar nuestro sitio en sus servidores:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ gem install jekyll bundler git  github-pages
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Hasta ahora, si todo nos ha salido bien, estamos listos para crear un nuevo sitio jekyll de forma local.&lt;/p&gt;

&lt;h4 id=&quot;creando-un-sitio-con-jekyll&quot;&gt;Creando un sitio con jekyll&lt;/h4&gt;

&lt;p&gt;Podemos crear un nuevo sitio usando el comando jekyll de la siguiente forma:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ jekyll new usuario.github.io
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Donde “usuario” es el username de nuestra cuenta en github (en mi caso mi cuenta es lemyskaman), luego nos dirigimos a la nueva carpeta creada por jekyll :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ cd user.github.io
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Deberías ver una estructura de archivos como esta:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ tree
├── 404.html
├── about.md
├── _config.yml
├── Gemfile
├── index.md
└── _posts
        └── 2019-04-29-welcome-to-jekyll.markdown
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;editando-el-archivo-gemfile-para-github-actualizar-las-gemas-y-probar&quot;&gt;Editando el archivo Gemfile para github, actualizar las gemas y probar.&lt;/h4&gt;

&lt;p&gt;Es necesario comentar la línea que usa la versión de consola de jekyll y descomentar la que instala la gema de github-pages para hacer eso simplemente agrega a inicio de la línea 11 un # , y borra el numeral # de el inicio de la línea 18, el Gemfile debería verse de la siguiente forma para la versión 3.8.x de jekyll o parecido en otras versiones:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;10 &lt;span class=&quot;c&quot;&gt;# Happy Jekylling!&lt;/span&gt;
11 gem &lt;span class=&quot;s2&quot;&gt;&quot;jekyll&quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\~&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;gt; 3.8.5&quot;&lt;/span&gt;
12
13 &lt;span class=&quot;c&quot;&gt;# This is the default theme for new Jekyll sites. You may change this to anything you lik$&lt;/span&gt;
14 gem &lt;span class=&quot;s2&quot;&gt;&quot;minima&quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\~&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;gt; 2.0&quot;&lt;/span&gt;
15
16 &lt;span class=&quot;c&quot;&gt;# If you want to use GitHub Pages, remove the &quot;gem &quot;jekyll&quot;&quot; above and&lt;/span&gt;
17 &lt;span class=&quot;c&quot;&gt;# uncomment the line below. To upgrade, run \`bundle update github-pages\`.&lt;/span&gt;
18 &lt;span class=&quot;c&quot;&gt;# gem &quot;github-pages&quot;, group: :jekyll_plugins&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Ahora puedes actualizar las gemas usando el comando bundle:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ bundle update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Jekyll viene con un servidor web para pruebas locales, mientras que la herramienta bundle supervisa nuestro código y “re-compila” nuestro sitio, a medida que lo modificamos localmente, para correr el servidor ejecutamos lo siguiente:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ bundle exec jekyll serve --host=0.0.0.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Ahora abre tu explorador web favorito apuntando a la dirección  http://localhost:4000 y deberías ver tu sitio.&lt;/p&gt;

&lt;h4 id=&quot;subir-tu-sitio-a-github-y-hacerlo-publico&quot;&gt;Subir tu sitio a github y hacerlo publico&lt;/h4&gt;

&lt;p&gt;Primero es necesario crear un repositorio en &lt;a href=&quot;http://github.com&quot; title=&quot;github&quot;&gt;http://github.com&lt;/a&gt; usando tu no nombre de usuario en github  como prefijo a .github.io, en pocas palabras crea un proyecto con el nombre de la carpeta creada con jekyll en uno de los pasos anteriores, que contiene los archivos de tu sitio (usuario.github.io), luego inicializamos git y lo configuramos  para seguir la rama de tu proyecto con los siguientes comandos :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git init
$ git remote add origin git@github.com:usuario/usuario.github.io
$ git push -u origin master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Recuerda siempre reemplazar usuario con el tu nombre de usuario en github y finalmente tu sitio debería estar disponible en http://user.github.io.&lt;/p&gt;

&lt;p&gt;Como un administrador de contenido Jekyll tiene bastantes ventajas, al usar el mecanismo de plantillas &lt;a href=&quot;https://shopify.github.io/liquid/&quot; title=&quot;liquid&quot;&gt;liquid&lt;/a&gt;, básicamente funciona tomando el texto de archivos tipo &lt;a href=&quot;https://es.wikipedia.org/wiki/Markdown&quot; title=&quot;markdown&quot;&gt;markdown&lt;/a&gt; junto a la data en su cabecera ( &lt;a href=&quot;https://jekyllrb.com/docs/front-matter/&quot; title=&quot;jekyll front matter&quot;&gt;front matter&lt;/a&gt; ) para construir el sitio, yo haré un post explicando mas detalladamente como funciona cómo se usa y las cosas que he aprendido acerca de el uso y las bondades de jekyll.&lt;/p&gt;
</description>
        <pubDate>Sat, 27 Apr 2019 04:00:00 +0000</pubDate>
        <link>http://lemyskaman.com/sitio-web-con-jekyll-en-github</link>
        <guid isPermaLink="true">http://lemyskaman.com/sitio-web-con-jekyll-en-github</guid>
        
        <category>guides_and_tutorials</category>
        
        
        <category>es</category>
        
        <category>posts</category>
        
      </item>
    
      <item>
        <title>Jekyll Website on Github</title>
        <description>&lt;p&gt;Github is well know as the “biggest database of software code” but nowadays their public non paid services, allows you to  serve static web files to as your own website (just like this one that you are reading). This lines will guide you through  the process of publishing some static web-files, generated with the use of a popular ruby coded tool called Jekyll, on github pages using the linux terminal.&lt;/p&gt;

&lt;p&gt;In this guide &lt;strong&gt;I’ll assume you have some basic knowledge about how a website works, some experience using git with a github account,&lt;/strong&gt; and also that you are using a current stable version of Debian or some debian based os like Ubuntu, i will focus only in the process of creating a new site with jekyll locally and then pushing it on github.&lt;/p&gt;

&lt;h4 id=&quot;installing-dependencies&quot;&gt;Installing dependencies&lt;/h4&gt;

&lt;p&gt;Jekyll was developed with ruby, and therefore it makes planty use of some of it gems, also some development tools libraries and header files are needed, they are shipped to us inside build-essential and zlib1-dev deb packages. You can install them using apt (or your favourite package manager), running a command like this might be enough to get them:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get install ruby-full build-essential zlib1g-dev git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;configuring-gems-with-a-user-directory&quot;&gt;Configuring gems with a user directory&lt;/h4&gt;

&lt;p&gt;It’s not a good thing to install ruby gems as a root user, thats why to create a gems dir on our os user folder, that holds all of our libs, is a better approach, so thats the first thing to do to create a gems dir:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ cd ~ \ 
$ mkdir gems
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So we need to edit our  ~/.bashrc file, adding a new environment var (&lt;strong&gt;GEM_HOME&lt;/strong&gt;), and updating the value of another (&lt;strong&gt;PATH&lt;/strong&gt;),  you can edit the file with you fav text editor, i like to use nano:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ nano .bashrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then at the very end type something like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#gem stuf 
export GEM_HOME=&quot;$HOME/gems&quot; 
export PATH=&quot;$HOME/gems/bin:$PATH&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Finally we load the file and we are ready to install some gems stuff:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;installing-jekyll-and-github-pages&quot;&gt;Installing Jekyll and github-pages&lt;/h4&gt;

&lt;p&gt;Now with properly setted ruby environment we can continue installing jekyll and other ruby tools like bundler and github-pages the last one is like a metapackage with all ruby gems for a github based jekyll website:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ gem install jekyll bundler git  github-pages
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So far if nothing goes wrong we are ready to create a new jekyll site.&lt;/p&gt;

&lt;h4 id=&quot;creating-a-new-jekyll-site&quot;&gt;Creating a new jekyll site&lt;/h4&gt;

&lt;p&gt;It can be done using the jekyll command where user its your own username at github.com:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ jekyll new user.github.io 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Remember to replace “user” with your github username, (in my case my username is &lt;a href=&quot;https://github.com/lemyskaman&quot; title=&quot;lemyskaman&quot;&gt;lemyskaman&lt;/a&gt;), then we change to our newly directory containing the files of our site:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ cd user.github.io
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It should have inside a  directory tree  like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ tree
├── 404.html
├── about.md
├── _config.yml
├── Gemfile
├── index.md
└── _posts
	└── 2019-04-29-welcome-to-jekyll.markdown
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;editing-the-gemfile-for-github-update-gems-and-test&quot;&gt;Editing the Gemfile for github, update gems and test&lt;/h4&gt;

&lt;p&gt;It necessary to comment the line that use the jekyll version and uncomment the one that install the gem github-pages to do so just prepend a # at the beginning of the line number 11, and remove the # from the line number 18, the gemfile should look similar to this&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;10 &lt;span class=&quot;c&quot;&gt;# Happy Jekylling!&lt;/span&gt;

11 gem &lt;span class=&quot;s2&quot;&gt;&quot;jekyll&quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\~&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;gt; 3.8.5&quot;&lt;/span&gt;

12

13 &lt;span class=&quot;c&quot;&gt;# This is the default theme for new Jekyll sites. You may change this to anything you lik$&lt;/span&gt;

14 gem &lt;span class=&quot;s2&quot;&gt;&quot;minima&quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\~&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;gt; 2.0&quot;&lt;/span&gt;

15

16 &lt;span class=&quot;c&quot;&gt;# If you want to use GitHub Pages, remove the &quot;gem &quot;jekyll&quot;&quot; above and&lt;/span&gt;

17 &lt;span class=&quot;c&quot;&gt;# uncomment the line below. To upgrade, run \`bundle update github-pages\`.&lt;/span&gt;

18 &lt;span class=&quot;c&quot;&gt;# gem &quot;github-pages&quot;, group: :jekyll_plugins&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Then you can update the gems with the bundle command:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ bundle update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Jekyll comes with a web server for local testing, and bundle tool checks for changes in the code to fire things up just run:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ bundle exec jekyll serve --host=0.0.0.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now if you open your favourite browser at localhost:4000 you should be able to view your site.&lt;/p&gt;

&lt;h4 id=&quot;push-your-site-to-github-and-make-it-public&quot;&gt;Push your site to github and make it public&lt;/h4&gt;

&lt;p&gt;First you need to create a repository project on github.com with your github username prepend to github.io domine name, in short: create a new project repository with the same name of your newly directory containing the files of your site (user.github.io), then initialize git tracking and configure where to push with the following commands:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git init
$ git remote add origin git@github.com:user/user.github.io 
$ git push -u origin master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Finally you will be able to view your site at http://user.github.io.&lt;/p&gt;

&lt;p&gt;Jekyll as a cms has a lot of features and it use the &lt;a href=&quot;https://shopify.github.io/liquid/basics/types/&quot; title=&quot;liquid&quot;&gt;liquid template engine&lt;/a&gt; and it, basicaly works using text data form &lt;a href=&quot;https://en.wikipedia.org/wiki/Markdown&quot; title=&quot;markdown&quot;&gt;markdown&lt;/a&gt; files with its header data ( &lt;a href=&quot;https://jekyllrb.com/docs/front-matter/&quot; title=&quot;jekyll front matter&quot;&gt;front matter&lt;/a&gt; ) to builld our site, i will make a post soon telling you more about it and teaching what i’ve  learned about jekyll usage.&lt;/p&gt;
</description>
        <pubDate>Sat, 27 Apr 2019 04:00:00 +0000</pubDate>
        <link>http://lemyskaman.com/jekyll-on-github-website</link>
        <guid isPermaLink="true">http://lemyskaman.com/jekyll-on-github-website</guid>
        
        <category>guides_and_tutorials</category>
        
        
        <category>en</category>
        
        <category>posts</category>
        
      </item>
    
  </channel>
</rss>
