staticman.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # Name of the property. You can have multiple properties with completely
  2. # different config blocks for different sections of your site.
  3. # For example, you can have one property to handle comment submission and
  4. # another one to handle posts.
  5. # To encrypt strings use the following endpoint:
  6. # https://{STATICMAN API INSTANCE}/v3/encrypt/{TEXT TO BE ENCRYPTED}
  7. # {STATICMAN API INSTANCE} should match the `endpoint` in the theme config
  8. # file. It defaults to "staticman3.herokuapp.com".
  9. comments:
  10. # (*) REQUIRED
  11. #
  12. # Names of the fields the form is allowed to submit. If a field that is
  13. # not here is part of the request, an error will be thrown.
  14. allowedFields: ["name", "email", "url", "message"]
  15. # (*) REQUIRED WHEN USING NOTIFICATIONS
  16. #
  17. # When allowedOrigins is defined, only requests sent from one of the domains
  18. # listed will be accepted. The origin is sent as part as the `options` object
  19. # (e.g. <input name="options[origin]" value="https://yourdomain.com/post1")
  20. # allowedOrigins: ["https://example.com"]
  21. # (*) REQUIRED
  22. #
  23. # Name of the branch being used. Must match the `branch` in the theme config
  24. # file.
  25. branch: "master" # use "master" for user page or "gh-pages" for project pages
  26. commitMessage: "New comment by {fields.name}"
  27. # (*) REQUIRED
  28. #
  29. # Destination path (filename) for the data files. Accepts placeholders.
  30. filename: "comment-{@timestamp}"
  31. # The format of the generated data files. Accepted values are "json", "yaml"
  32. # or "frontmatter"
  33. format: "yaml"
  34. # List of fields to be populated automatically by Staticman and included in
  35. # the data file. Keys are the name of the field. The value can be an object
  36. # with a `type` property, which configures the generated field, or any value
  37. # to be used directly (e.g. a string, number or array)
  38. generatedFields:
  39. date:
  40. type: "date"
  41. options:
  42. format: "iso8601" # "iso8601" (default), "timestamp-seconds", "timestamp-milliseconds"
  43. # Whether entries need to be approved before they are published to the main
  44. # branch. If set to `true`, a pull request will be created for your approval.
  45. # Otherwise, entries will be published to the main branch automatically.
  46. moderation: false
  47. # Akismet spam detection.
  48. # akismet:
  49. # enabled: true
  50. # author: "name"
  51. # authorEmail: "email"
  52. # authorUrl: "url"
  53. # content: "message"
  54. # type: "comment"
  55. # Name of the site. Used in notification emails.
  56. # name: "Your Site"
  57. # Notification settings. When enabled, users can choose to receive notifications
  58. # via email when someone adds a reply or a new comment. This requires an account
  59. # with Mailgun, which you can get for free at https://mailgun.com.
  60. # notifications:
  61. # Enable notifications
  62. # enabled: true
  63. # (!) ENCRYPTED
  64. #
  65. # Mailgun API key
  66. # apiKey: ""
  67. # (!) ENCRYPTED
  68. #
  69. # Mailgun domain (encrypted)
  70. # domain: ""
  71. # (*) REQUIRED
  72. #
  73. # Destination path (directory) for the data files. Accepts placeholders.
  74. path: "_data/comments/{options.slug}" # (default)
  75. # Names of required files. If any of these isn't in the request or is empty,
  76. # an error will be thrown.
  77. requiredFields: ["name", "email", "message"]
  78. # List of transformations to apply to any of the fields supplied. Keys are
  79. # the name of the field and values are possible transformation types.
  80. transforms:
  81. email: md5
  82. # reCAPTCHA (OPTIONAL)
  83. # To enable reCAPTCHA:
  84. # 1. Set `enabled` to `true`
  85. # 2. Register your domain at https://www.google.com/recaptcha/ and choose reCAPTCHA V2
  86. # 3. Uncomment `siteKey` and `secret` and fill them in with your values
  87. reCaptcha:
  88. enabled: false
  89. #siteKey: ""
  90. # ENCRYPT reCaptcha secret key using Staticman /encrypt endpoint
  91. # i.e. https://{STATICMAN API INSTANCE}/v3/encrypt/{your-site-secret}
  92. # For more information, visit https://staticman.net/docs/encryption
  93. #secret: ""