I am attempting to add a contact form to a GitHub Jekyll website. I have mostly been following advice from the most-liked answer here, from a YouTube tutorial here, and from the FormSpree site.
In my attempt to keep the website design consistent, one major difference compared to these tutorials is probably that I am adding the FormSpree contact form to a markdown file, which is here. As you can see in this markdown file, I tried creating the form twice (once with bare-bone suggestions and once with more bells and whistles).
I am almost certain the form is not looking as expected (which in the YouTube tutorial I was following would look more like this) because I am not using a .html file. However, when I tried to convert my page to .html instead of .md it rendered the contact form page looking visually/aesthetically inconsistent with the rest of the webpage tabs. As a result, I am hoping to maintain the .md format with the same current YAML metadata.
My question is: Is it possible to add a FormSpree contact form to GitHub Jekyll pages directly inside a Markdown (.md) file and, if so, what alterations would I need to make to accomplish this? Thank you for sharing any advice!
Using html chunks in md files can seem quite tricky.
In your particular case, as you're including raw html, you can use nomarkdown extension tag.
Just try :
{::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}
Related
I am quite new to TYPO3 and i am trying to build something which i am not sure how to do!
I have installed the T3G/blog extension.
On my website i have a "Blog" page, where i would like to show the blog posts like this (for each post):
Post Title
Post Date
Full Post Content
Post Author
I imagine i have to use a for loop to go through the blog posts available, but i can't find a way to make it work.
Right now i have something like this:
<div class="blog__content__left">
<f:debug>{_all}</f:debug>
<div class="blog__post__title"></div>
<div class="blog__post__date"></div>
<div class="blog__post__content"></div>
<div class="blog__post__author"></div>
</div>
The output of the debug is an array with my posts, but now my question is:
how can i render the right information on the right place?
Thank you!
You have to loop through all posts of a blog.
<f:for each="{blog.posts}" as="post">
<h2>{post.title}</h2>
<p>{post.content}</p>
</f:for>
There are so many tutorials about blog. Have a look at https://docs.typo3.org/typo3cms/ExtbaseFluidBook/3-BlogExample/Index.html
Debug
When you see the output in your debug, you can use the information in your template. Say your debug output sais the following:
- Blog
> Headline
> Text
You can call these items in your template as {blog.headline} (for example).
Using original files as base for your own template
I suggest taking a look at the default templates provided. You can find these template in your typo3/typo3conf/ext/{extension}/Resources/Private Folder.
Take a look at the tags being used! You can use these in your template.
You should download the Layouts, Partials and Template folder, and upload these in your fileadmin/{blogmodule}/ folder. Set the path in TypoScript, You'll probably find an example in the plugin documentation.
I have started a new project in Github and as I will need to collaborate with people, I wanted to start a decent documentation. I would like to use Github Pages for this task, but the documentation will need to include many equations, as for instance https://wec-sim.github.io/WEC-Sim/theory.html.
I have read on-line on numerous posts that Mathjax provides a good tool to read equations on browsers and has been linked to Github pages. However, although I tried to follow many different strategies, I have not been able to get my Page to show any equations yet.
You can find my project at https://github.com/enricoande/uuv and the corresponding page at https://enricoande.github.io/uuv/. The page is built from https://github.com/enricoande/uuv/blob/master/docs/README.md.
Initially, I was not able to display equations at all, but could see the text in the Page. Now, I am not even able to see the page. This has happened after adding the file https://github.com/enricoande/uuv/blob/master/docs/_layouts/page.html which reads
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
Is it possible that the reason why I can no longer see my page is that Mathjax is too slow (I have found comments on this regard on-line)? Otherwise, have you got suggestions on what I could do to fix the Page to display the equations?
As you can see I am a beginner with Github pages and html.
Any suggestion is well appreciated as I am now utterly stuck. Thank you for the help!
If I open the referenced JS file at https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML, I see
console.warn('WARNING: cdn.mathjax.org has been retired. Check https://www.mathjax.org/cdn-shutting-down/ for migration tips.')
So check https://www.mathjax.org/cdn-shutting-down/ for detailed migration tips.
Example solution
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?...">
</script>
If you open the HTML source of your page, you'll notice that it contains nothing but the script tag.
This is expected since your page template is not actually a template -- for that it would have to contain {{ content }} or similar liquid templating tags so that it can pull content from the actual page.
For example, https://github.com/jekyll/jekyll/blob/master/docs/_layouts/page.html has
---
layout: default
---
<section class="standalone">
<div class="grid">
<div class="unit whole">
<article>
<h1>{{ page.title }}</h1>
{{ content }}
</article>
</div>
<div class="clear"></div>
</div>
</section>
You will then have to create an index.html file in your docs folder that starts with
---
layout: page
---
so that it pulls in the page template (and the script tag).
Try installing jekyll and generating the default site to evaluate good defaults; see the docs for more information on that. Usually, a script tag appears in a head, header or footer template.
What I'm trying to do is displaying a PayPal donation button into a Github project README.md file. The markup I added is displayed as HTML rather than being properly rendered as donation button.
HTML
// PayPal source here
Do you have any thought?
The current code generated by paypal buttons is based on a FORM html tag with a POST method. Fortunately the values are always the same and paypal is supporting them to be passed by the GET method. So, you can safely read the form code and convert it to a direct link.
On my case I just made a link to my button like this:
[![](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X6XHVCPMRQEL4)
I am using it on my project at http://github.com/ctodobom/OpenNoteScanner
In all likelihood, it is not possible for security reasons (see CSFR and XSS for examples of potentially related security concerns). In other words, GitHub has intentionally not allowed forms within Markdown text and will strip them out if they are included.
For more general information about how to include a form in Markdown (outside of GitHub) see my previous answer below:
As the Markdown syntax rules state:
For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.
The only restrictions are that block-level HTML elements — e.g. <div>, <table>, <pre>, <p>, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces.
So just insert your raw HTML into the document. You probably should wrap the entire block in a <div> to make sure Markdown treats it properly as one block.
However, be aware that it is possible that GitHub may filter the content to not allow certain tags for security reasons, so you'll need to test it to find out if it will work.
Additionally, depending on how things are configured, the browser and/or the server you are posting to may not allow the form to post for security reasons.
For more on those issues see these questions and related answers.
With Paypal.me , there is no more a security concern :
markdown
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/AbdennourT/10)
markup
<p>
<a href="https://www.paypal.me/AbdennourT/10">
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="paypal">
</a>
</p>
You have to create an enterprise account or you can update your own, it´s free.
Then you have to create the button in the button center and generate a donate button, this tool generates the html and you can get the hoted_button_id then you have to replace it and paste it in the README.md
[![](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YOUR_OWN)
If you want to just use your email and a donate button you can do it by just filling in the blanks from their "donate email" example:
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif)](https://www.paypal.com/donate/?business=paypal#poleguy.com&no_recurring=0&item_name=Payment+for+Stackoverflow+Example&item_number=Suggested+Price:+$7.99+USD¤cy_code=USD)
It renders like this:
Paypal warns that it's "not secure" and you should always use a "hosted email payment link to prevent malicious users from tampering with the code." So maybe okay on github, but not on a wiki or stackoverflow where the link could be edited to pay someone else.
I have three simple html or php file that I'm going to create.
What will be include in there is that a content such as video's name or let say a person name
in total it will be almost 2000 of them
but I will split it to three different pages or maybe I will make it one page with different categories.
now my question is that how will I make a search form that can be search from a different page while they are still on the page index
this is what I'm currently using <div class="searchbox"><form action="index.php" method="post"> <input type="text" name="q" value="">
this search form is a live time search result
but I will it to be able to search from other page as well or from a different categories
but where should I put the tag or anything to the content in order to get the search show the result.
I guess something like that could be done with javascript but it isn't really my forte. But one issue with this is the other pages don't really exist on the users browser until they have browsed them so you might have to download a bunch of pages in the background. Doesn't sound like a great solution to me.
I'd recommend doing searches on the server side where you have the data, rather than trying to parse rendered html on the users machine. And then send the results to the user.
Do we need to have all pages inside divs in one html page?
In case of my website I would need to create a huge file to accomplish that.
Short answer is that no, you do not. In your link tags, instead of typing:
<a id="#linkTo">Link!</a>
You would type
Link!
Your content would have to be an html snippet instead of a fully baked web page. You can look at the demos to see how this is done.