From 0f56d9fbf0aac8f8f11acf81e5dc3a91f93e9d0a Mon Sep 17 00:00:00 2001 From: Kevin Van Der Werff Date: Wed, 2 Oct 2019 13:35:27 +0200 Subject: [PATCH] :pencil: update README.md & webgems.code-snippets --- .vscode/webgems.code-snippets | 3 ++- README.md | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.vscode/webgems.code-snippets b/.vscode/webgems.code-snippets index f5e905c..6949e64 100644 --- a/.vscode/webgems.code-snippets +++ b/.vscode/webgems.code-snippets @@ -21,7 +21,8 @@ "{", " \"title\": \"${1:title}\",", " \"desc\": \"${2:desc}\",", - " \"url\": \"${3:url}\"", + " \"url\": \"${3:url}\",", + " \"tags\": \"[${4:tags}]\"", "}," ], "description": "Add a webgem" diff --git a/README.md b/README.md index 6a09626..f7faf3c 100644 --- a/README.md +++ b/README.md @@ -45,21 +45,30 @@ For any other editor, please use the following schema: { "title": "Awesome resource", "desc": "This awesome resource will make your life much easier.", // 1 - 2 sentences long. - "url": "https://url.com" + "url": "https://url.com", + "tags": ["UI", "workflow", "API"] // Please add at least 3 tags } ] } ] ``` -If you just want to add a resource to an already existing category, extend the `resources` array with your resources. Please include all the keys enlisted (`title`, `desc`, `url`). +In our [resources](resources/) we have an `.json` file for each category, you can add your suggested resource by adding it to the `resources` array in the JSON file using the schema as described above. Please include all the keys enlisted (`title`, `desc`, `url`, `tags` with at least 3 tags). For URLs, please consider the following: - Do not link to language specific pages (e.g. don't link to `.org/en-US/docs`, instead, link to `/docs` if possible). - Do not use `'&'` as it will break the URL referencing. - We won't allow referral links. -To add a completely new resource, include a new object at the root of the array, the pages are dynamically rendered so you don't have to worry about anything else. Again, include all the enlisted keys, reference to the schema above. +To add a completely new resource, add a `.json file to [resources](resources/). Make sure it follows the sceme like any other category resource: +```js +{ + "title": String, + "slug": String, // use lowecase letters, eg: "/ruby" + "resources": [Rescource] // Reference to above for schema of Resource +} +``` +Add it to [resources](resources/index.js) list of imports and export it aswell, that way Nuxt can take care of rendering the page. ## Built With