-
Notifications
You must be signed in to change notification settings - Fork 39
Error handling
cgebken edited this page Dec 6, 2018
·
10 revisions
Let's start with a small reminder. This is how to run all tests:
$ rake test
If you need more background on this and the purpose of the tests, have a look at our Getting started.
In the best case, you will never get an error when running this test in order to check your blog post. But in case you do get errors, here are some ideas and guidelines how to fix them.
The errors below are all connected to the entries you need to make in the front matter.
Where | What | How to fix it |
---|---|---|
layout | ./ -> Post must have a layout | Add layout: post to your front matter. |
layout | ./ -> Post layout must be "post" | Add layout: post to your front matter. |
title | ./ -> Post must have a title | Add a title to your post by adding title: Your blog post title to your front matter, e.g. title: We love board games! . |
date | ./ -> Post must have a date | Add a date in the following format date: year-month-day to your front matter. |
date | ./ -> Post date is not valid | Change the format of your date to date: year-month-day , e.g. date: 2018-11-31 . |
header image | ./ -> Post must have a header_image | Add a header image to your post by adding header_image: <path> to your front matter. For more information, check Image handling. |
header image | ./ -> Post header_image doesn't exist | Make sure that your path to the image is correct and that your header image is stored in .assets.img.pages.headers.public or .assets.img.pages.headers.private respectively. |
header image position | ./ -> Post header_position must be "top", "center" or "bottom" | Adding a header image position is optional. But if you use it, make sure that you only enter top , center or bottom . All other positions are not supported. |
Category | ./ -> Post must have a category | Add category: your-chosen-category to your front matter, e.g.category: api-experience . |
category | ./ -> Post category is not valid | You need to enter a category key that is available in our DevBlog. You might want to check the list again. |
Tags | ./ -> Post tags must be an Array | Enter your tags as an array. That means that they need to be written in this format: ["tag1","tag2","tag3"] , e.g.["agile","api","company culture"] . |
Authors | ./ -> Post must have authors | Add authors:["Your name"] to your front matter. If there is more than one author, use the following format: authors:["Name 1", "Name 2"] , e.g. authors:["Unai", "Birgit"] . |
Authors | ./ -> Post authors must be an Array | Enter the author(s) as an array. That means they need to be written in this format: authors:["Your name"] . If there is more than one author: authors:["Name 1", "Name 2"] , e.g. authors:["Unai", "Birgit"] . |
About authors | ./ -> Post about_authors ids must exist on '_data/authors.yml' | Make sure that you used the correct author ID for the author and that the author is correctly added yo the authors.yml file. |
Where | What | How to fix it |
---|---|---|
Internal URLs | ./ -> Linking to an internal URL. Use relative path | For links to the DevPortal, use the relative link. The relative link starts after developer.epages.com . That means instead of https://developer.epages.com/blog/ , only use /blog/ . |
External URLs | ./ -> Linking to an external URL without using {:target="_blank"} | To ensure that external links are opened in a new tab, add {:target="_blank"} at the end of each absolute link. E.g.: [Git repository](https://github.com/ePages-de/epages-devblog){:target="_blank"} . |
Where | What | How to fix it |
---|---|---|
Line ending | ./ -> Found windows line ending (CRLF) | Only the Unix line ending format is supported. Change the settings in your text editor or adapt the line endings. |
Line ending | ./ -> Found old Macintosh line ending (LF) | Only the Unix line ending format is supported. Change the settings in your text editor or adapt the line endings. |
Trailing whitespace | ./ -> Found trailing whitespaces | You've ended at least one line with a space or tab. Delete this space or tab so that you end with another character such as a punctuation character, number or letter. |
Indentation | ./ -> Contains tabs in indentation | Do not indent your text with tabs. Instead, convert these tabs into spaces. 1 tab = 2 spaces. |
File name | ./ -> Filenames must only contain lower case letters, numbers, dashes, underscores or points | Adapt the name of your file so that it only contains lower case letters, numbers, dashes, underscores, or points. If you have already pushed a file to GitHub that contains a capital letter, execute git mv old name new name to delete the capital letter. E.g. git mv 2018-11-29-We-Love-Board-Games.md 2018-11-29-we-love-board-games.md
|