staticman.yml 3.7 KB

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