# This line should *not* be indented media_folder: "source/images/uploads" # Media files will be stored in the repo under images/uploads public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads
collections: - name: "blog" # Used in routes, e.g., /admin/collections/blog label: "Post" # Used in the UI folder: "source/_posts" # The path to the folder where the documents are stored create: true # Allow users to create new documents in this collection slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md fields: # The fields for each document, usually in front matter - {label: "Layout", name: "layout", widget: "hidden", default: "post"} - {label: "Title", name: "title", widget: "string"} - {label: "Publish Date", name: "date", widget: "datetime"} - {label: "Tags", name: "tags", widget: "list", required: false} - {label: "Categories", name: "categories", widget: "list", required: false} - {label: "Photos", name: "photos", widget: "list", required: false} - {label: "Excerpt", name: "excerpt", widget: "string", required: false} - {label: "Body", name: "body", widget: "markdown"} - {label: "Permalink", name: "permalink", widget: "string", required: false} - {label: "Comments", name: "comments", widget: "boolean", default: true, required: false}
index.html
1 2 3 4 5 6 7 8 9 10 11 12 13
<!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Content Manager</title> </head> <body> <!-- Include the script that builds the page and powers Netlify CMS --> <script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script> <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> </body> </html>