Jekyll Configuration

By Amr

Estimated reading time: 13 minutes

Edit on Github

Regenerate Config File with PowerShell

# Regenerate Config File

cd ~/github/it-journey
cp _config.yml pages/_about/settings/config-utf16.txt
Get-Content pages/_about/settings/config-utf16.txt | Set-Content -Encoding UTF8 pages/_about/settings/_config.yml

Regenerate Config File with Bash

# Regenerate Config File
cd ~/github/it-journey
cp _config.yml pages/_about/settings/_config.yml

Generated Config File

# Include sitemap/config.yml
# Welcome to Jekyll!
# Configuration file for Jekyll.
# Full docs at: http://jekyllrb.com/docs/configuration/
# YAML docs at: https://yaml.org/spec/1.2.2/
# ---------------------------------------------------------------------------------
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server.
#
# If you need help with YAML syntax, here are some quick references for you: 
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
# https://learnxinyminutes.com/docs/yaml/
#
# You can find config options at: https://jekyllrb.com/docs/configuration/options/
#
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via IT-Journey, amr@it-journey.dev, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via .


# Site Settings ###################################################################

## Site Information ---------------------------------------------------------------

founder                  : "Amr Abdel-Motaleb"
title                    : IT-Journey
title_url                : "/"
title_icon               : "globe"
subtitle                 : "zer0 to her0"
subtitle_url             : "localhost"
subtitle_icon            : "code"
title_separator          : "|" # Appears in the web browser tab name
domain                   : &domain "it-journey.dev"
baseurl                  : "" # the subpath of your site, e.g. /blog - Use this if you want this whole repo to be a domain branch
url                      : 'https://it-journey.dev' # the base hostname & protocol for your site, e.g. http://example.com
public_folder            : "/assets"
port                     : 4002 # Jekyll Serve Dev port
dg_port                  : 4001 # TODO: Doppelganger site. Use this if you want to switch between parallel deployments
og_image                 : '/assets/images/wizard-on-journey.png'

### Github Information
github_user              : &github_user "bamr87"
github_site              : 'bamr87.github.io'

### Owner Information -------------------------------------------------------------

name                     : &name "Amr"
email                    : "amr@it-journey.dev"
description              : >- # this means to ignore newlines until the next variable
  Collection of articles, notes, and tutorials to build a website
  or headless CMS using Jekyll and Github Pages.
  This is my journey from zer0 to her0.

repository_name          : &github_repository "it-journey"
repository               : [*github_user, "/", *github_repository] # GitHub username/repo-name
local_repo               : *github_repository
repo_map                 : "_about/"
github_base_url          : [*github_user, '.' , *site_domain] # the base hostname & protocol for your site, e.g. http://example.com
portfolio                : [*github_user, '.', 'github.io']

## Maintainer Information----------------------------------------------------------

maintainers:
  - name: "Amr"
    profile: "/github.com/bamr87"
  - name: "Vacant"
    profile: "/github.com"

## Admin Information----------------------------------------------------------

jekyll_admin:
  # hidden_links:
  #   - posts
  #   - pages
  #   - staticfiles
  #   - datafiles
  #   - configuration
  homepage: "pages"

## Personalization ----------------------------------------------------------------

locale                   : "en-US"
home_dir_pc              : &home-win 'C:\Users\amrab\'
home_dir_mac             : &home-mac '/Users/bamr87/'
local_git_pc             : [ *home-win, 'github' ]
local_git_mac            : [ *home-mac, 'github' ]
logo                     : /assets/images/gravatar-small.png  # path of logo image to display in the masthead, e.g. "/assets/images/88x88.png"
logo_link                : 'https://www.it-journey.dev'

teaser                   : /assets/images/favicon_gpt_computer_retro.png # path of fallback teaser image, e.g. "/assets/images/500x300.png"
info_banner              : /assets/images/info-banner-mountain-wizard.png # path of fallback teaser image, e.g. "/assets/images/500x300.png"
breadcrumbs              : true # true, false (default)
words_per_minute         : 200
_posts_file_structure    : "year-month-day-title.md"

## Identity #####################################################################

author:
  name                   : *name # *name is a YAML reference pointing to the &anchor earlier
  avatar                 : "/assets/images/gravatar-small.png"
  email_hash             : '71d7a4fc9712df49e13d606e620f89c7' # https://en.gravatar.com/site/check/{ site.email }
  gravatar               : [ 'https://s.gravatar.com/avatar/', *email_hash, '?s=80' ]
  bio                    : "IT nerd trying to be an IT hero"
  location               : "Denver, CO"
  twitter_username       : "bamr87"
  github_username        : *github_user


