Skip to content

Commit d1f41b2

Browse files
DOCS: Hide editLink in generated API content and add functionsCount variable
1 parent f0455be commit d1f41b2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/.vuepress/config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ const HyperFormula = require('../../dist/hyperformula.full');
44
const fs = require('fs');
55
const path = require('path');
66

7+
const searchPattern = new RegExp('^/api', 'i');
8+
79
module.exports = {
810
title: 'HyperFormula (v' + HyperFormula.version + ')',
911
description: 'HyperFormula is an open-source, high-performance calculation engine for spreadsheets and web applications.',
@@ -37,6 +39,12 @@ module.exports = {
3739
$page.buildDate = HyperFormula.buildDate
3840
// inject current HF releaseDate as {{ $page.releaseDate }} variable
3941
$page.releaseDate = HyperFormula.releaseDate
42+
// inject current HF function count as {{ $page.functionsCount }} variable
43+
$page.functionsCount = HyperFormula.getRegisteredFunctionNames('enGB').length
44+
45+
if (searchPattern.test($page.path)) {
46+
$page.frontmatter.editLink = false
47+
}
4048
},
4149
chainMarkdown (config) {
4250
// inject custom markdown highlight with our aliases to formula syntax

0 commit comments

Comments
 (0)