diff --git a/.github/invite-contributors.yaml b/.github/invite-contributors.yaml index db67f8fe0..e13da67f4 100644 --- a/.github/invite-contributors.yaml +++ b/.github/invite-contributors.yaml @@ -1,2 +1,2 @@ # team name -team: Maintainers \ No newline at end of file +team: Maintainers diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 0b88332af..6cd249830 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -3,14 +3,51 @@ name: Lint Markdown on: [push, pull_request] jobs: - build: + markdown: + name: Markdown Lint runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' - - name: Install modules - run: yarn - - run: yarn markdown:lint + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Install modules + run: yarn + - run: yarn markdown:lint + misspell: + name: Check Spelling + runs-on: ubuntu-latest + steps: + - name: Check Out + uses: actions/checkout@v2 + - name: Install + run: | + wget -O - -q https://git.io/misspell | sh -s -- -b . + - name: Misspell + run: | + git ls-files --empty-directory | xargs ./misspell -error + trailing-whitespace: + name: Trailing whitespace + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check for trailing whitespace + run: "! git grep -EIn $'[ \t]+$'" + yamllint: + name: YAML + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax + architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install yamllint + - name: YAML Lint + run: | + # return non-zero exit code on warnings + yamllint --strict . diff --git a/.yamllint b/.yamllint new file mode 100644 index 000000000..600185cef --- /dev/null +++ b/.yamllint @@ -0,0 +1,9 @@ +--- + +extends: default + +rules: + colons: disable + document-start: disable + line-length: disable + truthy: false diff --git a/contributors/contributors.yaml b/contributors/contributors.yaml index c2da202bc..38df10b9c 100644 --- a/contributors/contributors.yaml +++ b/contributors/contributors.yaml @@ -216,7 +216,7 @@ bio: "Web Developer" avatar: ./images/rcheuk.png twitter: "@rachel_cheuk" - + - id: remi2j name: Remi de Juvigny bio: "Software Engineer" @@ -281,4 +281,4 @@ name: Danilo Raisi bio: "Software Engineer" avatar: ./images/daniloraisi.jpeg - twitter: "@daniloraisi" \ No newline at end of file + twitter: "@daniloraisi" diff --git a/docs/assets-css.md b/docs/assets-css.md index 5c373146e..a3c223fa2 100644 --- a/docs/assets-css.md +++ b/docs/assets-css.md @@ -367,14 +367,14 @@ export default function (Vue, { head }) { rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css', }) - + head.link.push({ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900', }); Vue.use(Vuetify) - + // Set default layout as a global component Vue.component('Layout', DefaultLayout) } @@ -391,17 +391,17 @@ export default function (Vue, { appOptions, head }) { rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css', }) - + head.link.push({ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900', }); - + const opts = { ... } //opts includes, vuetify themes, icons, etc. Vue.use(Vuetify) - + appOptions.vuetify = new Vuetify(opts); - + // Set default layout as a global component Vue.component('Layout', DefaultLayout) } diff --git a/docs/assets-scripts.md b/docs/assets-scripts.md index d23495e28..aa1d83351 100644 --- a/docs/assets-scripts.md +++ b/docs/assets-scripts.md @@ -142,7 +142,7 @@ import moment from 'moment'; export default function (Vue) { // Set default layout as a global component Vue.component('Layout', DefaultLayout) - + //Use Moment.Js library inside our project Object.defineProperty(Vue.prototype, '$moment', { value: moment @@ -203,17 +203,17 @@ In the same way, you can use any external library that causes issues in server s diff --git a/docs/body-html-attributes.md b/docs/body-html-attributes.md index a6ad9f9bf..41a6e2360 100644 --- a/docs/body-html-attributes.md +++ b/docs/body-html-attributes.md @@ -10,7 +10,7 @@ Global body or head attributes are added in `src/main.js`. export default function (Vue, { head }) { // Add attributes to HTML tag head.htmlAttrs = { lang: 'en' } - + // Add attributes to BODY tag head.bodyAttrs = { class: 'custom-body-class' } } diff --git a/docs/deploy-to-az-static-web-app.md b/docs/deploy-to-az-static-web-app.md index 7c83a88d8..d6d6c2df3 100644 --- a/docs/deploy-to-az-static-web-app.md +++ b/docs/deploy-to-az-static-web-app.md @@ -11,7 +11,7 @@ Azure Static Web Apps publishes a website to a prodution environment by building ### Create a static web app -After you created your GitHub repository and commited your code, you can create a static web app from the Azure portal. +After you created your GitHub repository and committed your code, you can create a static web app from the Azure portal. 1. Navigate to the [Azure Portal](https://portal.azure.com) 2. Select **Create a Resource** @@ -57,7 +57,7 @@ After you sign in with GitHub, enter the repository information. ## View the website -When you create an Azure Static Web App, Azure resources are provisined to make up your app. Also a GitHub Action workflow is created and commited to your repository. This workflow builds and publishes your application. +When you create an Azure Static Web App, Azure resources are provisioned to make up your app. Also a GitHub Action workflow is created and committed to your repository. This workflow builds and publishes your application. Before you can navigate to your new static site, the deployment build must first finish running. diff --git a/docs/deploy-to-netlify.md b/docs/deploy-to-netlify.md index 889c3e295..670f6cea9 100644 --- a/docs/deploy-to-netlify.md +++ b/docs/deploy-to-netlify.md @@ -18,7 +18,7 @@ Alternatively, you can deploy using a `netlify.toml` file. Create a file in the command = "gridsome build" ``` -More infomation on `netlify.toml` files can be found in the [Netlify docs](https://www.netlify.com/docs/netlify-toml-reference/). +More information on `netlify.toml` files can be found in the [Netlify docs](https://www.netlify.com/docs/netlify-toml-reference/). **Note:** diff --git a/docs/dev-tools.md b/docs/dev-tools.md index d10f6cd71..75c999954 100644 --- a/docs/dev-tools.md +++ b/docs/dev-tools.md @@ -34,12 +34,13 @@ module.exports = { ## Vetur -[Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur) is Vue tooling for VS Code. +[Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur) is Vue tooling for VS Code. + Vetur works perfect with Gridsome. ### GraphQL syntax for `` and `` -Detail is [here](https://github.com/vuejs/vetur/issues/975#issuecomment-461197031) +Detail is [here](https://github.com/vuejs/vetur/issues/975#issuecomment-461197031) 1. Install [GraphQL](https://marketplace.visualstudio.com/items?itemName=kumar-harsh.graphql-for-vscode) 2. Add this item in `settings.json` diff --git a/docs/head.md b/docs/head.md index d536c2903..9276d79f1 100644 --- a/docs/head.md +++ b/docs/head.md @@ -22,7 +22,7 @@ export default function (Vue, { head }) { rel: 'stylesheet', href: 'https://some-server.com/external-styleheet.css' }) - + // Add an external JavaScript before the closing tag head.script.push({ src: 'https://some-server.com/external-script.js', @@ -87,8 +87,9 @@ export default { ## How to overwrite from child component -If you need to overwrite meta tags, add `key` property. -Gridsome is passing `tagIdKeyName: 'key'` to vue-meta as default option. +If you need to overwrite meta tags, add `key` property. + +Gridsome is passing `tagIdKeyName: 'key'` to vue-meta as default option. ```js // parent component diff --git a/docs/querying-data.md b/docs/querying-data.md index 674851620..a31ec33ce 100644 --- a/docs/querying-data.md +++ b/docs/querying-data.md @@ -227,7 +227,7 @@ export default { functional: true, render(createElement, context) { const { content } = context.data.$static.post - + return createElement('div', { domProps: { innerHTML: content diff --git a/examples/create-pages-api.md b/examples/create-pages-api.md index e5eb8489a..1813dd1cc 100644 --- a/examples/create-pages-api.md +++ b/examples/create-pages-api.md @@ -1,5 +1,5 @@ --- -title: Programmatically generate pages +title: Programmatically generate pages filepath: gridsome.server.js filetype: js order: 10 diff --git a/examples/dynamic-routing.md b/examples/dynamic-routing.md index 7cf10deb1..42a485529 100644 --- a/examples/dynamic-routing.md +++ b/examples/dynamic-routing.md @@ -8,7 +8,7 @@ order: 4 ```html