From 6c1cd06a243936a8419be4dde180f8a00b3c072e Mon Sep 17 00:00:00 2001 From: Gabriel Altay Date: Sat, 4 Jan 2025 14:36:13 -0500 Subject: [PATCH] add extra dirs, fix up post --- _config.yml | 13 +++-- _data/navigation.yml | 7 +++ _pages/404.md | 8 +++ _pages/category-archive.md | 6 +++ _pages/tag-archive.md | 6 +++ _pages/year-archive.md | 6 +++ _posts/2024-01-04-setup-jekyll.md | 56 --------------------- _posts/2025-01-04-setup-jekyll.md | 81 +++++++++++++++++++++++++++++++ 8 files changed, 124 insertions(+), 59 deletions(-) create mode 100644 _data/navigation.yml create mode 100644 _pages/404.md create mode 100644 _pages/category-archive.md create mode 100644 _pages/tag-archive.md create mode 100644 _pages/year-archive.md delete mode 100644 _posts/2024-01-04-setup-jekyll.md create mode 100644 _posts/2025-01-04-setup-jekyll.md diff --git a/_config.yml b/_config.yml index 1e6ee56..77f3995 100644 --- a/_config.yml +++ b/_config.yml @@ -19,6 +19,8 @@ description: >- # this means to ignore newlines until "baseurl:" Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description. +baseurl: "/til" +url: "https://galtay.github.io/til" twitter_username: gabrielaltay github_username: galtay minimal_mistakes_skin: default @@ -29,7 +31,7 @@ markdown: kramdown remote_theme: mmistakes/minimal-mistakes # Outputting permalink: /:categories/:title/ -paginate: 5 # amount of posts to show +paginate: 10 # amount of posts to show paginate_path: /page:num/ timezone: # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones @@ -71,6 +73,9 @@ author: - label: "GitHub" icon: "fab fa-fw fa-github" url: "https://github.com/galtay" + - label: "LinkedIn" + icon: "fab fa-fw fa-linkedin" + url: "https://www.linkedin.com/in/gabriel-altay" footer: links: @@ -80,6 +85,9 @@ footer: - label: "GitHub" icon: "fab fa-fw fa-github" url: "https://github.com/galtay" + - label: "LinkedIn" + icon: "fab fa-fw fa-linkedin" + url: "https://www.linkedin.com/in/gabriel-altay" defaults: @@ -109,5 +117,4 @@ tag_archive: type: liquid path: /tags/ -baseurl: "/til" # Leave empty for user repositories -url: "https://galtay.github.io/til" # Replace with your GitHub username + diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..75c090a --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,7 @@ +main: + - title: "Posts" + url: /posts/ + - title: "Categories" + url: /categories/ + - title: "Tags" + url: /tags/ \ No newline at end of file diff --git a/_pages/404.md b/_pages/404.md new file mode 100644 index 0000000..76736f1 --- /dev/null +++ b/_pages/404.md @@ -0,0 +1,8 @@ +--- +title: "Page Not Found" +excerpt: "Page not found. Your pixels are in another canvas." +sitemap: false +permalink: /404.html +--- + +Sorry, but the page you were trying to view does not exist. \ No newline at end of file diff --git a/_pages/category-archive.md b/_pages/category-archive.md new file mode 100644 index 0000000..6f458d5 --- /dev/null +++ b/_pages/category-archive.md @@ -0,0 +1,6 @@ +--- +title: "Posts by Category" +layout: categories +permalink: /categories/ +author_profile: true +--- \ No newline at end of file diff --git a/_pages/tag-archive.md b/_pages/tag-archive.md new file mode 100644 index 0000000..ec32274 --- /dev/null +++ b/_pages/tag-archive.md @@ -0,0 +1,6 @@ +--- +title: "Posts by Tag" +permalink: /tags/ +layout: tags +author_profile: true +--- \ No newline at end of file diff --git a/_pages/year-archive.md b/_pages/year-archive.md new file mode 100644 index 0000000..ce3413f --- /dev/null +++ b/_pages/year-archive.md @@ -0,0 +1,6 @@ +--- +title: "Posts by Year" +permalink: /posts/ +layout: posts +author_profile: true +--- diff --git a/_posts/2024-01-04-setup-jekyll.md b/_posts/2024-01-04-setup-jekyll.md deleted file mode 100644 index 0575b02..0000000 --- a/_posts/2024-01-04-setup-jekyll.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "setting up static github pages site with jekyll" -date: 2024-01-04 -tags: jekyll ---- - -The basics of setting up a Jekyll site on Ubuntu. - -Install a Ruby version manager. -We will use [rbenv](https://github.com/rbenv/rbenv){:target="_blank"}. - -```bash -sudo apt install rbenv -``` - -Add the following init command to `~/.zshrc` and source it. - -``` bash -eval "$(rbenv init -)" -``` - - -Configure a specific version of Ruby. - -``` bash -rbenv install 3.1.2 -rbenv local 3.1.2 -rbenv rehash -``` - -Install bundler - -``` bash -gem install bundler -``` - -Install project dependencies - -``` bash -bundle install -``` - -Run the site locally - -``` bash -bundle exec jekyll serve -``` - - -By default it uses the, - - * [kramdown](https://kramdown.gettalong.org/syntax.html) markdown syntax - * [minima](https://github.com/jekyll/minima) theme - - - diff --git a/_posts/2025-01-04-setup-jekyll.md b/_posts/2025-01-04-setup-jekyll.md new file mode 100644 index 0000000..a428dbb --- /dev/null +++ b/_posts/2025-01-04-setup-jekyll.md @@ -0,0 +1,81 @@ +--- +title: "setting up static github pages site with jekyll" +date: 2025-01-04 +tags: jekyll +--- + +This is how I setup a static Jekyll site hosted with github pages. +I was working on Ubuntu for this. +The code is hosted at [https://github.com/galtay/til](https://github.com/galtay/til) +and the site is hosted at [https://galtay.github.io/til/](https://galtay.github.io/til/). + +# Setup Ruby + +Install a Ruby version manager. +I used [rbenv](https://github.com/rbenv/rbenv){:target="_blank"}. + +```bash +sudo apt install rbenv +``` + +Add the following init command to `~/.zshrc` and source it. + +``` bash +eval "$(rbenv init -)" +``` + +Configure a specific version of Ruby. + +``` bash +rbenv install 3.1.2 +rbenv local 3.1.2 +rbenv rehash +``` + +# Setup Minimal Mistakes Theme + +The minimal-mistakes theme by [Michael Rose](https://mademistakes.com/) is great! + + * [main repo](https://github.com/mmistakes/minimal-mistakes) + * [starter repo](https://github.com/mmistakes/mm-github-pages-starter) + * [docs](https://mmistakes.github.io/minimal-mistakes) + +I began with the starter repo and simply updated the links in `_config.yml` and started writing posts. +In particular I added, + +``` yaml +baseurl: "/til" +url: "https://galtay.github.io/til" +``` + +This is needed when publishing a project based github pages site as opposed to a user based site. +[more here](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites). + +Posts can be written in markdown and the flavor of markdown used is +[kramdown](https://kramdown.gettalong.org/syntax.html). + +# Run Locally + +Install bundler + +``` bash +gem install bundler +``` + +Install project dependencies + +``` bash +bundle install +``` + +Run the site locally + +``` bash +bundle exec jekyll serve +``` + +# Publish from git branch + +I setup my repo to deploy from the `main` branch. +I did this by navigating to Settings/Pages/Build and deployment and choosing `Deploy from a branch`. +When I'm happy with the local changes I push to the `main` branch and the site is automatically deployed.