Last active
October 13, 2021 21:10
-
-
Save leomp12/a8ab3dd9c72aec7696e1775e349a8a70 to your computer and use it in GitHub Desktop.
Revisions
-
leomp12 renamed this gist
Oct 13, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
leomp12 renamed this gist
Oct 13, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
leomp12 renamed this gist
Oct 13, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
leomp12 revised this gist
Oct 13, 2021 . 1 changed file with 32 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ { "collections": [ { "name": "blog2", "label": "blog2", "folder": "content/blog2", "create": true, "fields": [ { "label": "Title", "name": "title", "widget": "string" }, { "label": "Publish Date", "name": "date", "widget": "datetime" }, { "label": "Featured Image", "name": "thumbnail", "widget": "image" }, { "label": "Body", "name": "body", "widget": "markdown" } ] } ] } -
leomp12 revised this gist
Jan 21, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Para manter as opções padrão do CMS e adicionar os novos campos, a maneira mais simples é editar o arquivo `template/public/admin/config.json` já criado por padrão em deploys a partir do [Storefront Starter](https://github.com/ecomplus/storefront-starter). Neste exemplo (`config.json` em anexo neste Gist) a configuração será acessada em `/admin/#/collections/settings/entries/theme`, para múltiplas páginas dentro da coleção _Configurações_ basta adicionar mais de um objeto no array _files_. Também é possível criar uma coleção nova em vez de usar a _Configurações_, neste caso utilize outro `name` e -
leomp12 created this gist
Jan 21, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ # [Storefront](https://developers.e-com.plus/storefront/) - Adicionando uma página de configuração ao CMS Para manter as opções padrão do CMS e adicionar os novos campos, a maneira mais simples é editar o arquivo `template/public/admin/config.json` já criado por padrão em deploys a partir do [Storefront Starter](https://github.com/ecomplus/storefront-starter). Neste exemplo a configuração será acessada em `/admin/#/collections/settings/entries/theme`, para múltiplas páginas dentro da coleção _Configurações_ basta adicionar mais de um objeto no array _files_. Também é possível criar uma coleção nova em vez de usar a _Configurações_, neste caso utilize outro `name` e mais algumas propriedades: ```js { // ... name: 'theming', label: 'Tema', description: 'Configurações específicas do tema', delete: false, editor: { preview: false }, files: [ // ... ] } ``` ### Links úteis - [Mais exemplos de `fields`](https://github.com/ecomplus/storefront/tree/master/%40ecomplus/storefront-template/template/js/netlify-cms/base-config/collections/settings) nas coleções padrão do Storefront; - [Referência do Netlify CMS](https://www.netlifycms.org/docs/collection-types/); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ { "collections": [ { "name": "settings", "files": [ { "name": "theme", "label": "Configurações do tema", "file": "content/theme.json", "fields": [ { "label": "Cor da tarja", "name": "stripe_color", "widget": "color" }, { "label": "Texto do banner", "name": "banner_text", "widget": "string", "hint": "Texto exibido em cima do banner principal" } ] } ] } ] }