Skip to content

Commit

Permalink
Add TOC feature to articles (#2554)
Browse files Browse the repository at this point in the history
  • Loading branch information
fatso83 committed Oct 18, 2023
1 parent 737736f commit f0d250b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem "jekyll", "~> 3.7"
gem 'jekyll-sitemap'
gem 'jekyll-toc'
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ GEM
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.5.3)
jekyll (>= 3.3, < 5.0)
jekyll-toc (0.18.0)
jekyll (>= 3.9)
nokogiri (~> 1.12)
jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.12.0)
Expand Down Expand Up @@ -262,6 +265,7 @@ DEPENDENCIES
github-pages
jekyll (~> 3.7)
jekyll-sitemap
jekyll-toc

BUNDLED WITH
1.17.3
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ plugins:
- jekyll-feed
- jekyll-redirect-from
- jekyll-sitemap
- jekyll-toc
keep_files:
- assets
- releases
Expand Down
1 change: 1 addition & 0 deletions docs/_howto/typescript-swc.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: page
title: "Case study: real world dependency stubbing"
toc: true
---

Sinon is a simple tool that only tries to do a few things and do them well: creating and injecting test doubles (spies, fakes, stubs) into objects. Unfortunately, in todays world of build pipelines, complex tooling, transpilers and different module systems, doing the simple thing quickly becomes difficult.
Expand Down
2 changes: 1 addition & 1 deletion docs/_layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1 class="post-title">{{ page.title }}</h1>
<div>{% include carbonads.html %}</div>
{% endif %}

{{ content }}
{{ content | toc }}
</div>

</article>

0 comments on commit f0d250b

Please sign in to comment.