Tldr: Add more fields to the commands

Created on 21 Sep 2016  路  7Comments  路  Source: tldr-pages/tldr

e.g. URL (mentioned in #934), see also (tracked in #481), maybe platform (related to #190)?

We will need to decide details in dedicated issues, but overall discussion about a potential new page format (including markdown syntax, see #784 and #958) should happen in a coordinated way, hence this issue.

syntax

Most helpful comment

+1. Front-matter has worked really well for cheat. I think it would be the most painless approach to make the cheatsheet repositories portable, without imposing meaningful constraints on any of our individual projects.

Just shout if I can somehow be of service.

All 7 comments

Another field proposal: original manpage (#1248)

The first one (URL) is now properly tracked in #2649.

Isn't this all already implemented @waldyrious?

@zdroid how so? IIUC only URL and see also are supported at the moment. Even then, neither is implemented in a structured way.

Since we're already using markdown, one possibility to make these fields consistent and extensible would be to use the frontmatter metadata format, like this:

---
foo: bar
baz: qux
---

(rest of markdown content)

That would make our pages compatible with other markdown processing tools and in particular with other cheatsheet repositories, as described by @chrisallenlane in https://github.com/chubin/cheat.sheets/issues/101#issuecomment-632032627.

+1. Front-matter has worked really well for cheat. I think it would be the most painless approach to make the cheatsheet repositories portable, without imposing meaningful constraints on any of our individual projects.

Just shout if I can somehow be of service.

Ah, thanks for opening this issue @waldyrious!

Indeed, taking a more structured approach would be great.

Front-matter does sound like a good idea. It bothers me a bit that it's above the main title of the page though - but that's not a big deal.

I'm not sure that it's part of the CommonMark spec though, so it would require a breaking change update to the client specification.

We'd also have to perform an automated update to existing pages, and potentially rename the .zip archive too (which might be a good opportunity to deal with that other issue that was talking about restructuring the .zip file by splitting it into multiple languages, but I can't remember the issue number).

Good point. @chrisallenlane do you know if these metadata blocks can be added to the bottom of the markdown file rather than the beginning? It would be great if we could keep our format cat/less-friendly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phpmaple picture phpmaple  路  3Comments

Wesalius picture Wesalius  路  3Comments

GabLeRoux picture GabLeRoux  路  3Comments

zlatanvasovic picture zlatanvasovic  路  3Comments

schneiderl picture schneiderl  路  3Comments