This provides guidance on how to contribute various content to hhvm.com.
To modify a blog post, edit the appropriate markdown file in ./_posts/.
Adding a new blog post is a four-step process.
Some posts have a
permalinkandcommentsin the blog post YAML header. You will not need these for new blog posts. These are an artifact of migrating the blog from Wordpress to gh-pages.
- Create your blog post in
./_posts/in markdown (file extension.mdor.markdown). See current posts in that folder or./doc-type-examples/2016-04-07-blog-post-example.mdfor an example of the YAML format. If the./_postsdirectory does not exist, create it.
- You can add a
<!--truncate-->tag in the middle of your post such that you show only the excerpt above that tag in the main/blogindex on your page.
- If you have not authored a blog post before, modify the
./_data/authors.ymlfile with theauthorid you used in your blog post, along with your full name and Facebook ID to get your profile picture. - Run the site locally to test your changes. It will be at
http://127.0.0.1/blog/your-new-blog-post-title.html - Push your changes to GitHub.
To modify docs, edit the appropriate markdown file in ./_docs/.
To add docs to the site....
- Add your markdown file to the
./_docs/folder. See./doc-type-examples/docs-hello-world.mdfor an example of the YAML header format. If the./_docs/directory does not exist, create it.
- You can use folders in the
./_docs/directory to organize your content if you want.
- Update
_data/nav_docs.ymlto add your new document to the navigation bar. Use thedocidyou put in your doc markdown in as theidin the_data/nav_docs.ymlfile. - Run the site locally to test your changes. It will be at
http://127.0.0.1/docs/your-new-doc-permalink.html - Push your changes to GitHub.
To modify the header bar, change ./_data/nav.yml.
To modify a top-level page, edit the appropriate markdown file in ./top-level/
If you want a top-level page (e.g., http://your-site.com/top-level.html) -- not in /blog/ or /docs/....
-
Create a markdown file in the root
./top-level/. See./doc-type-examples/top-level-example.mdfor more information. -
If you want a visible link to that file, update
_data/nav.ymlto add a link to your new top-level document in the header bar.This is not necessary if you just want to have a page that is linked to from another page, but not exposed as direct link to the user.
-
Run the site locally to test your changes. It will be at
http://127.0.0.1/your-top-level-page-permalink.html -
Push your changes to GitHub.
- CSS:
./css/main.cssor./_sass/*.scss. - Images:
./static/images/[docs | posts]/.... - Main Blog post HTML:
./_includes/post.html - Main Docs HTML:
./_includes/doc.html