mirror of
				https://github.com/mastermindzh/rickvanlieshout.com
				synced 2025-11-04 02:29:46 +01:00 
			
		
		
		
	Add support for Netlify CMS preview_path
preview_path allows for UI linkage between the Netlify CMS UI and the associated preview deploy build. Also adds a commented out publish_mode configuration to enable the UI authoring flow, which continues to default to publish direct to master.
This commit is contained in:
		@@ -5,12 +5,17 @@ backend:
 | 
				
			|||||||
media_folder: "static/media"
 | 
					media_folder: "static/media"
 | 
				
			||||||
public_folder: "/media"
 | 
					public_folder: "/media"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Uncomment to leverage Netlify CMS UI authoring flow
 | 
				
			||||||
 | 
					# see: https://www.netlifycms.org/docs/configuration-options/#publish-mode
 | 
				
			||||||
 | 
					# publish_mode: editorial_workflow
 | 
				
			||||||
 | 
					
 | 
				
			||||||
collections:
 | 
					collections:
 | 
				
			||||||
  - name: "posts"
 | 
					  - name: "posts"
 | 
				
			||||||
    label: "Posts"
 | 
					    label: "Posts"
 | 
				
			||||||
    folder: "content/posts"
 | 
					    folder: "content/posts"
 | 
				
			||||||
    create: true
 | 
					    create: true
 | 
				
			||||||
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
 | 
					    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
 | 
				
			||||||
 | 
					    preview_path: "posts/{{fields.slug}}"
 | 
				
			||||||
    fields:
 | 
					    fields:
 | 
				
			||||||
      - {label: "Template", name: "template", widget: "hidden", default: "post"}
 | 
					      - {label: "Template", name: "template", widget: "hidden", default: "post"}
 | 
				
			||||||
      - {label: "Title", name: "title", widget: "string"}
 | 
					      - {label: "Title", name: "title", widget: "string"}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user