## Site verification #############################################################

google_site_verification : null
bing_site_verification   : null
alexa_site_verification  : null
yandex_site_verification : null
aver_site_verification   : null
baidu_site_verification  : null

## Affiliations ##############################################################

default_icon: "bi" ## Bootstrap Icons https://icons.getbootstrap.com/

links:
  - label: "BASH Consulting"
    url: "https://bashconsultants.com"
    icon: "bi-link"
  - label: "Twitter"
    icon: "bi-twitter"
    url: "https://twitter.com/bamr87"
  - label: "GitHub"
    icon: "bi-github"
    url: [ 'https://github.com/' , *github_user ]
  - label: "Instagram"
    icon: "bi-instagram"
    url: "https://instagram.com/bamr42"

youtube:
  - label: "YouTube"
    icon: "bi-youtube"
    url: "https://www.youtube.com/channel/UCO0j3Opg3J9i2iWnDwHUsXQ"

## Build Framework ##############################################################

powered_by:
  - name: "Ruby"
    version: "2.7.4"
    url: "https://www.ruby-lang.org/"
    icon: "bi-gem"
  - name: "Jekyll"
    version: "3.9.5"
    url: "https://jekyllrb.com/"
    icon: "bi-joystick"
  - name: "Bootstrap"
    version: "5.2.0"
    url: "https://getbootstrap.com/"
    icon: "bi-bootstrap"
  - name: "Algolia"
    version: 
    url: "https://algolia.com/"
    icon: "bi-search"
  - name: "JQuery"
    url: "https://jquery.com/"
    icon: "bi-filetype-js"
  - name: "MathJax"
    version: "1.0"
    url: "https://www.mathjax.org/"
    icon: "bi-calculator"
  - name: "GitHub Pages"
    version: "231"
    url: "https://pages.github.com/"
    icon: "bi-github"
  - name: "docker"
    version: "20.10.8"
    url: "https://www.docker.com/"
    icon: "bi-docker"

### Plugins 
# https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#plugins
# http://jekyllrb.com/docs/plugins/

# All plugins are enabled by default for GitHub Pages. https://pages.github.com/versions/

plugins:
  - github-pages
  - jekyll-feed
  - jekyll-sitemap
  - jekyll-seo-tag
  - jekyll-paginate
  # - jekyll-assets
  - jekyll-algolia
  # - jekyll-mermaid  # https://mermaidjs.github.io/
  # - jekyll-admin # https://github.com/jekyll/jekyll-admin
  # - jekyll-redirect-from
  # - bootstrap
  # - jekyll-spaceship
  # - jemoji # Doesn't work for some reason
  # - jekyll-postcss

# https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

mermaid:
  src: 'mermaid/src/mermaid.js'

## Conversion
# Markdown Options https://jekyllrb.com/docs/configuration/markdown/
# https://github.com/github/jekyll-commonmark-ghpages

markdown: kramdown
# highlighter: rouge
# lsi: false
# excerpt_separator: "\n\n"
# incremental: false

# Markdown Processing https://jekyllrb.com/docs/configuration/markdown/
kramdown: # https://kramdown.gettalong.org/options.html
  input: GFM
  header_offset: 0
  # hard_wrap: false
  # auto_ids: true
  # footnote_nr: 1
  # entity_output: as_char
  toc_levels: 1..6
  # smart_quotes: lsquo,rsquo,ldquo,rdquo
  # enable_coderay: false

# Collections: https://jekyllrb.com/docs/collections/
  # Permalinks: https://jekyllrb.com/docs/permalinks/

collections_dir: &collections_dir pages
local_repo_path: [ *collections_dir, '/', *local_repo ]

collections:
  pages:
    output: true
    permalink: /:collection/:name/
  posts:
    output: true
    permalink: /:collection/:year/:month/:day/:slug/
  docs:
    output: true
    permalink: /:collection/:categories/:name/
  quests:
    output: true
    permalink: /:collection/:categories/:name/
  hobbies:
    output: true
    permalink: /:collection/:categories/:name/
  notebooks:
    output: true
    permalink: /:collection/:path/:name/
  notes:
    output: true
    permalink: /:collection/:path/:name/
  quickstart:
    output: true
    permalink: /:collection/:categories/:name/
  about:
    output: true
    permalink: /:collection/:categories/:name/

permalink: pretty

#  pagination https://jekyllrb.com/docs/pagination/

