diff --git a/_config.yml b/_config.yml index 4773209..7904b5b 100644 --- a/_config.yml +++ b/_config.yml @@ -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" diff --git a/_layouts/default.html b/_layouts/default.html index 4854ba7..4e8994c 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -3,26 +3,26 @@ - {{ page.title }} - + {{ page.title | escape }} + +
-
-
{{ content }}
- - - \ No newline at end of file + diff --git a/_plugins/toc_generator.rb b/_plugins/toc_generator.rb new file mode 100644 index 0000000..f00130f --- /dev/null +++ b/_plugins/toc_generator.rb @@ -0,0 +1,11 @@ +Jekyll::Hooks.register :pages, :post_render do |page| + if page.extname == '.html' + toc_data = [] + page.content.scan(/

(.+?)<\/h2>/) do |id, content| + toc_data << { 'id' => id, 'content' => content } + end + + page.data['toc'] = toc_data + end + end + \ No newline at end of file diff --git a/assets/css/custom.scss b/assets/css/custom.scss new file mode 100644 index 0000000..1e60aa4 --- /dev/null +++ b/assets/css/custom.scss @@ -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; +} diff --git a/assets/main.scss b/assets/main.scss deleted file mode 100644 index 04d99be..0000000 --- a/assets/main.scss +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Front matter to ensure Jekyll processes this file ---- - -@import "minima"; - -body { - font-family: "Courier New", Courier, monospace; -} - -.navbar { - background-color: #333; - color: #fff; -} - -.navbar a { - color: #fff; -} - -.navbar a:hover { - color: #ddd; -} \ No newline at end of file