-
Notifications
You must be signed in to change notification settings - Fork 1
Using Contentful RichText To Write Hub Pages
This page details how to use Markdown to write post content. To learn how to get the posts on the website, see Creating Blog Posts.
Blog posts utilize Markdown to easily format text. Basic markdown styling can be accessed through Github's toolbar when editing files. For more features, Daring Fireball does a great job of explaining how to use markdown in depth.
Github's Preview function allows you to see how the post will appear. You will have to temporarily delete the first ---
, second ---
, and everything between to eliminate the table from the preview.
-
Upload the desired image to
assets/images/blog
-
Follow the above link and drag your image in
-
Add a short commit message such as
Add blog post photo
-
Select the option to
Create a new branch for this commit and start a pull request
-
Title the branch something like
Add blog post photo
-
Select
Propose Changes
-
At the top of the post within the
---
's, changeimage: annual_report.png
to reflect the file name of your image
Displaying a side photo is preferable to inline images. Inline images should be used to add additional photos to posts.
- Upload the desired image to
assets/images/blog
- Copy and paste
<img src="{{site.baseurl}}/assets/images/blog/annual_report.png">
to where you'd like the image to appear - Replace
annual_report.png
with the name of the desired image you placed inassets/images/blog
- Note - the image width will match that of the text
- When previewing your post, the image will not load correctly. To preview the size and position of what your photo, you can use
<img src="http://i.telegraph.co.uk/multimedia/archive/03541/Barack-Obama-gets-_3541878k.jpg">
with the url of any image that's hosted online
Specifically, blog posts utilize kramdown. Alternatively, posts could be written in HTML as shown with <img>
. This is not recommended to avoid clashes with the website styling.