diff --git a/.gitignore b/.gitignore index 9bbf0e2..8a3876e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -dist .sass-cache .jekyll-cache .jekyll-metadata vendor +_site diff --git a/Dockerfile b/Dockerfile index 9c337ac..1ffcae4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,6 @@ EXPOSE 4000 WORKDIR /app COPY Gemfile . -RUN gem install bundler -RUN bundle install -CMD [ "bundle", "exec", "jekyll", "serve", "--force_polling", "-H", "0.0.0.0", "-P", "4000" ] +RUN gem install bundler && bundle install +ENTRYPOINT [ "bundle", "exec", "jekyll" ] +CMD [ "serve", "-H", "0.0.0.0", "--force_polling", "--livereload", "--drafts" ] diff --git a/Gemfile b/Gemfile index 33ebcb9..c61d2d4 100644 --- a/Gemfile +++ b/Gemfile @@ -2,11 +2,9 @@ source "https://rubygems.org" gem "jekyll", "~> 4.3.4" -# If you want to use GitHub Pages, remove the "gem "jekyll"" above and -# uncomment the line below. To upgrade, run `bundle update github-pages`. -# gem "github-pages", group: :jekyll_plugins - -# If you have any plugins, put them here! group :jekyll_plugins do gem "jekyll-feed", "~> 0.12" + gem "jekyll-compose", "~> 0.12.0" end + +gem "kramdown-syntax-coderay", "~> 1.0" diff --git a/Gemfile.lock b/Gemfile.lock index f869b04..151171f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,19 +4,16 @@ GEM addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) bigdecimal (3.1.8) + coderay (1.1.3) colorator (1.1.0) concurrent-ruby (1.3.4) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) eventmachine (1.2.7) - ffi (1.17.0-aarch64-linux-gnu) ffi (1.17.0-x86_64-linux-gnu) forwardable-extended (2.6.0) - google-protobuf (4.29.0-aarch64-linux) - bigdecimal - rake (>= 13) - google-protobuf (4.29.0-x86_64-linux) + google-protobuf (4.29.2-x86_64-linux) bigdecimal rake (>= 13) http_parser.rb (0.8.0) @@ -38,6 +35,8 @@ GEM safe_yaml (~> 1.0) terminal-table (>= 1.8, < 4.0) webrick (~> 1.7) + jekyll-compose (0.12.0) + jekyll (>= 3.7, < 5.0) jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) jekyll-sass-converter (3.0.0) @@ -48,6 +47,9 @@ GEM rexml (>= 3.3.9) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) + kramdown-syntax-coderay (1.0.1) + coderay (~> 1.1) + kramdown (~> 2.0) liquid (4.0.4) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) @@ -60,25 +62,24 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.3.9) + rexml (3.4.0) rouge (4.5.1) safe_yaml (1.0.5) - sass-embedded (1.81.0-aarch64-linux-gnu) - google-protobuf (~> 4.28) - sass-embedded (1.81.0-x86_64-linux-gnu) + sass-embedded (1.83.0-x86_64-linux-gnu) google-protobuf (~> 4.28) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) unicode-display_width (2.6.0) - webrick (1.9.0) + webrick (1.9.1) PLATFORMS - aarch64-linux x86_64-linux-gnu DEPENDENCIES jekyll (~> 4.3.4) + jekyll-compose (~> 0.12.0) jekyll-feed (~> 0.12) + kramdown-syntax-coderay (~> 1.0) BUNDLED WITH - 2.5.23 + 2.6.1 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5e47eea --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +args := + +default: clean start + +start: + docker compose up -d + +rebuild: + docker compose up -d --build + +stop: + docker compose down + +clean: + \rm -rf .jekyll-cache _site + docker compose down -v + +logs: + docker compose logs --follow --since 1m + +build: + docker compose run --rm -e JEKYLL_ENV=production jekyll build + +install: + docker compose run --rm --entrypoint bash jekyll -c bundle add ${args} + +make draft: + docker compose run --rm jekyll draft ${args} + +make publish: + docker compose run --rm jekyll publish ${args} + +make unpublish: + docker compose run --rm jekyll unpublish ${args} diff --git a/_config.yml b/_config.yml index 79711eb..7931fc5 100644 --- a/_config.yml +++ b/_config.yml @@ -1,9 +1,8 @@ -# Site settings title: Erick Ruiz de Chavez author: Erick Ruiz de Chavez url: https://erickruizdechavez.com -social_links: +site_links: - title: 💼 LinkedIn url: https://linkedin.com/in/erickruizdechavez - title: 🐙 GitHub @@ -13,7 +12,17 @@ social_links: - title: 🦋 Bluesky url: https://bsky.app/profile/erick.social -# Build settings -source: src -destination: dist -livereload: true +exclude: + - Dockerfile + - compose.yaml + - Makefile + +jekyll_compose: + default_front_matter: + drafts: + layout: article + posts: + layout: article + +kramdown: + syntax_highlighter: coderay diff --git a/_drafts/.gitkeep b/_drafts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..1983435 --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,3 @@ + diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 0000000..38ed18d --- /dev/null +++ b/_includes/head.html @@ -0,0 +1,7 @@ + + + + + + {{ site.title }} + diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 0000000..739040d --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,22 @@ + diff --git a/_layouts/article.html b/_layouts/article.html new file mode 100644 index 0000000..8b4c54b --- /dev/null +++ b/_layouts/article.html @@ -0,0 +1,14 @@ +--- +layout: default +--- +
+

