Commit 5740377c authored by jxtxzzw's avatar jxtxzzw

Merge branch 'SEO' into 'seo'

seo

See merge request !1
parents 1bae8331 778dd5db
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
......@@ -88,3 +88,7 @@ sw.*
# Vim swap files
*.swp
# customer js and css
static/customer-js.js
static/customer-css.css
......@@ -52,9 +52,7 @@
<script>
import {BLOG_URL, GITLAB_URL} from '../data/Constant'
export default {
middleware: 'onLoadHook',
methods: {
toMySites (name) {
switch (name) {
......@@ -87,17 +85,21 @@
setTimeout(() => {
this.$Spin.hide()
}, 1000)
},
customerJS: function () {
let script = document.createElement('script');
script.type = 'text/javascript';
script.src = '/customer-js.js';
document.getElementsByTagName('head')[0].appendChild(script)
}
},
mounted () {
this.init()
this.customerJS()
}
}
</script>
<style scoped>
.layout {
border: 1px solid #d7dde4;
......
export default function (context) {
if (process.client) {
let script = document.createElement('script');
script.type = 'text/javascript';
script.src = '/customer-js.js';
document.getElementsByTagName('head')[0].appendChild(script)
}
}
export default function onLoadHook(context) {
console.log('onLoadHook')
}
{
"_args": [
[
"@nuxtjs/axios@5.8.0",
"D:\\Coding\\Project\\resume"
]
],
"_from": "@nuxtjs/axios@5.8.0",
"_id": "@nuxtjs/axios@5.8.0",
"_inBundle": false,
"_integrity": "sha512-1+I2mTUuydKkY/Jz1InpLpkGWpReO5USNWxZpPaQL3py4Kv3sDF83ll/uHGngosyXr+OKBXoALRLCjmwSY77lg==",
"_location": "/@nuxtjs/axios",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@nuxtjs/axios@5.8.0",
"name": "@nuxtjs/axios",
"escapedName": "@nuxtjs%2faxios",
"scope": "@nuxtjs",
"rawSpec": "5.8.0",
"saveSpec": null,
"fetchSpec": "5.8.0"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/@nuxtjs/axios/-/axios-5.8.0.tgz",
"_spec": "5.8.0",
"_where": "D:\\Coding\\Project\\resume",
"bugs": {
"url": "https://github.com/nuxt-community/axios-module/issues"
},
"contributors": [
{
"name": "Pooya Parsa",
"email": "pooya@pi0.ir"
}
],
"dependencies": {
"@nuxtjs/proxy": "^1.3.3",
"axios": "^0.19.0",
"axios-retry": "^3.1.2",
"consola": "^2.10.1",
"defu": "^0.0.3"
},
"description": "Secure and easy axios integration with Nuxt.js",
"devDependencies": {
"@babel/core": "latest",
"@babel/preset-env": "latest",
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"@nuxtjs/eslint-config": "latest",
"babel-eslint": "latest",
"babel-jest": "latest",
"codecov": "latest",
"eslint": "latest",
"eslint-config-standard": "latest",
"eslint-plugin-import": "latest",
"eslint-plugin-jest": "latest",
"eslint-plugin-node": "latest",
"eslint-plugin-promise": "latest",
"eslint-plugin-standard": "latest",
"eslint-plugin-vue": "latest",
"husky": "latest",
"jest": "latest",
"nuxt-edge": "latest",
"standard-version": "latest"
},
"files": [
"lib",
"types/*.d.ts"
],
"homepage": "https://github.com/nuxt-community/axios-module#readme",
"license": "MIT",
"main": "lib/module.js",
"name": "@nuxtjs/axios",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt-community/axios-module.git"
},
"scripts": {
"dev": "nuxt test/fixture",
"lint": "eslint lib test",
"release": "yarn test && standard-version && git push --follow-tags && npm publish",
"test": "yarn lint && jest"
},
"types": "types/index.d.ts",
"version": "5.8.0"
}
import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
import Vue from 'vue'
import './vuex'
interface NuxtAxiosInstance extends AxiosInstance {
$request<T = any>(config: AxiosRequestConfig): Promise<T>
$get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
$delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
$head<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
$options<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
$post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>
$put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>
$patch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>
setHeader(name: string, value?: string | false, scopes?: string | string[]): void
setToken(token: string | false, type?: string, scopes?: string | string[]): void
onRequest(callback: (config: AxiosRequestConfig) => void): void
onResponse<T = any>(callback: (response: AxiosResponse<T>) => void): void
onError(callback: (error: AxiosError) => void): void
onRequestError(callback: (error: AxiosError) => void): void
onResponseError(callback: (error: AxiosError) => void): void
}
declare module '@nuxt/vue-app' {
interface Context {
$axios: NuxtAxiosInstance
}
interface NuxtAppOptions {
$axios: NuxtAxiosInstance
}
}
// Nuxt 2.9+
declare module '@nuxt/types' {
interface Context {
$axios: NuxtAxiosInstance
}
interface NuxtAppOptions {
$axios: NuxtAxiosInstance
}
}
declare module 'vue/types/vue' {
interface Vue {
$axios: NuxtAxiosInstance
}
}
import { NuxtAxiosInstance } from '.'
declare module 'vuex/types/index' {
interface Store<S> {
$axios: NuxtAxiosInstance,
}
}
This diff is collapsed.
{
"_from": "@types/babel-types@^7.0.0",
"_id": "@types/babel-types@7.0.7",
"_inBundle": false,
"_integrity": "sha512-dBtBbrc+qTHy1WdfHYjBwRln4+LWqASWakLHsWHR2NWHIFkv4W3O070IGoGLEBrJBvct3r0L1BUPuvURi7kYUQ==",
"_location": "/@types/babel-types",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/babel-types@^7.0.0",
"name": "@types/babel-types",
"escapedName": "@types%2fbabel-types",
"scope": "@types",
"rawSpec": "^7.0.0",
"saveSpec": null,
"fetchSpec": "^7.0.0"
},
"_requiredBy": [
"/@types/babylon",
"/constantinople"
],
"_resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.7.tgz",
"_shasum": "667eb1640e8039436028055737d2b9986ee336e3",
"_spec": "@types/babel-types@^7.0.0",
"_where": "D:\\Coding\\Project\\resume\\node_modules\\constantinople",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Troy Gerwien",
"url": "https://github.com/yortus"
},
{
"name": "Sam Baxter",
"url": "https://github.com/baxtersa"
},
{
"name": "Marvin Hagemeister",
"url": "https://github.com/marvinhagemeister"
},
{
"name": "Boris Cherny",
"url": "https://github.com/bcherny"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for babel-types",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "",
"name": "@types/babel-types",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/babel-types"
},
"scripts": {},
"typeScriptVersion": "2.8",
"types": "index",
"typesPublisherContentHash": "c122ea7d3e140cb66493cf81db0d08d0d35d723c5a9fd0be9b29e7761609f366",
"version": "7.0.7"
}
// Type definitions for babylon 6.16
// Project: https://github.com/babel/babylon, https://babeljs.io
// Definitions by: Troy Gerwien <https://github.com/yortus>
// Marvin Hagemeister <https://github.com/marvinhagemeister>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { File, Expression } from 'babel-types';
export function parse(code: string, opts?: BabylonOptions): File;
export function parseExpression(input: string, options?: BabylonOptions): Expression;
export interface BabylonOptions {
/**
* By default, import and export declarations can only appear at a program's top level.
* Setting this option to true allows them anywhere where a statement is allowed.
*/
allowImportExportEverywhere?: boolean;
/**
* By default, a return statement at the top level raises an error. Set this to true to accept such code.
*/
allowReturnOutsideFunction?: boolean;
allowSuperOutsideMethod?: boolean;
/**
* Indicate the mode the code should be parsed in. Can be either "script" or "module".
*/
sourceType?: 'script' | 'module';
/**
* Correlate output AST nodes with their source filename. Useful when
* generating code and source maps from the ASTs of multiple input files.
*/
sourceFilename?: string;
/**
* Array containing the plugins that you want to enable.
*/
plugins?: PluginName[];
}
export type PluginName =
'estree' |
'jsx' |
'flow' |
'typescript' |
'classConstructorCall' |
'doExpressions' |
'objectRestSpread' |
'decorators' |
'classProperties' |
'exportExtensions' |
'asyncGenerators' |
'functionBind' |
'functionSent' |
'dynamicImport';
{
"_from": "@types/babylon@^6.16.2",
"_id": "@types/babylon@6.16.5",
"_inBundle": false,
"_integrity": "sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w==",
"_location": "/@types/babylon",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/babylon@^6.16.2",
"name": "@types/babylon",
"escapedName": "@types%2fbabylon",
"scope": "@types",
"rawSpec": "^6.16.2",
"saveSpec": null,
"fetchSpec": "^6.16.2"
},
"_requiredBy": [
"/constantinople"
],
"_resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.5.tgz",
"_shasum": "1c5641db69eb8cdf378edd25b4be7754beeb48b4",
"_spec": "@types/babylon@^6.16.2",
"_where": "D:\\Coding\\Project\\resume\\node_modules\\constantinople",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Troy Gerwien",
"url": "https://github.com/yortus"
},
{
"name": "Marvin Hagemeister",
"url": "https://github.com/marvinhagemeister"
}
],
"dependencies": {
"@types/babel-types": "*"
},
"deprecated": false,
"description": "TypeScript definitions for babylon",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "",
"name": "@types/babylon",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.8",
"types": "index",
"typesPublisherContentHash": "d6861e06508c0c54a6a46d7b72e96db7907de3621ac44aab8a3e647b8431cddd",
"version": "6.16.5"
}
This diff is collapsed.
{
"_args": [
[
"@types/q@1.5.2",
"D:\\Coding\\Project\\resume"
]
],
"_from": "@types/q@1.5.2",
"_id": "@types/q@1.5.2",
"_inBundle": false,
"_integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==",
"_location": "/@types/q",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@types/q@1.5.2",
"name": "@types/q",
"escapedName": "@types%2fq",
"scope": "@types",
"rawSpec": "1.5.2",
"saveSpec": null,
"fetchSpec": "1.5.2"
},
"_requiredBy": [
"/coa"
],
"_resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz",
"_spec": "1.5.2",
"_where": "D:\\Coding\\Project\\resume",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"contributors": [
{
"name": "Barrie Nemetchek",
"url": "https://github.com/bnemetchek"
},
{
"name": "Andrew Gaspar",
"url": "https://github.com/AndrewGaspar"
},
{
"name": "John Reilly",
"url": "https://github.com/johnnyreilly"
},
{
"name": "Michel Boudreau",
"url": "https://github.com/mboudreau"
},
{
"name": "TeamworkGuy2",
"url": "https://github.com/TeamworkGuy2"
}
],
"dependencies": {},
"description": "TypeScript definitions for Q",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "",
"name": "@types/q",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/q"
},
"scripts": {},
"typeScriptVersion": "2.3",
"types": "index",
"typesPublisherContentHash": "831f89b03c9bf944abfea1d45425872fe7bc687a3ea0ee83f6bb2bb63af9dbc2",
"version": "1.5.2"
}
import * as axios from 'axios'
export interface IAxiosRetryConfig {
/**
* The number of times to retry before failing
* default: 3
*
* @type {number}
*/
retries?: number,
/**
* Defines if the timeout should be reset between retries
* default: false
*
* @type {boolean}
*/
shouldResetTimeout?: boolean,
/**
* A callback to further control if a request should be retried. By default, it retries if the result did not have a response.
* default: error => !error.response
*
* @type {Function}
*/
retryCondition?: (error: axios.AxiosError) => boolean,
/**
* A callback to further control the delay between retry requests. By default there is no delay.
*
* @type {Function}
*/
retryDelay?: (retryCount: number, error: axios.AxiosError) => number
}
export interface IAxiosRetry {
(
axios: axios.AxiosStatic | axios.AxiosInstance,
axiosRetryConfig?: IAxiosRetryConfig
): void
}
declare const axiosRetry: IAxiosRetry
export default axiosRetry
export function isNetworkError(error: Error): boolean;
export function isRetryableError(error: Error): boolean;
export function isSafeRequestError(error: Error): boolean;
export function isIdempotentRequestError(error: Error): boolean;
export function isNetworkOrIdempotentRequestError(error: Error): boolean;
export function exponentialDelay(retryNumber: number): number;
{
"_args": [
[
"axios-retry@3.1.2",
"D:\\Coding\\Project\\resume"
]
],
"_from": "axios-retry@3.1.2",
"_id": "axios-retry@3.1.2",
"_inBundle": false,
"_integrity": "sha512-+X0mtJ3S0mmia1kTVi1eA3DAC+oWnT2A29g3CpkzcBPMT6vJm+hn/WiV9wPt/KXLHVmg5zev9mWqkPx7bHMovg==",
"_location": "/axios-retry",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "axios-retry@3.1.2",
"name": "axios-retry",
"escapedName": "axios-retry",
"rawSpec": "3.1.2",
"saveSpec": null,
"fetchSpec": "3.1.2"
},
"_requiredBy": [
"/@nuxtjs/axios"
],
"_resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-3.1.2.tgz",
"_spec": "3.1.2",
"_where": "D:\\Coding\\Project\\resume",
"author": {
"name": "Rubén Norte",
"email": "ruben.norte@softonic.com"
},
"bugs": {
"url": "https://github.com/softonic/axios-retry/issues"
},
"dependencies": {
"is-retry-allowed": "^1.1.0"
},
"description": "Axios plugin that intercepts failed requests and retries them whenever posible.",