Skip to content

Latest commit

 

History

History
95 lines (66 loc) · 2.85 KB

2024-05-05-sample-markdown.md

File metadata and controls

95 lines (66 loc) · 2.85 KB
layout title subtitle gh-repo gh-badge tags comments mathjax author
post
Sample blog post to learn markdown tips
There's lots to learn!
daattali/beautiful-jekyll
star
fork
follow
test
true
true
Bill Smith

{: .box-success} This is a demo post to show you how to write blog posts with markdown. I strongly encourage you to take 5 minutes to learn how to write in markdown - it'll teach you how to transform regular text into bold/italics/tables/etc.
I also encourage you to look at the code that created this post to learn some more advanced tips about using markdown in Beautiful Jekyll.

Here is some bold text

Here is a secondary heading

This is a link to a different site and this is a link to a section inside this page.

Here's a table:

Number Next number Previous number
Five Six Four
Ten Eleven Nine
Seven Eight Six
Two Three One

You can use MathJax to write LaTeX expressions. For example: When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

How about a yummy crepe?

Crepe

It can also be centered!

Crepe{: .mx-auto.d-block :}

Here's a code chunk:

var foo = function(x) {
  return(x + 5);
}
foo(3)

And here is the same code with syntax highlighting:

var foo = function(x) {
  return(x + 5);
}
foo(3)

And here is the same code yet again but with line numbers:

{% highlight javascript linenos %} var foo = function(x) { return(x + 5); } foo(3) {% endhighlight %}

Boxes

You can add notification, warning and error boxes like this:

Notification

{: .box-note} Note: This is a notification box.

Warning

{: .box-warning} Warning: This is a warning box.

Error

{: .box-error} Error: This is an error box.

Local URLs in project sites {#local-urls}

When hosting a project site on GitHub Pages (for example, https://USERNAME.github.io/MyProject), URLs that begin with / and refer to local files may not work correctly due to how the root URL (/) is interpreted by GitHub Pages. You can read more about it in the FAQ. To demonstrate the issue, the following local image will be broken if your site is a project site:

Crepe

If the above image is broken, then you'll need to follow the instructions in the FAQ. Here is proof that it can be fixed:

![Crepe]({{ '/assets/img/crepe.jpg' | relative_url }})