This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LoadContext, Plugin } from '@docusaurus/types' | |
function pluginGoatcounter({ siteConfig: { themeConfig }}: LoadContext): Plugin<void> { | |
// ... remainder of your your plugin | |
} | |
export default pluginGoatcounter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (context) { | |
const { siteConfig } = context | |
const { themeConfig } = siteConfig | |
// ... remainder of your plugin | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script data-goatcounter="https://MYCODE.goatcounter.com/count" | |
async src="//gc.zgo.at/count.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
module.exports = { | |
// ... | |
themeConfig: { | |
// ... | |
goatcounter: { | |
code: 'MYCODE', | |
}, | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (context) { | |
const { siteConfig } = context // Siteconfig is the content of docusaurus.config.js | |
const { themeConfig } = siteConfig | |
if (!themeConfig.goatcounter) { | |
throw new Error( | |
'You need to specify `goatcounter` object in `themeConfig` ' | |
+ 'with `code` field in it to use docusaurus-plugin-goatcounter' | |
) | |
} | |
if (!themeConfig.goatcounter.code) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchMachine = Machine({ | |
id: 'verifiedLocation', | |
initial: 'registeringListener', | |
states: { | |
registeringListener: { | |
on: { LISTENING: 'listening' }, | |
}, | |
listening: { | |
on: { READY: 'ready' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client' | |
// Create GraphQL Client for FaunaDB, replace HttpLink configuration | |
// with your own GraphQL endpoint configuration. | |
const client = new ApolloClient({ | |
cache: new InMemoryCache(), | |
link: new HttpLink({ | |
uri: 'https://graphql.fauna.com/graphql', | |
headers: { | |
"Authorization": `Bearer ${process.env.FAUNADB_SECRET}`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zeppelin: | |
image: apache/zeppelin:0.9.0 | |
environment: | |
ZEPPELIN_LOG_DIR: /logs | |
ZEPPELIN_NOTEBOOK_DIR: /notebook | |
volumes: | |
- ./logs:/logs | |
- ./notebook:/notebook | |
- ./helium:/zeppelin/helium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Add yaml-lint as a dependency | |
yarn add -D yaml-lint | |
# Add a lint script | |
npx json -I -f package.json -e "this.scripts.lint='yamllint *.{yaml,yml}'" | |
# Add husky as a dependency | |
yarn add -D husky |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"errors": [ | |
{ | |
"message": "Request failed with status code 404", | |
"locations": [ | |
{ | |
"line": 2, | |
"column": 3 | |
} | |
], |