diff --git a/_posts/2020-02-28-sample-markdown.md b/_posts/2020-02-28-sample-markdown.md index 4ac869f47ead..8456c31a0ff4 100644 --- a/_posts/2020-02-28-sample-markdown.md +++ b/_posts/2020-02-28-sample-markdown.md @@ -1,20 +1,23 @@ --- layout: post -title: Sample blog post -subtitle: Each post also has a subtitle +title: Sample blog post to learn markdown tips +subtitle: There's lots to learn! gh-repo: daattali/beautiful-jekyll gh-badge: [star, fork, follow] tags: [test] comments: true --- -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](https://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc. +{: .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](https://markdowntutorial.com/) - 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](https://raw.githubusercontent.com/daattali/beautiful-jekyll/master/_posts/2020-02-28-sample-markdown.md) to learn some more advanced tips about using markdown in Beautiful Jekyll. **Here is some bold text** ## Here is a secondary heading -Here's a useless table: +[This is a link to a different site](https://deanattali.com/) and [this is a link to a section inside this page](#local-urls). + +Here's a table: | Number | Next number | Previous number | | :------ |:--- | :--- | @@ -23,14 +26,13 @@ Here's a useless table: | Seven | Eight | Six | | Two | Three | One | - How about a yummy crepe? -![Crepe](https://s3-media3.fl.yelpcdn.com/bphoto/cQ1Yoa75m2yUFFbY2xwuqw/348s.jpg) +![Crepe](https://beautifuljekyll.com/assets/img/crepe.jpg) It can also be centered! -![Crepe](https://s3-media3.fl.yelpcdn.com/bphoto/cQ1Yoa75m2yUFFbY2xwuqw/348s.jpg){: .mx-auto.d-block :} +![Crepe](https://beautifuljekyll.com/assets/img/crepe.jpg){: .mx-auto.d-block :} Here's a code chunk: @@ -76,3 +78,13 @@ You can add notification, warning and error boxes like this: {: .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](https://beautifuljekyll.com/faq/#links-in-project-page). To demonstrate the issue, the following local image will be broken **if your site is a project site:** + +![Crepe](/assets/img/crepe.jpg) + +If the above image is broken, then you'll need to follow the instructions [in the FAQ](https://beautifuljekyll.com/faq/#links-in-project-page). Here is proof that it can be fixed: + +![Crepe]({{ '/assets/img/crepe.jpg' | relative_url }})