question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: YAML Title does not pull from filename

See original GitHub issue

Describe the Bug

If there are any headers in the file, “YAML Title” will pull the first header for the title instead of using the filename (or even an h1 later in the file) for the YAML title field.

How to Reproduce

Steps to reproduce the behavior:

  1. Create a file with a header besides an h1
  2. Lint
  3. The YAML will contain title: headername

Expected Behavior

The YAML should contain title: filename

Device

  • Desktop
  • Mobile

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
pjkaufmancommented, Nov 28, 2022

Interesting. I will see if I can reproduce this when I get a chance later this week.

For future reference, it would help if the initial creation of these bugs and feature requests included the example to help avoid misunderstandings on my or other dev’s parts as the example makes it clear that you mean a non-H1 header while the words describing this scenario are a little more ambiguous.

0reactions
pjkaufmancommented, Nov 29, 2022

This should be fixed on master and in the next release. Please let us know if that is not the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use H1 titles (#) in the sidebar, similar to YAML title. #1011
When using title in a YAML header, in the sidebar, the filename is replaced by the ... This is not to be considered...
Read more >
Have different .RMD file and output file names - Stack Overflow
I'm having troubles name my output PDF file from my "Knit with Parameters" RMD file. my YAML ...
Read more >
10 YAML tips for people who hate YAML | Enable Sysadmin
Do you hate YAML? These tips might ease your pain.
Read more >
Customize your pipeline - Azure Pipelines - Microsoft Learn
Open the YAML editor for your pipeline. · Add the following snippet to the end of your YAML file. YAML Copy · Select...
Read more >
file_put_contents - Manual - PHP
This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file. If filename does not exist, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found