Skip to content

Conversation

@Noarkhh
Copy link
Contributor

@Noarkhh Noarkhh commented Oct 24, 2025

No description provided.

mix.exs Outdated
Comment on lines 138 to 139
{first_letter, rest} =
filename
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this previously, but you can use String.capitalize instead

Copy link
Contributor Author

@Noarkhh Noarkhh Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't, since this will change acronyms like RTSP to Rtsp, I tried

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs for String.capitalize say you should use :string.titlecase in that case :P

Comment on lines +121 to +129
demo_title =
demo_path
|> Path.join("README.md")
|> File.read!()
|> String.split("\n")
|> List.first()
|> String.trim_leading("#")
|> String.trim_leading()
|> String.to_atom()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we generate the title based on the directory where the demo lives?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, the directory names in our repo are not nice, changing them would probably break the links in a lot of places + they're all lowercase

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then I'd use a regex to get the markdown title, but this can be too

@Noarkhh Noarkhh requested a review from mat-hek October 30, 2025 10:52
Base automatically changed from plugins-docs to master October 30, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

3 participants