SHARE
TWEET

netlify cms config.yml

jnobles Aug 24th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # config.yml
  2. publish_mode: editorial_workflow
  3. backend:
  4.   name: git-gateway
  5.   branch: master # Branch to update (optional; defaults to master)
  6. media_folder: 'assets/uploads'
  7. media_library:
  8.   name: uploadcare
  9.   config:
  10.     publickey: d*******************
  11. site_url: https://hemptrade.netlify.com
  12. collections:
  13.   - name: 'article'
  14.     label: 'Articles'
  15.     folder: '_posts/'
  16.     create: true
  17.     slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
  18.     editor:
  19.       preview: false
  20.     fields:
  21.       - { label: 'Layout', name: 'layout', widget: 'hidden', default: 'post' }
  22.       - { label: 'Title', name: 'title', widget: 'string' }
  23.       - { label: 'Publish Date', name: 'date', widget: 'datetime' }
  24.       - {label: "Featured Image", name: "thumbnail", widget: "image"}
  25.       - { label: 'Categories',
  26.           name: 'categories',
  27.           widget: 'relation',
  28.           collection: 'category',
  29.           displayFields: [category],
  30.           searchFields: [category],
  31.           valueField: 'category'
  32.           }
  33.       - { label: 'Tags',
  34.           name: 'tags',
  35.           widget: 'relation',
  36.           collection: 'tags',
  37.           displayFields: [tag, description],
  38.           searchFields: [tag, description],
  39.           valueField: 'tag',
  40.           }
  41.       - { label: 'Meta Description', name: 'meta_description', widget: 'string'}
  42.       - {
  43.           label: 'Author',
  44.           name: 'author',
  45.           widget: 'relation',
  46.           collection: 'authors',
  47.           displayFields: [display_name],
  48.           searchFields: [display_name],
  49.           valueField: 'display_name',
  50.         }
  51.       - { label: 'Body', name: 'body', widget: 'markdown' }
  52.   - name: 'category'
  53.     label: 'Categories'
  54.     folder: '_categories/'
  55.     identifier_field: category
  56.     create: true
  57.     editor:
  58.         preview: false
  59.     fields:
  60.       - { label: 'Category', name: 'category', widget: 'string'}
  61.   - name: 'tags'
  62.     label: 'Tags'
  63.     folder: '_tags/'
  64.     identifier_field: tag
  65.     create: true
  66.     editor:
  67.       preview: false
  68.     fields:
  69.       - { label: 'Tag', name: 'tag', widget: 'string'}
  70.       - { label: 'Description', name: 'description', widget: 'string'}
  71.   - name: 'authors'
  72.     label: 'Authors'
  73.     folder: '_authors/'
  74.     identifier_field: name
  75.     create: true
  76.     editor:
  77.       preview: false
  78.     fields:
  79.       - { label: 'Layout', name: 'layout', widget: 'hidden', default: 'author' }
  80.       - { label: 'Short Name', name: 'name', widget: 'string' }
  81.       - { label: 'Diplay Name', name: 'display_name', widget: 'string' }
  82.       - { label: 'Email', name: 'email', widget: 'string' }
  83.       - { label: 'Twitter', name: 'twitter', widget: 'string', required: false}
  84.       - { label: 'LinkedIn', name: 'linkedin', widget: 'string', required: false}
  85.       - { label: 'Author Bio', name: 'body', widget: 'markdown', required: false }
  86.   - name: 'pages'
  87.     label: 'Pages'
  88.     editor:
  89.       preview: false
  90.     files:
  91.       - label: 'About Page'
  92.         name: 'about'
  93.         file: 'about.md'
  94.         fields:
  95.           - { label: 'Title', name: 'title', widget: 'hidden', default: 'about' }
  96.           - { label: 'Layout', name: 'title', widget: 'hidden', default: 'about' }
  97.           - { label: 'Body', name: 'body', widget: 'markdown' }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top