Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 7 additions & 62 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,67 +1,12 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
dist

# Dependency directories
node_modules
jspm_packages

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.development
.env.production

# next.js build output
.next
# Compiled binary addons (https://nodejs.org/api/addons.html)
dist

# VS Code files
.vscode
.vscode

# VuePress temp files
.cache
.temp
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Azure Static Web Apps CI/CD](https://github.com/zumasys/docs/actions/workflows/azure-static-web-apps-calm-tree-0410ef410.yml/badge.svg)](https://github.com/zumasys/docs/actions/workflows/azure-static-web-apps-calm-tree-0410ef410.yml)

This is a [VuePress](https://vuepress.vuejs.org/) documentation application that leverages [GitHub](https://github.com) as the repository of documentation. The repository is currently hosted in the [Zumasys GitHub](https://github.com/zumasys/docs) and the app is available at [Zumasys Docs](https://docs.zumasys.com). The application itself is built and deployed as a static site hosted on Azure Storage via a GitHub action.
This is a [VuePress 2](https://v2.vuepress.vuejs.org/) documentation application that leverages [GitHub](https://github.com) as the repository of documentation. The repository is currently hosted in the [Zumasys GitHub](https://github.com/zumasys/docs) and the app is available at [Zumasys Docs](https://docs.zumasys.com). The application itself is built and deployed as a static site hosted on Azure Storage via a GitHub action.

## Directory structure

Expand Down Expand Up @@ -39,24 +39,12 @@ To run the application locally:
2. `cd docs` (or whatever name you used for your git clone)
3. `cd site`
4. `npm i` (Not necessary on subsequent builds)
5. To enable all features you'll need to set up environment variables. Create `.env` (for production) and `.env.development` (for development) files in the `site` folder. Use the `.env.skel` file as your baseline (for both production and development).
* Optionally, if you want the [Vssue](https://vssue.js.org/) plugin to work you'll have to populate the following `.env` variables in the file from step 5.
5. `npm run dev`
6. When compilation completes you should see the following message

> `cd site && code .env`

```dotenv
# Environment Variables
VUE_APP_GITHUB_CLIENT_ID=MyClientKey
VUE_APP_GITHUB_CLIENT_SECRET=MySecretKey
```

6. `npm run dev`
7. When compilation completes you should see the following message

> success [12:25:41] Build 59cc58 finished in 75022 ms!
> VuePress dev server listening at [http://localhost:8080/](http://localhost:8080/)

8. Open [localhost:8080](localhost:8080) in your browser.
7. Open [localhost:8080](localhost:8080) in your browser.

## Todo List

Expand Down
6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

9 changes: 0 additions & 9 deletions site/.env.skel

This file was deleted.

27 changes: 27 additions & 0 deletions site/.vuepress/clientAppEnhance.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export default ({ app, router, siteData, isServer }) => {
// Google Tag Manager integration
if (
process.env.NODE_ENV === 'production' &&
process.env.VUE_APP_GOOGLE_TAG_MANAGER &&
typeof window !== 'undefined'
) {
(function (w, d, s, l, i) {
w[l] = w[l] || []
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' })
var f = d.getElementsByTagName(s)[0]
var j = d.createElement(s)
var dl = l != 'dataLayer' ? '&l=' + l : ''
j.async = true
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl
f.parentNode.insertBefore(j, f)
})(window, document, 'script', 'dataLayer', process.env.VUE_APP_GOOGLE_TAG_MANAGER)

router.afterEach(function (to) {
window.dataLayer = window.dataLayer || []
window.dataLayer.push({
event: 'Pageview',
pagePath: to.fullPath
})
})
}
}
Loading