Table of contents - initial support (#112)

* Table of contents - initial support

* Table of contents - support for light mode
This commit is contained in:
Hyacinthe Cartiaux 2024-08-05 20:09:55 +02:00 committed by GitHub
parent c194169315
commit e16b28fa10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 23 additions and 0 deletions

View file

@ -16,6 +16,7 @@ Forked from [Ezhil Theme](https://github.com/vividvilla/ezhil)
- Auto Dark Mode(based on system theme)
- Dark/Light Mode toggle
- tl:dr; frontamatter
- Table of contents
- Cache busting for CSS files
- Disqus Comments
@ -42,6 +43,7 @@ date:
tldr: (optional)
draft: true/false (optional)
tags: [tag names] (optional)
toc: true/false (optional)
---
```

View file

@ -67,6 +67,11 @@ h6::before {
content: "###### ";
}
.toc {
background-color: #272822;
color: white;
}
a {
border-bottom: 3px solid var(--darkMaincolor);
color: inherit;

View file

@ -161,6 +161,15 @@ h6::before { color: var(--maincolor); content: '###### '; }
letter-spacing: -0.5px;
}
.toc {
background-color: #ececec;
color: #232333;
padding: 10px;
padding-bottom: 0;
border-radius: 5px;
display: inline-block;
}
/* Footer */
footer {
display: flex;

View file

@ -3,6 +3,7 @@ title: Telegram Bot for GitHub Actions
date: "2020-04-01"
description: Make a Telegram bot with Node.js and use it with GitHub Actions for sending notifications to you about the repo.
tldr: Making GitHub Actions with Js Code
toc: true
---
## Telegram
[Telegram](https://telegram.org/) is a cloud-based mobile and desktop messaging app with a focus on security and speed. It is free to use and extensively hackable. It also has a good bot support system. The API is also easy to implement and has many wrappers for building bots with the API.

View file

@ -11,6 +11,12 @@
{{ .Params.tldr }}
</div>{{ end }}
{{ if isset .Params "toc" }}
<div class="toc">
<strong>Table of contents:</strong>
{{ .TableOfContents }}
</div>{{ end }}
<section class="body">
{{ .Content }}
</section>