Skip to content

Commit

Permalink
chatgpt thanks
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Frick authored and Evan Frick committed Aug 31, 2024
1 parent 39f7424 commit 6fb6e57
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 59 deletions.
81 changes: 55 additions & 26 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,55 @@
# _config.yml

# General Configuration
title: Your Website Title
description: Your Website Description
baseurl: "/" # Set to your desired base URL if different from root

# Navigation (Auto-generated from `index.md` headers)
navigation:
- name: Home
url: "/"
# Jekyll will dynamically populate additional items based on `##` headers in index.md
# Format: name: Header Text, url: "/#header-id" (replace "header-id" with actual IDs)

# Theme Configuration (Minimalistic Theme with Customization)
theme: minimal # Choose a Jekyll theme supporting header linking and dark mode (e.g., minima, hyde, etc.)
highlight: pygments # Syntax highlighting library (adjust if needed for your languages)
markdown: kramdown # Markdown processor (ensure supports header IDs for linking)

# Dark Mode
dark_mode: true
dark_mode_stylesheets:
- theme/dark.css # Assuming your chosen theme has a dedicated dark mode stylesheet

# Typography
font: 'Courier New, monospace' # Set primary font
title: "Your Website Title"
description: "A description of your website"
baseurl: "" # The subpath of your site, e.g. /blog
url: "" # The base hostname & protocol for your site

theme: minima # Use the minima theme as a base; you can customize further

markdown: kramdown
kramdown:
input: GFM
auto_ids: true # This automatically generates IDs for headers

highlighter: rouge # To enable syntax highlighting

# Enable Dark Mode
minima:
skin: dark

# Custom CSS to apply Courier New font and adjust the navbar
sass:
style: compressed

plugins:
- jekyll-toc # Table of Contents generator

# Table of Contents settings
toc:
min_level: 2 # Include h2 headers (## in markdown)
max_level: 2 # Limit to h2 headers
no_back_to_top: true # Remove "back to top" link

# Additional CSS
sass:
style: compressed
custom_css: assets/css/custom.scss

# Exclude items from processing
exclude:
- Gemfile
- Gemfile.lock
- node_modules
- vendor/bundle/
- vendor/cache/
- vendor/gems/
- vendor/ruby/

# Optional: Specify where your site's content lives (default is in '_posts')
# defaults:
# - scope:
# path: "" # empty string means all files
# values:
# layout: "default"

# Optional: Customize the HTML output (e.g., to add classes, IDs, etc.)
# markdown_ext: "markdown,mkdown,mkdn,mkd,md"
22 changes: 11 additions & 11 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title }}</title>
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
<title>{{ page.title | escape }}</title>
<link rel="stylesheet" href="{{ '/assets/css/styles.css' | relative_url }}">
<style>
body {
font-family: 'Courier New', Courier, monospace;
}
</style>
</head>
<body>
<header>
<nav class="navbar">
<nav>
<ul>
{% for item in site.nav %}
<li><a href="{{ item.url }}">{{ item.title }}</a></li>
{% for heading in site.data.toc %}
<li><a href="#{{ heading.id }}">{{ heading.content }}</a></li>
{% endfor %}
</ul>
</nav>
</header>

<main>
{{ content }}
</main>

<footer>
<p>&copy; {{ site.time | date: "%Y" }} {{ site.title }}</p>
</footer>
</body>
</html>
</html>
11 changes: 11 additions & 0 deletions _plugins/toc_generator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Jekyll::Hooks.register :pages, :post_render do |page|
if page.extname == '.html'
toc_data = []
page.content.scan(/<h2 id="(.+?)">(.+?)<\/h2>/) do |id, content|
toc_data << { 'id' => id, 'content' => content }
end

page.data['toc'] = toc_data
end
end

25 changes: 25 additions & 0 deletions assets/css/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@import "minima";

body {
font-family: 'Courier New', Courier, monospace;
}

/* Custom Navbar styles */
nav ul {
display: flex;
list-style-type: none;
padding: 0;
}

nav ul li {
margin-right: 20px;
}

nav ul li a {
color: #fff;
text-decoration: none;
}

nav ul li a:hover {
text-decoration: underline;
}
22 changes: 0 additions & 22 deletions assets/main.scss

This file was deleted.

0 comments on commit 6fb6e57

Please sign in to comment.