-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve template docs #5694
Improve template docs #5694
Conversation
See #5630 for more details on the update. @jekyll/documentation @DirtyF
@@ -421,56 +421,15 @@ The default is `default`. They are as follows (with what they filter): | |||
|
|||
### Includes | |||
|
|||
If you have small page fragments that you wish to include in multiple places on | |||
your site, you can use the `include` tag. | |||
If you have small page fragments that you want to include in multiple places on your site, you can use the `include` tag: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- If you have small page fragments that you want to include in multiple places on your site, you can use the `include` tag:
+ If you have small page snippets that you want to include in multiple places on your site, save the snippet as an *include file* and insert them where required, by using the `include` tag:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Jekyll expects all include files to be placed in an `_includes` directory at the | ||
root of your source directory. This will embed the contents of | ||
`<source>/_includes/footer.html` into the calling file. | ||
Jekyll expects all include files to be placed in an `_includes` directory at the root of your source directory. In the above example, this will embed the contents of `_includes/footer.html` into the calling file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- all include files
+ all *include files*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated, though i'm not sure why we're bolding it. is the bold formatting just to set off the term "include files" so that users don't think we're using "include" as a verb? if so, makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so that users don't think we're using "include" as a verb?
yes, that's the intention.. and btw, its not bolding.. but italicizing. Bold is by double asterices.
@@ -558,19 +539,29 @@ You can also use this tag to create a link in Markdown as follows: | |||
{% endraw %} | |||
``` | |||
|
|||
### Post URL | |||
Including `{% raw %}{{site.baseurl}}{% endraw %}` is optional — it depends on whether you want the link to be absolute or root-relative. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement is wrong.
Inserting {{ site.baseurl }}
doesn't make the URL absolute, its made so by: {{ site.url }}/{{ site.baseurl }}
Jekyll 3.3 ships with a new set of filters to address this confusion. Simply use {{ "file" | relative_url }}
or {{ "file" | absolute_url }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
I made the requested updates. Mostly just small formatting improvements.
I made the requested updates on this file. Submitting for re-review. |
Jekyll expects all include files to be placed in an `_includes` directory at the | ||
root of your source directory. This will embed the contents of | ||
`<source>/_includes/footer.html` into the calling file. | ||
Jekyll expects all **include files** to be placed in an `_includes` directory at the root of your source directory. In the above example, this will embed the contents of `_includes/footer.html` into the calling file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **include files**
+ *include files*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
**includes** --> *includes*
Now that we have #5696, will this have to change at all? |
@parkr both PR are complementary, right now we got duplicate content concerning includes until this PR is merged. |
Is there any reason why this PR hasn't been merged yet? |
@tomjohnson1492 No, it's just that this needs a second approval before merging. |
@jekyllbot: merge +site |
See #5630 for more details on the update.
@jekyll/documentation