diff options
author | Santiago Soler <santiago.r.soler@gmail.com> | 2021-03-22 22:15:35 -0300 |
---|---|---|
committer | Santiago Soler <santiago.r.soler@gmail.com> | 2021-03-22 22:15:35 -0300 |
commit | d4723bd0835a10d9cb2116e96ab00b4b2aedb470 (patch) | |
tree | 2fa13fcc5174f1b7849ce20cb11f2db642e63e9b | |
download | website-template-d4723bd0835a10d9cb2116e96ab00b4b2aedb470.tar.gz |
Initial commit
28 files changed, 627 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9e1dc7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.jekyll-cache +Gemfile.lock +_site/ @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "jekyll" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..51be92b --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +all: + bundle exec jekyll build + +serve: + bundle exec jekyll serve + +clean: + bundle exec jekyll clean diff --git a/README.md b/README.md new file mode 100644 index 0000000..25b3bde --- /dev/null +++ b/README.md @@ -0,0 +1,131 @@ +# Source code para construir tu página web en texto-plano.xyz + +Realizado con [Jekyll](https://jekyllrb.com) y un CSS propio, por +[~santisoler](https://texto-plano.xyz/~santisoler) + +## Como armar mi propio sitio web + +### Clonar el repositorio + +Comenzamos por clonar este repositorio utilizando `git`: + +``` +git clone https://git.texto-plano.xyz/santisoler/website-template mi-sitio-web +``` + +Entramos a la carpeta en la que clonamos el repositorio: + +``` +cd mi-sitio-web +``` + +Dentro de esta carpeta encontramos el código fuente para construir nuestro +sitio web. + +### Configurando el sitio + +Primero vamos a editar r el archivo `_config.yml`. +Vamos a configurar el título del sitio y el nickname del autor: + +``` +title: ~santisoler +author: ~santisoler +``` + +Dado que nuestro sitio en texto-plano no está alojado en el root del website, +es necesario configurar el baseurl, que en general debe ser igual a una barra +(`/`) seguida de nuestro nombre de usuario con el tilde: + +``` +baseurl: /~santisoler +``` + +Luego podemos editar el `index.md` para agregar contenido al home de nuestro +sitio. Por ejemplo, podemos escribir algo acerca de nosotros y listar nuestros +perfiles en la red. + +### Añadiendo contenido + +Podemos añadir contenido a nuestro sitio web a través de archivos Markdown. Por +ejemplo, si queremos añadir una nueva entrada a nuestro blog, debemos crear un +archivo en `_posts` cuyo nombre esté compuesto por la fecha de publicación +y luego un nombre sencillo, por ejemplo: + +``` +touch _posts/2021-03-22-mi-primer-posteo.md +``` + +Cada entrada del blog debe tener un header (en YAML) y luego el contenido (en +Markdown). Por ejemplo: + + --- + title: Mi primer posteo + layout: post + excerpt: | + Este es un resumen de mi posteo + --- + + Acá puedo escribir mi entrada del blog usando Markdown. + Puedo armar listas: + + - un elemento + - otro elemento + + O listas numeradas: + + 1. Primer elemento + 2. Segundo elemento + + + Con enlaces, por ejemplo a [Wikipedia](https://www.wikipedia.org). + + O bien podemos crear código: + + ``` + echo "Aguante texto-plano" + ``` + +### Construir el sitio + +Una vez que generamos contenido nuevo, vamos a proceder a construir el sitio +web. Esto lo podemos hacer a través de Jekyll: + +``` +bundle exec jekyll serve +``` + +Este comando generará una carpeta `_site` que contiene todos los archivos +necesarios para servir nuestro sitio web. +Lo único que queda para que lo publiquemos es copiar todos los archivos de esa +carpeta en `~/public_html/`. + +``` +cp -r _site/* ~/public_html/ +``` + +A veces será necesario quitar el sitio web viejo que está siendo servido +y reemplazarlo por el nuevo: + +**USAR ESTE COMANDO CON CUIDADO!** + +``` +rm -r ~/public_html/* +cp -r _site/* ~/public_html/ +``` + +Recuerda que cada vez que creemos una nueva entrada de nuestro blog o hagamos +cualquier modificación a nuestro sitio, lo haremos en los archivos ubicados en +`mi-sitio-web`. Mientras que el contenido de `~/public_html` solo será aquel +que cree automáticamente Jekyll. + + + +## Licencia + +Contenido bajo +[Licencia Creative Commons Atribución 4.0 Internacional][cc-by]. + +[![CC BY 4.0][cc-by-image]][cc-by] + +[cc-by]: https://creativecommons.org/licenses/by/4.0/deed.es +[cc-by-image]: https://i.creativecommons.org/l/by/4.0/88x31.png diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..f01e4d5 --- /dev/null +++ b/_config.yml @@ -0,0 +1,10 @@ +title: FIXME +author: FIXME + +# Configura la url base. En texto-plano en general debe ser igual a una barra +# y luego tu nombre de usuario con el tilde. Por ejemplo: +# baseurl : /~santisoler +baseurl: /FIXME + +# If you want to show posts excerpt on the home page set this to true +show-excerpt: true diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..95a7a35 --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,17 @@ +<footer> + <p> + Contenido disponible bajo + <a href="https://creativecommons.org/licenses/by/4.0/deed.es" + >Creative Commons Atribución 4.0 Internacional</a + > + </p> + <p> + Construida con + <a href="https://jekyllrb.com/">Jekyll</a> y + <a href="https://github.com/tonsky/FiraCode">Fira Code</a> font + </p> + <p> + Este sitio no trackea tu actividad y consume la menor cantidad de recursos + posibles + </p> +</footer> diff --git a/_layouts/base.html b/_layouts/base.html new file mode 100644 index 0000000..dec11b7 --- /dev/null +++ b/_layouts/base.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<html lang="es"> + <head> + <meta charset="UTF-8" /> + <title>{{ site.title }}</title> + <link rel="shortcut icon" href={{ "/images/favicon.png" | absolute_url }} /> + <link rel="stylesheet" href={{ "/assets/fira_code_v5.2/fira_code.css" | + absolute_url }} /> <link rel="stylesheet" href={{ "/css/style.css" | + absolute_url }} /> + </head> + + <body> + <nav> + <ul> + <li> + <div class="nav-item"> + <a href="{{ site.baseurl }}/"> + {% if page.layout == "home" %} + ~ + {% else %} + .. + {% endif %} + </a> + </div> + </li> + <li> + <div class="nav-item"> + <a href={{ "/feed.xml" | absolute_url }}> + RSS + </a> + </div> + </li> + </ul> + </nav> + + {{ content }} + </body> + + {% include footer.html %} +</html> diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..654be00 --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,29 @@ +--- +layout: base +--- + +<header> + <h1>{{ site.title }}</h1> + + <h2> + Sitio de {{ site.author }} en + <a href="https://texto-plano.xyz">texto-plano.xyz</a> + </h2> +</header> + +<main> + + <h1>Blog</h1> + + <ul class="posts-list"> + {% for post in site.posts %} + <li> + <h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2> + <p><em>{{ post.date | date: "%Y-%m-%d"}}</em></p> + {% if site.show-excerpt %}<p>{{ post.excerpt }}</p>{% endif %} + </li> + {% endfor %} + </ul> + + {{ content }} +</main> diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..6cb2dc3 --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,11 @@ +--- +layout: base +--- + +<main> + <h1>{{ page.title }}</h1> + + <p class="date"><em>{{ page.date | date: "%Y-%m-%d" }}</em></p> + + {{ content }} +</main> diff --git a/_posts/2021-03-22-mi-entrada-del-blog.md b/_posts/2021-03-22-mi-entrada-del-blog.md new file mode 100644 index 0000000..313019c --- /dev/null +++ b/_posts/2021-03-22-mi-entrada-del-blog.md @@ -0,0 +1,16 @@ +--- +title: Mi primera entrada del blog +layout: post +excerpt: | + Este es un resumen de mi entrada del blog +--- + +Acá podemos escribir el contenido de mi entrada del blog utilizando +[Markdown](https://es.wikipedia.org/wiki/Markdown) + +Recordá colocar `layout: post` en el header de cada entrada del blog +y colocar la fecha de publicación en su nombre, por ejemplo: + +``` +2021-03-22-un-nombre-sencillo.md +``` diff --git a/assets/fira_code_v5.2/fira_code.css b/assets/fira_code_v5.2/fira_code.css new file mode 100644 index 0000000..d215f82 --- /dev/null +++ b/assets/fira_code_v5.2/fira_code.css @@ -0,0 +1,48 @@ +@font-face { + font-family: 'Fira Code'; + src: url('woff2/FiraCode-Light.woff2') format('woff2'), + url("woff/FiraCode-Light.woff") format("woff"); + font-weight: 300; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code'; + src: url('woff2/FiraCode-Regular.woff2') format('woff2'), + url("woff/FiraCode-Regular.woff") format("woff"); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code'; + src: url('woff2/FiraCode-Medium.woff2') format('woff2'), + url("woff/FiraCode-Medium.woff") format("woff"); + font-weight: 500; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code'; + src: url('woff2/FiraCode-SemiBold.woff2') format('woff2'), + url("woff/FiraCode-SemiBold.woff") format("woff"); + font-weight: 600; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code'; + src: url('woff2/FiraCode-Bold.woff2') format('woff2'), + url("woff/FiraCode-Bold.woff") format("woff"); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code VF'; + src: url('woff2/FiraCode-VF.woff2') format('woff2-variations'), + url('woff/FiraCode-VF.woff') format('woff-variations'); + /* font-weight requires a range: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide#Using_a_variable_font_font-face_changes */ + font-weight: 300 700; + font-style: normal; +}
\ No newline at end of file diff --git a/assets/fira_code_v5.2/woff/FiraCode-Bold.woff b/assets/fira_code_v5.2/woff/FiraCode-Bold.woff Binary files differnew file mode 100644 index 0000000..d7c2099 --- /dev/null +++ b/assets/fira_code_v5.2/woff/FiraCode-Bold.woff diff --git a/assets/fira_code_v5.2/woff/FiraCode-Light.woff b/assets/fira_code_v5.2/woff/FiraCode-Light.woff Binary files differnew file mode 100644 index 0000000..9e99c41 --- /dev/null +++ b/assets/fira_code_v5.2/woff/FiraCode-Light.woff diff --git a/assets/fira_code_v5.2/woff/FiraCode-Medium.woff b/assets/fira_code_v5.2/woff/FiraCode-Medium.woff Binary files differnew file mode 100644 index 0000000..4ffa82d --- /dev/null +++ b/assets/fira_code_v5.2/woff/FiraCode-Medium.woff diff --git a/assets/fira_code_v5.2/woff/FiraCode-Regular.woff b/assets/fira_code_v5.2/woff/FiraCode-Regular.woff Binary files differnew file mode 100644 index 0000000..01a6bfc --- /dev/null +++ b/assets/fira_code_v5.2/woff/FiraCode-Regular.woff diff --git a/assets/fira_code_v5.2/woff/FiraCode-SemiBold.woff b/assets/fira_code_v5.2/woff/FiraCode-SemiBold.woff Binary files differnew file mode 100644 index 0000000..a46df49 --- /dev/null +++ b/assets/fira_code_v5.2/woff/FiraCode-SemiBold.woff diff --git a/assets/fira_code_v5.2/woff/FiraCode-VF.woff b/assets/fira_code_v5.2/woff/FiraCode-VF.woff Binary files differnew file mode 100644 index 0000000..f7ac814 --- /dev/null +++ b/assets/fira_code_v5.2/woff/FiraCode-VF.woff diff --git a/assets/fira_code_v5.2/woff2/FiraCode-Bold.woff2 b/assets/fira_code_v5.2/woff2/FiraCode-Bold.woff2 Binary files differnew file mode 100644 index 0000000..b76a82d --- /dev/null +++ b/assets/fira_code_v5.2/woff2/FiraCode-Bold.woff2 diff --git a/assets/fira_code_v5.2/woff2/FiraCode-Light.woff2 b/assets/fira_code_v5.2/woff2/FiraCode-Light.woff2 Binary files differnew file mode 100644 index 0000000..5084487 --- /dev/null +++ b/assets/fira_code_v5.2/woff2/FiraCode-Light.woff2 diff --git a/assets/fira_code_v5.2/woff2/FiraCode-Medium.woff2 b/assets/fira_code_v5.2/woff2/FiraCode-Medium.woff2 Binary files differnew file mode 100644 index 0000000..f5b273d --- /dev/null +++ b/assets/fira_code_v5.2/woff2/FiraCode-Medium.woff2 diff --git a/assets/fira_code_v5.2/woff2/FiraCode-Regular.woff2 b/assets/fira_code_v5.2/woff2/FiraCode-Regular.woff2 Binary files differnew file mode 100644 index 0000000..c856e7b --- /dev/null +++ b/assets/fira_code_v5.2/woff2/FiraCode-Regular.woff2 diff --git a/assets/fira_code_v5.2/woff2/FiraCode-SemiBold.woff2 b/assets/fira_code_v5.2/woff2/FiraCode-SemiBold.woff2 Binary files differnew file mode 100644 index 0000000..7fa2ac3 --- /dev/null +++ b/assets/fira_code_v5.2/woff2/FiraCode-SemiBold.woff2 diff --git a/assets/fira_code_v5.2/woff2/FiraCode-VF.woff2 b/assets/fira_code_v5.2/woff2/FiraCode-VF.woff2 Binary files differnew file mode 100644 index 0000000..64ffe43 --- /dev/null +++ b/assets/fira_code_v5.2/woff2/FiraCode-VF.woff2 diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..fa60005 --- /dev/null +++ b/css/style.css @@ -0,0 +1,176 @@ +/* ---------------------- */ +/* General configurations */ +/* ---------------------- */ +body { + font-family: "Fira Code", monospace; + background-color: #282c34; + color: #f3f3f3; +} + +nav, +header, +main, +footer { + max-width: 900px; + margin: auto; +} + +h1, +h2, +h3, +h4 { + margin-top: 1.6em; + margin-bottom: 1em; +} + +h1 { + font-size: 30pt; + text-align: center; +} + +h2 { + font-size: 18pt; +} + +h3 { + font-size: 16pt; +} + +h4 { + font-size: 14pt; + font-weight: 400; +} + +p { + font-size: 12pt; + line-height: 1.5em; +} + +a { + color: #61adf5; + text-decoration: none; +} + +a:hover { + color: #c678dd; +} + +li { + line-height: 1.7em; + font-size: 12pt; +} + +pre { + padding-left: 20px; + margin-top: 2em; + margin-bottom: 2em; +} + +code { + color: #98c379; +} + +pre code { + font-size: 12pt; + font-weight: 500; +} + +dd { + display: normal; +} + +/* ------ */ +/* Navbar */ +/* ------ */ + +nav { + display: flex; +} + +nav ul { + width: 100%; + list-style: none; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0; +} + +.nav-item { + text-align: center; + width: 3em; + height: 1.5em; + padding: 5%; + font-size: 14pt; + font-weight: 500; +} + +.nav-item a { + color: #e5c07b; +} + +.nav-item a:hover { + color: #e06c75; +} + +/* ---------------- */ +/* Header and main */ +/* ---------------- */ + +header { + margin-top: 80px; + margin-bottom: 110px; +} + +header h1, +header h2 { + text-align: center; +} + +header h1 { + font-size: 54pt; + margin-top: 1em; + margin-bottom: 0.6em; +} + +header h2 { + font-size: 20pt; + font-weight: 400; + margin-top: 0px; + margin-bottom: 0px; +} + +/* ---- */ +/* Home */ +/* ---- */ + +ul.posts-list { + list-style: none; +} + +ul.posts-list h2 { + margin-top: 1.6em; + margin-bottom: 0.7em; +} + +.date { + text-align: right; +} + +/* ------ */ +/* Footer */ +/* ------ */ +footer { + border-top: 1px solid #dedede; + padding-top: 25px; + padding-bottom: 8px; + margin-top: 100px; + text-align: center; + line-height: 1.3em; +} + +footer p { + font-size: 10pt; + margin-top: 0px; + margin-bottom: 0px; +} diff --git a/feed.xml b/feed.xml new file mode 100644 index 0000000..a6628bd --- /dev/null +++ b/feed.xml @@ -0,0 +1,30 @@ +--- +layout: null +--- +<?xml version="1.0" encoding="UTF-8"?> +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ site.title | xml_escape }}</title> + <description>{{ site.description | xml_escape }}</description> + <link>{{ site.url }}{{ site.baseurl }}/</link> + <atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/> + <pubDate>{{ site.time | date_to_rfc822 }}</pubDate> + <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate> + <generator>Jekyll v{{ jekyll.version }}</generator> + {% for post in site.posts limit:10 %} + <item> + <title>{{ post.title | xml_escape }}</title> + <description>{{ post.content | xml_escape }}</description> + <pubDate>{{ post.date | date_to_rfc822 }}</pubDate> + <link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link> + <guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid> + {% for tag in post.tags %} + <category>{{ tag | xml_escape }}</category> + {% endfor %} + {% for cat in post.categories %} + <category>{{ cat | xml_escape }}</category> + {% endfor %} + </item> + {% endfor %} + </channel> +</rss> diff --git a/images/favicon.png b/images/favicon.png Binary files differnew file mode 100644 index 0000000..80f3261 --- /dev/null +++ b/images/favicon.png diff --git a/images/favicon.svg b/images/favicon.svg new file mode 100644 index 0000000..76185c7 --- /dev/null +++ b/images/favicon.svg @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="11.397074mm" + height="11.397074mm" + viewBox="0 0 11.397074 11.397074" + version="1.1" + id="svg8" + inkscape:version="1.0.2 (e86c870879, 2021-01-15)" + sodipodi:docname="favicon.svg" + inkscape:export-filename="/home/santi/git/website-texto-plano.xyz/images/favicon.png" + inkscape:export-xdpi="142.63" + inkscape:export-ydpi="142.63"> + <defs + id="defs2"> + <rect + x="21.84395" + y="61.589588" + width="163.85466" + height="90.397125" + id="rect12" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="5.6" + inkscape:cx="-2.0382458" + inkscape:cy="39.761126" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + inkscape:document-rotation="0" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1920" + inkscape:window-height="1027" + inkscape:window-x="0" + inkscape:window-y="25" + inkscape:window-maximized="1" /> + <metadata + id="metadata5"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-32.190242,-72.146625)"> + <circle + style="fill:#2e2e2e;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none" + id="path21" + cx="37.888779" + cy="77.845161" + r="5.6985369" /> + <g + aria-label="~" + id="text10" + style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect12);fill:#f3f3f3;fill-opacity:1;stroke:none" + transform="matrix(1.1871921,0,0,1.1871921,8.0900789,-3.5972109)"> + <path + d="m 24.074384,66.60629 c -0.966065,0 -1.432816,0.748972 -1.758456,1.38397 l 0.65128,0.320212 c 0.282221,-0.521024 0.602434,-0.917219 1.074612,-0.917219 0.683844,0 1.069185,1.085467 2.084096,1.085467 0.95521,0 1.438243,-0.7544 1.758456,-1.373116 l -0.65128,-0.336494 c -0.282222,0.515596 -0.624143,0.922646 -1.074612,0.922646 -0.662135,0 -0.998629,-1.085466 -2.084096,-1.085466 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'FiraCode Nerd Font';-inkscape-font-specification:'FiraCode Nerd Font';fill:#f3f3f3;fill-opacity:1" + id="path16" /> + <path + d="m 24.074384,68.722955 c -0.966065,0 -1.432816,0.748972 -1.758456,1.38397 l 0.65128,0.320212 c 0.282221,-0.521024 0.602434,-0.917219 1.074612,-0.917219 0.683844,0 1.069185,1.085467 2.084096,1.085467 0.95521,0 1.438243,-0.7544 1.758456,-1.373116 l -0.65128,-0.336494 c -0.282222,0.515596 -0.624143,0.922646 -1.074612,0.922646 -0.662135,0 -0.998629,-1.085466 -2.084096,-1.085466 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'FiraCode Nerd Font';-inkscape-font-specification:'FiraCode Nerd Font';fill:#f3f3f3;fill-opacity:1" + id="path19" /> + </g> + </g> +</svg> diff --git a/index.md b/index.md new file mode 100644 index 0000000..dc12ce2 --- /dev/null +++ b/index.md @@ -0,0 +1,13 @@ +--- +layout: home +--- + +# Acerca de + +Acá escribo algo acerca de mí. + +## Mis perfiles en la red + +- Gopherhole: [~miusuario](https://gopher.tildeverse.org/texto-plano.xyz/1/~miusuario) +- Mail: miusuario arroba texto-plano.xyz +- [Clave pública GPG](url_a_mi_clave_publica) |