tutorialkit icon indicating copy to clipboard operation
tutorialkit copied to clipboard

When using code snippet from file, if no title is specified, place the file name

Open noam-honig opened this issue 1 year ago • 2 comments

Is your feature request related to a problem?

Almost everytime I use a file as a code snippet, I also write the same name of the file as the title for that code snippet

For example:

```file:/frontend/Page.tsx title="frontend/Page.tsx"
```

Describe the solution you'd like.

It'll be great if when no title was specified, the file name will be used as the title by default.

Describe alternatives you've considered.

Writing it manually

Additional context

Love your work

noam-honig avatar Oct 24 '24 16:10 noam-honig

[...] the file name will be used as the title by default

With this approach, how could users disable the title?

AriPerkkio avatar Oct 27 '24 09:10 AriPerkkio

@AriPerkkio I think that when you import a file - the common case, is that you'll want its name in the title. users who will not want a title can set the title to "".

Alternatively - you can add a new flag called autoTitle that'll automatically set the title.

noam-honig avatar Oct 27 '24 09:10 noam-honig