Skip to content
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

allow custom index title #342

Merged
merged 6 commits into from
Sep 28, 2022
Merged

allow custom index title #342

merged 6 commits into from
Sep 28, 2022

Conversation

zkamvar
Copy link
Contributor

@zkamvar zkamvar commented Sep 26, 2022

This update allows authors to specify a custom title yaml item in index.md to override the default
"Summary and Setup" in the case where a setup is not needed for the lesson.

This will fix #340 and address #339

@zkamvar
Copy link
Contributor Author

zkamvar commented Sep 26, 2022

@SaraMorsy, could you test this PR out and see if it works for your lesson? To your config.yaml, add the following line:

sandpaper: carpentries/sandpaper@allow-custom-title-340

You should be able to add this to your index.md yaml and get your custom title:

title: "FAIR data in Life Sciences"

@SaraMorsy
Copy link

It worked nicely and better than doing it manually. Thank you!

@zkamvar zkamvar merged commit c329b30 into main Sep 28, 2022
@zkamvar zkamvar deleted the allow-custom-title-340 branch September 28, 2022 13:18
@zkamvar
Copy link
Contributor Author

zkamvar commented Sep 28, 2022

That's good to hear! You should be able to now remove the sandpaper: carpentries/sandpaper@allow-custom-title-340 line from your config moving forward. Thank you for following up :)

ns-rse added a commit to Romain-Thomas-Shef/FAIR24RS_Software_lifecycle_planning that referenced this pull request Sep 18, 2024
I actually went and read the commit that introduced the use of custom titles in `index.md` as I should have done in the
first instance and a tweak needs to be made to `config.yaml` (see
[342](carpentries/sandpaper#342 (comment))) which is included in this commit.

However, testing I found that we couldn't have just a YAML header in `index.md` this caused the error...

```
 ── Creating homepage ───────────────────────────────────────────────────────────
  Error in UseMethod("xml_find_first") :
    no applicable method for 'xml_find_first' applied to an object of class "xml_document"
```

I've therefore moved the opening paragraph from `learners/setup.md` > `index.md` and it seems to work.

Took the opportunity to improve a few other minor things (there was a complaint about the use of an uninformative `here`
as the text for a hyperlink).

This time I've checked _before_ making a pull request and the pages render as we would like.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for custom index page title
2 participants