Skip to content

Commit

Permalink
feat: PWA, change icon and meta
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Dec 27, 2020
1 parent 685401f commit 6e53596
Show file tree
Hide file tree
Showing 8 changed files with 194 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ npm-debug.log
dist

data/
/static/sw.js
17 changes: 10 additions & 7 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
modules: [
'semantic-ui-vue/nuxt',
'@nuxtjs/axios',
'@nuxtjs/pwa',
'nuxt-socket-io',
'@nuxtjs/style-resources',
],
Expand Down Expand Up @@ -47,15 +48,17 @@ module.exports = {
/*
** Headers of the page
*/
pwa: {
meta: {
name: 'site-audit-seo',
ogHost: process.env.FRONTEND_URL || '/',
ogImage: '/og_image.png',
}
},

head: {
title: 'site-audit-seo viewer',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Display json as table' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
// { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', href: 'https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' }
]
},
Expand Down
177 changes: 177 additions & 0 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "site-audit-seo-viewer",
"version": "3.1.1",
"description": "Display audit.json as table",
"description": "Web service for SEO site audit: crawl site, Lighthouse all pages, view public reports in browser. 100+ metrics for each page.",
"author": "Stanislav Popov <popstas@gmail.com>",
"homepage": "https://github.com/viasite/site-audit-seo-viewer",
"private": true,
"scripts": {
"dev": "cross-env SERVER_URL=http://localhost:5301 HOST=0.0.0.0 PORT=5302 nuxt",
"dev-popstas": "cross-env SERVER_URL=http://popstas-server:5301 HOST=0.0.0.0 PORT=5302 nuxt",
"dev-popstas-prod": "cross-env SERVER_URL=https://site-audit-server.popstas.ru HOST=0.0.0.0 PORT=5302 nuxt",
"dev-popstas-prod": "cross-env FRONTEND_URL=https://site-audit.popstas.ru SERVER_URL=https://site-audit-server.popstas.ru HOST=0.0.0.0 PORT=5302 nuxt",
"dev-clean": "nuxt",
"build": "nuxt build",
"deploy-prod": "bash scripts/deploy.sh",
Expand All @@ -27,6 +27,7 @@
},
"dependencies": {
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/pwa": "^3.3.3",
"element-ui": "^2.13.2",
"firebase": "^8.2.1",
"firebaseui": "^4.7.1",
Expand Down
5 changes: 3 additions & 2 deletions pages/scan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<el-form-item>
<el-button :disabled="!connected" type="primary" @click="sendTask">Scan</el-button>
<el-button :disabled="!connected" type="primary" @click="sendTask({maxRequests: 1, lighthouse: true})">Lighthouse one page</el-button>
<!-- <el-button :disabled="!connected" type="primary" @click="sendTask({preset: 'minimal', maxRequests: 0, lighthouse: false})">Warm</el-button> -->
</el-form-item>
</el-form>

Expand Down Expand Up @@ -308,9 +309,9 @@ export default {
const parts = [];
if (days) parts.push(`${days}d`);
if (hours) parts.push(`${hours}m`);
if (hours) parts.push(`${hours}h`);
parts.push(`${mins}m`);
return parts.join(', ');
return parts.join(' ');
},
},
Expand Down
Binary file modified static/favicon.ico
Binary file not shown.
Binary file added static/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/og_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6e53596

Please sign in to comment.