+ {{ page.title | escape }} +

+ +
+ {{ content }} +
+
diff --git a/src/_layouts/default.html b/_layouts/default.html similarity index 100% rename from src/_layouts/default.html rename to _layouts/default.html diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..b4c2d6b --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,21 @@ +--- +layout: default +--- +
+ {{ content }} + + {%- if site.posts.size > 0 -%} +
+

Articles

+ +
+ {%- endif -%} +
diff --git a/_posts/.gitkeep b/_posts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/_sass/main.scss b/_sass/main.scss similarity index 58% rename from src/_sass/main.scss rename to _sass/main.scss index ba09222..bc9de8d 100644 --- a/src/_sass/main.scss +++ b/_sass/main.scss @@ -23,42 +23,78 @@ body { align-items: center; } -header { - margin-top: 40px; - display: flex; - flex-direction: column; - align-items: center; - - img { - width: 200px; - height: 200px; - border-radius: 100px; - } +h1 { + font-size: 1.5rem; } -nav { - display: flex; - flex-wrap: wrap; - justify-content: center; - margin: 40px 0; +h2 { + font-size: 1.2rem; +} - a { - display: block; - margin: 0 20px; - opacity: .8; - } +h3 { + font-size: 1.1rem; +} + +h4,h5,h6 { + font-size: 1rem; +} + +main { + margin: 20px; + opacity: .8; + line-height: 1.5rem; } a { text-decoration: none; } -main { - margin: 20px; - opacity: .8; +.site_header { + margin-top: 40px; + display: flex; + flex-direction: column; + align-items: center; + } -footer { +.panda { + width: 200px; + height: 200px; + border-radius: 100px; +} + +.site_links { + display: flex; + flex-wrap: wrap; + justify-content: center; + margin: 40px 0; + + &__link { + display: block; + margin: 0 20px; + opacity: .8; + } +} + +.site_footer { margin-top: 40px; + padding-bottom: 20px; opacity: .3; } + +.articles { + opacity: .8; + margin-top: 60px; +} + +.article { + &__back { + font-size: .9rem; + } + + &__published { + font-style: italic; + font-size: .9rem; + opacity: .6; + } +} diff --git a/src/assets/panda.webp b/assets/panda.webp similarity index 100% rename from src/assets/panda.webp rename to assets/panda.webp diff --git a/src/assets/styles.scss b/assets/styles.scss similarity index 100% rename from src/assets/styles.scss rename to assets/styles.scss diff --git a/compose.yml b/compose.yaml similarity index 68% rename from compose.yml rename to compose.yaml index 882d659..f480fd8 100644 --- a/compose.yml +++ b/compose.yaml @@ -1,8 +1,6 @@ services: jekyll: - build: - context: . - dockerfile: Dockerfile + build: . platform: linux/amd64 ports: - 4000:4000 diff --git a/src/index.md b/index.md similarity index 100% rename from src/index.md rename to index.md diff --git a/src/_includes/footer.html b/src/_includes/footer.html deleted file mode 100644 index 280cd2b..0000000 --- a/src/_includes/footer.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/_includes/head.html b/src/_includes/head.html deleted file mode 100644 index 11c927b..0000000 --- a/src/_includes/head.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - {{ site.title }} - diff --git a/src/_includes/header.html b/src/_includes/header.html deleted file mode 100644 index 1e85363..0000000 --- a/src/_includes/header.html +++ /dev/null @@ -1,17 +0,0 @@ -
- Generated Image of an anthropomorphic Panda wearing a sweater and jeans, sitting on a couch, using a laptop. - - {%- if site.social_links -%} - - - {%- endif -%} -
diff --git a/src/_layouts/home.html b/src/_layouts/home.html deleted file mode 100644 index a9d347e..0000000 --- a/src/_layouts/home.html +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: default ---- - -
- {%- if page.title -%} -

{{ page.title }}

- {%- endif -%} - - {{ content }} -
\ No newline at end of file