sindresorhus/refined-github

Markdown Preview: transpose Frontmatter Table #3325

muescha posted onGitHub

Summary

The Markdown preview renders the yaml frontmatter in a table, but the options as header and below the values. but when there are many frontmatter values it not looks very nice. in the screenshot the exceprt is not visible.

suggested Improvement

it would be better when for each value there is a row.

https://github.com/gatsbyjs/gatsby/blob/2a00a474d15b320f24802210e8abde52bc44f50c/docs/blog/2020-07-07-wordpress-source-beta/index.mdx

Screenshot

Current State

<img width="1256" alt="Bildschirmfoto 2020-07-08 um 13 59 17" src="https://user-images.githubusercontent.com/184316/86918299-c5393480-c126-11ea-9abc-0fbf3310f49e.png">

With the feature

<img width="704" alt="Bildschirmfoto 2020-07-08 um 14 20 38" src="https://user-images.githubusercontent.com/184316/86918308-c9655200-c126-11ea-8e10-31013667dd76.png">


Is there a reason they don't format it like that originally? Then everyone would get the benefit.

posted by busches over 4 years ago

@busches I have the same question. I remember seeing this weird layout years ago.

posted by kidonng over 4 years ago

I think the idea was that the front matter doesn’t have that many fields; with 4 fields it’s probably fine to show it horizontally.

I agree that the transposed table looks much better with many fields though.

Can you find other languages with front matter? I think Jekyll also supports it.

posted by fregante over 4 years ago

4 columns

i think even if there is one long text in one parameter it looks bad as columns, so i personally would prefer always transposing the table (so i don't have to think: why on one it looks different than on the other file? maybe then they show different infos?)

<img width="831" alt="Bildschirmfoto 2020-07-08 um 17 25 27" src="https://user-images.githubusercontent.com/184316/86937945-23264600-c140-11ea-8bb4-9617d5468257.png">

Layout:

maybe add some "fancy" stuff like other border color and/or a header "Metadata" to see that this is a "generated" table and not a table from the markdown content of the file.

posted by muescha over 4 years ago

with 4 fields it’s probably fine to show it horizontally

is there a way to make this 4 as an option in Refined GitHub in the settings? so i can theak this for myself to 0 ;)

posted by muescha over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests