blogdown `title` won't display on rendered `_index.html`
I created an _index.Rmd
file in my blogdown /*/content/
directory and the body of the _index.Rmd
file looks like this:
---
title: "Home"
date: "2016-05-05T21:48:51-07:00"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Welcome to the home page of this blogdown site.
I would expect to see a "Home" title heading but nothing appears. I presume this is an intentional design choice. I can understand why, but in my case I want the title that I specify in the YAML to showup on the rendered _index.html
file. How do I achieve this goal?
r r-markdown blogdown
|
show 3 more comments
I created an _index.Rmd
file in my blogdown /*/content/
directory and the body of the _index.Rmd
file looks like this:
---
title: "Home"
date: "2016-05-05T21:48:51-07:00"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Welcome to the home page of this blogdown site.
I would expect to see a "Home" title heading but nothing appears. I presume this is an intentional design choice. I can understand why, but in my case I want the title that I specify in the YAML to showup on the rendered _index.html
file. How do I achieve this goal?
r r-markdown blogdown
According to author's R series book you would adjust title in theconfig.toml
file.
– Parfait
Jan 2 at 20:28
The TOML in myconfig.toml
does specifytitle = "Home"
, but that only changes the title on Chrome tab (or Firefox tab). It does not insert the "Home" title on my_index.html
file.
– Jason Hunter
Jan 2 at 20:38
I believe it is advised not to touch the rendered.html
files. Possibly someGO
language process runs to render titles, footers, sidebars, etc. per theme. If you get your rendered output, why do you need to see it in.html
file?
– Parfait
Jan 2 at 20:43
1
Hmmm...soAbout
shows up (not on tab but on top of web page) but notHome
And both have same R markdown? I will circle back testing on my blogdown setup. Possibly a special mapping takes place with index pages.
– Parfait
Jan 2 at 21:36
1
In this case, embed raw html code for the title, then you can specify the font-size & stuff. for example,<h2 id="title" style=" font-size: 2em; ">Put Your super fancy home title here</h2>
– TC Zhang
Jan 3 at 2:23
|
show 3 more comments
I created an _index.Rmd
file in my blogdown /*/content/
directory and the body of the _index.Rmd
file looks like this:
---
title: "Home"
date: "2016-05-05T21:48:51-07:00"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Welcome to the home page of this blogdown site.
I would expect to see a "Home" title heading but nothing appears. I presume this is an intentional design choice. I can understand why, but in my case I want the title that I specify in the YAML to showup on the rendered _index.html
file. How do I achieve this goal?
r r-markdown blogdown
I created an _index.Rmd
file in my blogdown /*/content/
directory and the body of the _index.Rmd
file looks like this:
---
title: "Home"
date: "2016-05-05T21:48:51-07:00"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Welcome to the home page of this blogdown site.
I would expect to see a "Home" title heading but nothing appears. I presume this is an intentional design choice. I can understand why, but in my case I want the title that I specify in the YAML to showup on the rendered _index.html
file. How do I achieve this goal?
r r-markdown blogdown
r r-markdown blogdown
asked Jan 2 at 14:30


Jason HunterJason Hunter
38219
38219
According to author's R series book you would adjust title in theconfig.toml
file.
– Parfait
Jan 2 at 20:28
The TOML in myconfig.toml
does specifytitle = "Home"
, but that only changes the title on Chrome tab (or Firefox tab). It does not insert the "Home" title on my_index.html
file.
– Jason Hunter
Jan 2 at 20:38
I believe it is advised not to touch the rendered.html
files. Possibly someGO
language process runs to render titles, footers, sidebars, etc. per theme. If you get your rendered output, why do you need to see it in.html
file?
– Parfait
Jan 2 at 20:43
1
Hmmm...soAbout
shows up (not on tab but on top of web page) but notHome
And both have same R markdown? I will circle back testing on my blogdown setup. Possibly a special mapping takes place with index pages.
– Parfait
Jan 2 at 21:36
1
In this case, embed raw html code for the title, then you can specify the font-size & stuff. for example,<h2 id="title" style=" font-size: 2em; ">Put Your super fancy home title here</h2>
– TC Zhang
Jan 3 at 2:23
|
show 3 more comments
According to author's R series book you would adjust title in theconfig.toml
file.
– Parfait
Jan 2 at 20:28
The TOML in myconfig.toml
does specifytitle = "Home"
, but that only changes the title on Chrome tab (or Firefox tab). It does not insert the "Home" title on my_index.html
file.
– Jason Hunter
Jan 2 at 20:38
I believe it is advised not to touch the rendered.html
files. Possibly someGO
language process runs to render titles, footers, sidebars, etc. per theme. If you get your rendered output, why do you need to see it in.html
file?
– Parfait
Jan 2 at 20:43
1
Hmmm...soAbout
shows up (not on tab but on top of web page) but notHome
And both have same R markdown? I will circle back testing on my blogdown setup. Possibly a special mapping takes place with index pages.
– Parfait
Jan 2 at 21:36
1
In this case, embed raw html code for the title, then you can specify the font-size & stuff. for example,<h2 id="title" style=" font-size: 2em; ">Put Your super fancy home title here</h2>
– TC Zhang
Jan 3 at 2:23
According to author's R series book you would adjust title in the
config.toml
file.– Parfait
Jan 2 at 20:28
According to author's R series book you would adjust title in the
config.toml
file.– Parfait
Jan 2 at 20:28
The TOML in my
config.toml
does specify title = "Home"
, but that only changes the title on Chrome tab (or Firefox tab). It does not insert the "Home" title on my _index.html
file.– Jason Hunter
Jan 2 at 20:38
The TOML in my
config.toml
does specify title = "Home"
, but that only changes the title on Chrome tab (or Firefox tab). It does not insert the "Home" title on my _index.html
file.– Jason Hunter
Jan 2 at 20:38
I believe it is advised not to touch the rendered
.html
files. Possibly some GO
language process runs to render titles, footers, sidebars, etc. per theme. If you get your rendered output, why do you need to see it in .html
file?– Parfait
Jan 2 at 20:43
I believe it is advised not to touch the rendered
.html
files. Possibly some GO
language process runs to render titles, footers, sidebars, etc. per theme. If you get your rendered output, why do you need to see it in .html
file?– Parfait
Jan 2 at 20:43
1
1
Hmmm...so
About
shows up (not on tab but on top of web page) but not Home
And both have same R markdown? I will circle back testing on my blogdown setup. Possibly a special mapping takes place with index pages.– Parfait
Jan 2 at 21:36
Hmmm...so
About
shows up (not on tab but on top of web page) but not Home
And both have same R markdown? I will circle back testing on my blogdown setup. Possibly a special mapping takes place with index pages.– Parfait
Jan 2 at 21:36
1
1
In this case, embed raw html code for the title, then you can specify the font-size & stuff. for example,
<h2 id="title" style=" font-size: 2em; ">Put Your super fancy home title here</h2>
– TC Zhang
Jan 3 at 2:23
In this case, embed raw html code for the title, then you can specify the font-size & stuff. for example,
<h2 id="title" style=" font-size: 2em; ">Put Your super fancy home title here</h2>
– TC Zhang
Jan 3 at 2:23
|
show 3 more comments
1 Answer
1
active
oldest
votes
This is because the index (main) page has special treatment with this theme. How you can change this is go to themes/(yourtheme)/layouts/index.html
. It would look something like:
{{ partial "header.html" . }}
<main class="content">
<div class="list">
{{ range (.Paginate ((where .Data.Pages "Type" "post").GroupByDate "2006")).PageGroups }}
<h2 class="list-title">{{ .Key }}</h2>
{{ range .Pages }}
{{ partial "list-item.html" . }}
{{ end }}
{{ end }}
</div>
{{ partial "pagination.html" . }}
</main>
{{ partial "footer.html" . }}
Now you can edit this file to add the desired title in many ways, for example if you want the same style as a post title would have you could add between the <main class="content">
and <div class="list>
:
<h1 class="article-title">Home</h1>
If you want to source the title from the .Rmd
file, you would do:
<h1 class="article-title">{{ .Title }}</h1>
Now after rebuilding the site the title will appear on the homepage.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008129%2fblogdown-title-wont-display-on-rendered-index-html%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is because the index (main) page has special treatment with this theme. How you can change this is go to themes/(yourtheme)/layouts/index.html
. It would look something like:
{{ partial "header.html" . }}
<main class="content">
<div class="list">
{{ range (.Paginate ((where .Data.Pages "Type" "post").GroupByDate "2006")).PageGroups }}
<h2 class="list-title">{{ .Key }}</h2>
{{ range .Pages }}
{{ partial "list-item.html" . }}
{{ end }}
{{ end }}
</div>
{{ partial "pagination.html" . }}
</main>
{{ partial "footer.html" . }}
Now you can edit this file to add the desired title in many ways, for example if you want the same style as a post title would have you could add between the <main class="content">
and <div class="list>
:
<h1 class="article-title">Home</h1>
If you want to source the title from the .Rmd
file, you would do:
<h1 class="article-title">{{ .Title }}</h1>
Now after rebuilding the site the title will appear on the homepage.
add a comment |
This is because the index (main) page has special treatment with this theme. How you can change this is go to themes/(yourtheme)/layouts/index.html
. It would look something like:
{{ partial "header.html" . }}
<main class="content">
<div class="list">
{{ range (.Paginate ((where .Data.Pages "Type" "post").GroupByDate "2006")).PageGroups }}
<h2 class="list-title">{{ .Key }}</h2>
{{ range .Pages }}
{{ partial "list-item.html" . }}
{{ end }}
{{ end }}
</div>
{{ partial "pagination.html" . }}
</main>
{{ partial "footer.html" . }}
Now you can edit this file to add the desired title in many ways, for example if you want the same style as a post title would have you could add between the <main class="content">
and <div class="list>
:
<h1 class="article-title">Home</h1>
If you want to source the title from the .Rmd
file, you would do:
<h1 class="article-title">{{ .Title }}</h1>
Now after rebuilding the site the title will appear on the homepage.
add a comment |
This is because the index (main) page has special treatment with this theme. How you can change this is go to themes/(yourtheme)/layouts/index.html
. It would look something like:
{{ partial "header.html" . }}
<main class="content">
<div class="list">
{{ range (.Paginate ((where .Data.Pages "Type" "post").GroupByDate "2006")).PageGroups }}
<h2 class="list-title">{{ .Key }}</h2>
{{ range .Pages }}
{{ partial "list-item.html" . }}
{{ end }}
{{ end }}
</div>
{{ partial "pagination.html" . }}
</main>
{{ partial "footer.html" . }}
Now you can edit this file to add the desired title in many ways, for example if you want the same style as a post title would have you could add between the <main class="content">
and <div class="list>
:
<h1 class="article-title">Home</h1>
If you want to source the title from the .Rmd
file, you would do:
<h1 class="article-title">{{ .Title }}</h1>
Now after rebuilding the site the title will appear on the homepage.
This is because the index (main) page has special treatment with this theme. How you can change this is go to themes/(yourtheme)/layouts/index.html
. It would look something like:
{{ partial "header.html" . }}
<main class="content">
<div class="list">
{{ range (.Paginate ((where .Data.Pages "Type" "post").GroupByDate "2006")).PageGroups }}
<h2 class="list-title">{{ .Key }}</h2>
{{ range .Pages }}
{{ partial "list-item.html" . }}
{{ end }}
{{ end }}
</div>
{{ partial "pagination.html" . }}
</main>
{{ partial "footer.html" . }}
Now you can edit this file to add the desired title in many ways, for example if you want the same style as a post title would have you could add between the <main class="content">
and <div class="list>
:
<h1 class="article-title">Home</h1>
If you want to source the title from the .Rmd
file, you would do:
<h1 class="article-title">{{ .Title }}</h1>
Now after rebuilding the site the title will appear on the homepage.
edited Jan 3 at 12:29
answered Jan 3 at 10:41


JozefJozef
1,076510
1,076510
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008129%2fblogdown-title-wont-display-on-rendered-index-html%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
According to author's R series book you would adjust title in the
config.toml
file.– Parfait
Jan 2 at 20:28
The TOML in my
config.toml
does specifytitle = "Home"
, but that only changes the title on Chrome tab (or Firefox tab). It does not insert the "Home" title on my_index.html
file.– Jason Hunter
Jan 2 at 20:38
I believe it is advised not to touch the rendered
.html
files. Possibly someGO
language process runs to render titles, footers, sidebars, etc. per theme. If you get your rendered output, why do you need to see it in.html
file?– Parfait
Jan 2 at 20:43
1
Hmmm...so
About
shows up (not on tab but on top of web page) but notHome
And both have same R markdown? I will circle back testing on my blogdown setup. Possibly a special mapping takes place with index pages.– Parfait
Jan 2 at 21:36
1
In this case, embed raw html code for the title, then you can specify the font-size & stuff. for example,
<h2 id="title" style=" font-size: 2em; ">Put Your super fancy home title here</h2>
– TC Zhang
Jan 3 at 2:23