Skip to content

Commit

Permalink
Add Firebase analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
lupuuss committed Jan 23, 2025
1 parent 300d8dc commit d990632
Show file tree
Hide file tree
Showing 6 changed files with 5,689 additions and 2,798 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/website-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ jobs:
- name: Install dependencies
run: npm --prefix website ci
- name: Build website
env:
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN }}
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }}
FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
FIREBASE_MEASUREMENT_ID: ${{ secrets.FIREBASE_MEASUREMENT_ID }}
run: npm --prefix website run build
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
Expand Down
3 changes: 2 additions & 1 deletion website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
static/api_reference
static/api_reference
.env
24 changes: 16 additions & 8 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

import {themes as prismThemes} from 'prism-react-renderer';

const tagLine = 'The mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.'
require('@dotenvx/dotenvx').config()

const tagLine = 'The mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.'
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Mokkery',
Expand Down Expand Up @@ -36,7 +31,16 @@ const config = {
projectName: 'Mokkery',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
customFields: {description: tagLine},
customFields: {
description: tagLine,
FIREBASE_API_KEY: process.env.FIREBASE_API_KEY,
FIREBASE_AUTH_DOMAIN: process.env.FIREBASE_AUTH_DOMAIN,
FIREBASE_PROJECT_ID: process.env.FIREBASE_PROJECT_ID,
FIREBASE_STORAGE_BUCKET: process.env.FIREBASE_STORAGE_BUCKET,
FIREBASE_MESSAGING_SENDER_ID: process.env.FIREBASE_MESSAGING_SENDER_ID,
FIREBASE_APP_ID: process.env.FIREBASE_APP_ID,
FIREBASE_MEASUREMENT_ID: process.env.FIREBASE_MEASUREMENT_ID,
},
i18n: {
defaultLocale: 'en',
locales: ['en'],
Expand All @@ -53,6 +57,10 @@ const config = {
theme: {
customCss: './src/css/custom.css',
},
gtag: {
trackingID: process.env.FIREBASE_MEASUREMENT_ID,
anonymizeIP: true,
}
}),
],
], themeConfig:
Expand Down
Loading

0 comments on commit d990632

Please sign in to comment.