-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace non-markdown markup #47
Comments
@stockholmux would this be OK with you for website rendering? |
I'm of two minds here. On one hand, we're going to need to remove the old Hugo cruft, so we need to make changes anyway. And the more we add foreign markup into these files the less portable they are. On the other hand, some things are hard to do in straight markdown. Markdown is inherently linear, so any time you need to create something that surrounds something else there isn't a great way ( All that being said, I am in favour of not going nuts with non-markdown markup, but light use can be super helpful. I don't expect that users will directly use this repo as docs, in fact, I hope they don't: it won't be a great experience. If we want to provide man pages, pdfs, or in-cli docs, I think we can use this repo as a source and build out tools that produce artifacts specifically suited to the use case that does provide that great experience whatever the destination. |
Markdown is limited for a good reasons i believe: Simplicity. There are lots of things you can't do. If we'd want more kinds of syntax, there's asciidoc and lots of languages, but we have markdown now. Until Salvatore left, it was plain markdown without these non-markdown elements. They were added in the last years and IMAO they're completely unnecessary. The more complex elements you have in a format, the harder it is to convert it and render it to other formats. The The occurrences of Well, you know I want to delete them. :) We can discuss in the core team if necessary.
I think this is adding way too much complexity. I want to remove complexity. Slightly different topic: I'm open to using metadata sections at the top of markdown files. It's unobstructive too, since it's part of markdown. |
I get the desire for simplicity and complexity reduction, but there is more than one vector here. Maintaining docs is hard and complex over time and moving everything to static markdown means that we have to manually maintain everything. I would much rather Valkey to take an approach doesn't ban everything that isn't markdown and balances easy of contribution with maintenance. Long term, simple things like includes and use-specific documentation artifact will make the project more sustainable. |
re: metadata at the top of files (aka frontmatter) It's not directly usable today the way everything is split up. Functionally, it just includes the file as-is. This was done more for speed in the initial build of the Jekyll website. I'm not sure anyone is particularly in love with Jekyll, so we may be able to use it later when/if we move to a different SSG. Although these are pretty closely tied to the SSG used there. |
This may be true for other things, I'm not talking about everything here. Just removing these alert boxes isn't something well have to maintain in any way.
We can delete the current frontmatter and replace it with other fields. If we can't use it from Jekyll, then we can preprocess the files with some other script that e.g. inserts actual markdown text in the files instead of the metadata. If we store some data in frontmatter to make it easier for users to edit it, instead of editing separate JSON files (which often ends up in syntax errors), then this is already a gain IMO. |
Done. |
There is various marks like
{{< highlight bash >}}
and{{< clients-example hash_tutorial set_get_all >}}
in the doc markdown files. They require some special rendering code on the website side.We would like to be able to use the documentation markdown files for other things, like
Thus, the idea is to replace this special markers with simple (github style) markdown.
{{< highlight bash >}}
can be replaced by regular github style markdown with syntax highlighting:```bash
{{< clients-example hash_tutorial set_get_all >}}
, interactive example with commands invalkey-cli
==>```valkey-cli
-- this syntax highlighting will obviously not work out of the box, but we can handle it in the website rendering. For any other uses, it will just look like a code block.{{% alert title="Note" color="info" %}}
==>**Note:**
{{% alert title="Note" color="warning" %}}
==>**Note:**
The text was updated successfully, but these errors were encountered: