From 064f2c1882ea4c788fe7657e8fb37381771940f8 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 27 May 2022 13:58:40 +0200 Subject: Setup contact form --- exampleSite/config.toml | 11 +++++++++++ exampleSite/content/_index.md | 1 - exampleSite/content/contact.md | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 exampleSite/content/contact.md (limited to 'exampleSite') diff --git a/exampleSite/config.toml b/exampleSite/config.toml index c151c16..9224727 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -149,6 +149,12 @@ disableKinds = ['RSS'] # RSS/Atom feed size feedSize = 25 + [params.contact] + # Formspree URL, used in contacts form + formAction = 'https://formspree.io/f/example' + # Contact form email subject + emailSubject = 'Contact form submission' + [params.assets] # Site icons, relative to ./static favicon = '' # favicon.ico for legacy browsers @@ -187,6 +193,11 @@ disableKinds = ['RSS'] name = 'Documentation' url = '/documentation/' weight = 4 + [[menu.main]] + identifier = 'contact' + name = 'Contact' + url = '/contact/' + weight = 5 [[menu.main]] identifier = 'github' name = 'GitHub Project' diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index ccd4a80..8b5e280 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -1,6 +1,5 @@ --- title: "Ed." - --- # hi. diff --git a/exampleSite/content/contact.md b/exampleSite/content/contact.md new file mode 100644 index 0000000..56147cb --- /dev/null +++ b/exampleSite/content/contact.md @@ -0,0 +1,8 @@ +--- +title: Contact +description: We'd love to hear from you +--- + +This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service. + +{{< form-contact >}} -- cgit v1.2.3