Skip to content

Commit

Permalink
feat: add analytics config (#812)
Browse files Browse the repository at this point in the history
* feat: add consent popup config

* update client lib
  • Loading branch information
goshander authored Jul 31, 2024
1 parent e717efa commit 17d874e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"node": ">=18.*"
},
"dependencies": {
"@diplodoc/client": "^2.6.2",
"@diplodoc/client": "^2.7.0",
"@diplodoc/translation": "^1.4.1",
"katex": "^0.16.9",
"shelljs": "0.8.5",
Expand Down
2 changes: 2 additions & 0 deletions src/models.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Logger} from '@diplodoc/transform/lib/log';
import {ChangelogItem} from '@diplodoc/transform/lib/plugins/changelog/types';
import {LintConfig} from '@diplodoc/transform/lib/yfmlint';
import type {DocAnalytics} from '@diplodoc/client';

import {IncludeMode, Lang, ResourceType, Stage} from './constants';
import {FileContributors, VCSConnector, VCSConnectorConfig} from './vcs-connector/connector-models';
Expand Down Expand Up @@ -81,6 +82,7 @@ interface YfmConfig {
* <URL> -> extract and push to s3
*/
changelogs?: string | boolean;
analytics?: DocAnalytics;
}

export interface YfmArgv extends YfmConfig {
Expand Down
3 changes: 2 additions & 1 deletion src/resolvers/md2html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const getFileProps = async (options: ResolverOptions) => {
const pathToFileDir: string =
pathToDir === tocBase ? '' : pathToDir.replace(`${tocBase}${sep}`, '');

const {lang: configLang, langs: configLangs} = ArgvService.getConfig();
const {lang: configLang, langs: configLangs, analytics} = ArgvService.getConfig();
const meta = await getFileMeta(options);

const tocBaseLang = tocBase?.split('/')[0];
Expand All @@ -105,6 +105,7 @@ const getFileProps = async (options: ResolverOptions) => {
},
lang,
langs,
analytics,
};

return props;
Expand Down

0 comments on commit 17d874e

Please sign in to comment.