【问题标题】:Integrating FormSpree into GitHub Jekyll markdown file将 FormSpree 集成到 GitHub Jekyll 降价文件中
【发布时间】:2020-05-11 22:09:27
【问题描述】:

我正在尝试向 GitHub Jekyll 网站添加联系表单。我一直在听从最受欢迎的答案here、YouTube 教程hereFormSpree site 的建议。

为了保持网站设计的一致性,与这些教程相比的一个主要区别可能是我将 FormSpree 联系表单添加到降价文件中,即here。正如您在这个 Markdown 文件中看到的那样,我尝试了两次创建表单(一次是简单的建议,一次是更多的花里胡哨)。

我几乎可以肯定表单看起来不像预期的那样(在我关注的 YouTube 教程中看起来更像 this),因为我没有使用 .html 文件。但是,当我尝试将我的页面转换为 .html 而不是 .md 时,它使联系表单页面在视觉/美学上看起来与其他网页选项卡不一致。因此,我希望使用相同的当前 YAML 元数据来维护 .md 格式。

我的问题是:是否可以直接在 Markdown (.md) 文件中将 FormSpree 联系表单添加到 GitHub Jekyll 页面,如果可以,我需要进行哪些更改才能完成此操作?感谢您分享任何建议!

【问题讨论】:

    标签: github jekyll contact-form github-flavored-markdown


    【解决方案1】:

    在 md 文件中使用 html 块似乎很棘手。

    在您的特定情况下,当您包含原始 html 时,您可以使用 nomarkdown extension 标记。

    试试吧:

    {::nomarkdown}
    <form action="http://formspree.io/moqeoggo method="POST">
      <input type="email" name="_replyto">
      <textarea   name="body"></textarea>
      <input type="submit" value="Send">
    </form>
    
    
    {:/nomarkdown}
    

    【讨论】:

      猜你喜欢
      • 2020-05-12
      • 2016-05-13
      • 2017-10-02
      • 2016-07-16
      • 2017-11-13
      • 2014-11-07
      • 1970-01-01
      • 1970-01-01
      • 2021-07-01
      相关资源
      最近更新 更多