paginate: 10
paginate_path: "/pages/:num/"

# Defaults https://jekyllrb.com/docs/configuration/front-matter-defaults/

nav-file: '_data/navigation/map.yml'

defaults:
  # ALL
  - 
    scope:
      path: ""
    values:
      layout: root
      author_profile: false
      read_time: true
      comments: # true
      share: true
      related: true
      sidebar:
        nav: main
    permalink: /:collection/:name/

  # pages
  - 
    scope:
      path: pages
    values:
      layout: &pages default
      author_profile: true
      read_time: true
      comments: # true
      share: true
      related: true
      toc_sticky: true
      sidebar:
        nav: searchCats
    permalink: /:path/:name/

  # pages/_about
  - 
    scope:
      path: pages/_about
    values:
      layout: *pages
      collection: about
      share: true
      related: true
      sidebar:
        nav: about

  # pages/_quickstart
  - 
    scope:
      path: pages/_quickstart
    values:
      layout: default
      collection: quickstart
      share: true
      related: true
      sidebar:
        nav: quickstart

  # _posts
  - 
    scope:
      path: pages/_posts
    values:
      layout: journals
      author_profile: true
      read_time: true
      comments: # true
      share: true
      related: true
      sidebar:
        nav: dynamic
      # permalink: /:collection/:name/

  # pages/_docs
  - 
    scope:
      path: pages/_docs
    values:
      layout: *pages
      # category: docs
      author_profile: true
      read_time: true
      comments: # true
      share: true
      related: true
      sidebar:
        nav: docs
    # permalink: /docs/:category/:name/

  # pages/_quests
  - 
    scope:
      path: pages/_quests
    values:
      layout: *pages
      author_profile: true
      read_time: true
      comments: # true
      share: true
      related: true
      sidebar:
        nav: dynamic
      permalink: /:categories/:slug

  # pages/_hobbies
  - 
    scope:
      path: pages/_hobbies
      type: hobbies
    values:
      layout: *pages
      share: false
      author_profile: false
      sidebar:
        nav: hobbies

  # pages/_notes
  - 
    scope:
      path: pages/_notes
      type: notes
    values:
      layout: *pages
      share: false
      author_profile: false
      sidebar:
        nav: dynamic

# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
# the internal "default list".
#
# Excluded items can be processed by explicitly listing the directories or
# their entries' file path in the `include:` list.

exclude:
  - .sass-cache/
  - .jekyll-cache/
  - .obsidian
  - Gemfile.lock
  - gemfiles/
  - Gemfile
  - node_modules/
  - vendor/
  # - "*.sh"
  - submodules/

# Sass/SCSS
sass:
  sass_dir: _sass
  style: expanded

#  TODO: Fix bootstrap plugin
  # load_paths:
  #   - /usr/local/bundle/gems/bootstrap-5.3.3/assets/stylesheets

algolia:
  application_id: 'SP02Z3YYL4'
  search_only_api_key: '3b9200e21085fbebc263950c157b2682'
  index_name: dev_it-journey

atom_feed:
path                   : # blank (default) uses feed.xml

## Style Settings -------------------------------------------------------------

# theme                  : "zer0-mistakes-jekyll"
# remote_theme           : "bamr87/zer0-mistakes"
theme_skin               : "dark" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"

# style                  : "default" # "default", "dark", "light", "solarized-dark", "solarized-light"
# remote_style           : "bamr87/zer0-mistakes"



theme_color:
  main: #007bff
  secondary: #6c757d
  red: #a11111
  yellow: #ffe900
  teal: #376986
  blue: #007bff
  green: #28a745
  purple: #6f42c1
  pink: #e83e8c
  orange: #fd7e14
  brown: #795548
  cyan: #17a2b8
  indigo: #6610f2
  lime: #cddc39
  amber: #ffc107
  deep_orange: #ff5722
  deep_purple: #673ab7
  light_blue: #03a9f4
  light_green: #8bc34a
  light_purple: #9c27b0
  light_red: #f44336
  light_yellow: #ffeb3b
  light_teal: #009688

## Copyright Settings --------------------------------------------------------------

cr_year: 2024
cr_entity: "Amr"
cr_lisense: "MIT"

## Sitemap Settings --------------------------------------------------------------

# sitemap_include: A list of file extensions that should be included in the sitemap. By default, HTML files and any files with sitemap: true in their front matter are included.
# sitemap_exclude: A list of files or directories that should be excluded from the sitemap.

sitemap_include: ["html", "xml"]
sitemap_exclude: ["secret.html", "private"]