Skip to content

Comments

Revamp the docs using minimalistic markdown#10545

Closed
mspncp wants to merge 16 commits intoopenssl:masterfrom
mspncp:revamp-the-docs
Closed

Revamp the docs using minimalistic markdown#10545
mspncp wants to merge 16 commits intoopenssl:masterfrom
mspncp:revamp-the-docs

Conversation

@mspncp
Copy link
Contributor

@mspncp mspncp commented Nov 30, 2019

The Landing Page

On GitHub the README file of a project serves as its landing page, it is displayed immediately below the directory listing. Currently, the OpenSSL README is a raw text file, which gives a rather dusty impression, compared to all these fancy landing pages you find nowadays on GitHub.

Current Landing Page

This is how our landing page looks currenty.

current landing page

New Landing Page

Wouldn't it be much nicer if it would look something like that?

new landing page

For a long time I've dreamed of such a fancy landing page, but it turned out not to be so easily done.

The Problem

My first attempt to replace the simple text README file by a fancy markdown file ended up in a file which was not very well readable anymore in a text editor. This was a serious disadvantage for developers downloading the source tarball and trying to get started.

One possibility to avoid this problem would have been to add a separate markdown version of the README file as .github/README.md, which would have been favoured by GitHub. But having two different README files is not really a good solution. After trying different options for several weeks, the solution to the problem came to my mind.

Minimalistic Markdown

The idea is to have a single README file which does not only look pretty when viewed in the browser, but is also well formatted and easy to read when you view the raw file in your favourite text editor. Wasn't that exactly the goal of the original markdown implementation of John Gruber und Aaron Swartz? So I tried to go back to the roots using minimalistic markdown.

With 'minimalistic' markdown, I don't mean a certain markdown dialect. It's just the fact that I try to add as little markup as possible, which could interfere with the reading flow int the text file.

For example,

Show Cases

The Landing Page

I changed the default branch of my repository clone mspncp/openssl to the revamp-the-docs branch, so you can view my changes there live in action. The following files have already been heavily revamped or are currently in progress. Please take a look at them and compare their online version with their raw file content.

The README file

The NEWS file

The CHANGES file

The INSTALL file

The SUPPORT file

Your feedback, please!

This work is currently an early draft. So instead of diving into the documents and looking for typos and whitespace errors, I'd rather appreciate if you could give me more high level feedback, for example:

  • Do you like the direction in which this is going? Shall I continue?
  • Do you have some general ideas how this could be improved even more?

Looking forward to your comments!

@mspncp mspncp added the triaged: feature The issue/pr requests/adds a feature label Nov 30, 2019
@mspncp mspncp self-assigned this Nov 30, 2019
@mspncp mspncp changed the title [DRAFT]: Revamp the docs using minimalistic markdown [PREVIEW]: Revamp the docs using minimalistic markdown Dec 1, 2019
@richsalz
Copy link
Contributor

richsalz commented Dec 1, 2019

this is way cool.

@levitte
Copy link
Member

levitte commented Dec 1, 2019

What about the CHANGES file? Ideally, it should be revamped the same way as the NEWS file.

@mspncp
Copy link
Contributor Author

mspncp commented Dec 1, 2019

What about the CHANGES file? Ideally, it should be revamped the same way as the NEWS file.

Sure, I intend to convert all those files to markdown. Since the conversion of the CHANGES file will be very similar to the one of the NEWS file, I did not bother to do it for the preview yet. Most of the other file conversions will be straightforward, too.

The only file which currently gives me headaches is the INSTALL file, because of its table structure for the options. I don't see how I could mimick this in markdown without raw HTML. So I'll have to think of a different way to format the text which looks equallly well in both views.

@mspncp
Copy link
Contributor Author

mspncp commented Dec 1, 2019

Apropos NEWS & CHANGES: did you see that I added the entire history back, taking the missing peaces from the stable branches? So in the future the files on 1.1.1 LTS will just be a shortened copy of the ones on master (if we backport the reformatting, which we probably should).

We could utilize this fact to simplify cherry-picking from master to 1.1.1 in the future: those files will always conflict, but we can just run a script which accepts the incoming version from master and drops all entries newer than 1.1.1.

@levitte
Copy link
Member

levitte commented Dec 1, 2019

... because of its table structure for the options.

I actually view that as a definition list, which exists as an extended syntax... one might argue about the readabilty of colon-prefixed lines, though...

@mspncp
Copy link
Contributor Author

mspncp commented Dec 1, 2019

_(quoted from #10546 (comment))

We disagree on the NOTES files. I think they should have the same visibility as README and INSTALL. You think of it in terms of web pages, I think of it in terms of a top directory listing.

If you see it like that, it's ok for me. Maybe a good compromise would be to have a single NOTES file with a Table of Contents?

@levitte
Copy link
Member

levitte commented Dec 1, 2019

Maybe a good compromise would be to have a single NOTES file with a Table of Contents?

So the user will have to scroll past lots of text to get to their specific pet peeve?

@mspncp
Copy link
Contributor Author

mspncp commented Dec 1, 2019

... because of its table structure for the options.

I actually view that as a definition list, which exists as an extended syntax... one might argue about the readabilty of colon-prefixed lines, though...

Thanks for the link to markdownguide.org, which was new to me. I'll take a look at it. I am familiar with simple tables, but tables containing paragraphs and other items like fenced code blocks are a completely different matter. They will always look ugly in raw text.

@mspncp
Copy link
Contributor Author

mspncp commented Dec 3, 2019

Note: I reverted the NOTES.* changes and started reformatting the CHANGES file (raw text).

CHANGES.md Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Use backquotes around __owur. This starts a looooooooooooooooooooong bold chunk of text

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm... there is only a single __owur in the text and that looks perfectly normal. Are you using a different markdown viewer?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: the CHANGES file contains a lot more text than the NEWS file, so I did not manage yet to go through the entire text and spot all formatting issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@levitte are you still seeing this bold chunk of text in the current version of the CHANGES file?

@mspncp
Copy link
Contributor Author

mspncp commented Dec 5, 2019

Started working on the INSTALL file:

@mspncp mspncp force-pushed the revamp-the-docs branch 2 times, most recently from 7fcd715 to 6924714 Compare December 5, 2019 19:59
@mspncp
Copy link
Contributor Author

mspncp commented Dec 5, 2019

Just autosquashed some commits without changing anything.

@mspncp
Copy link
Contributor Author

mspncp commented Dec 31, 2019

The INSTALL file

The latest update contains some initial work on the INSTALL file. In particular the Configuration Options section gave me a hard time, because the original two column layout of the text file is not reproducible in markdown. I tried to find a reasonable compromise which looks acceptable in both versions.

As usual, you need to look at both versions:

@mspncp
Copy link
Contributor Author

mspncp commented Dec 31, 2019

Note: rebasing this pull request to fix conflicts is practically infeasible because of all the whitespace changes. Since the changes on master are negligible compared to those on my branch, I will incorporate the changes from master manually in the end.

@mspncp
Copy link
Contributor Author

mspncp commented Dec 31, 2019

Note: rebasing this pull request to fix conflicts is practically infeasible because of all the whitespace changes. Since the changes on master are negligible compared to those on my branch, I will incorporate the changes from master manually in the end.

After having sufficient sleep, rebasing was not that infeasible anymore. The trick is to manually compare stage 1 (BASE) of the conflicting file with stage 2 (OURS: master) and then integrate those changes manually into stage 3 (THEIRS: revamp-the-docs). Here is what I did for CHANGES.md:

git diff :1:CHANGES.md :2:CHANGES.md > CHANGES.diff
git reset --theirs CHANGES.md
<integrate CHANGES.diff manually into CHANGES.md>
git add CHANGES.md
git rebase --continue

See 7.8 Git Tools - Advanced Merging

@mspncp
Copy link
Contributor Author

mspncp commented Jan 1, 2020

I actually view that as a definition list, which exists as an extended syntax... one might argue about the readabilty of colon-prefixed lines, though...

Unfortunately GitHub Flavoured Markdown does not support definition lists.

@mattcaswell
Copy link
Member

As usual, you need to look at both versions:

I think this is looking really nice. It seems to work in both formats.

@mspncp
Copy link
Contributor Author

mspncp commented Jan 2, 2020

As usual, you need to look at both versions:

I think this is looking really nice. It seems to work in both formats.

Thank you very much, Matt. I think that, except for the SUPPORT file, all files have already matured so far that an initial review would be possible. There are some more files which I didn't start on yet, but maybe it's better to keep them for a followup pr.

That's why I'll change the prefix from [PREVIEW] to [WIP].

@mspncp mspncp changed the title [PREVIEW]: Revamp the docs using minimalistic markdown [WIP]: Revamp the docs using minimalistic markdown Jan 2, 2020
@t8m t8m removed the approval: review pending This pull request needs review by a committer label Feb 25, 2020
@t8m
Copy link
Member

t8m commented Feb 25, 2020

Still approved. @openssl/committers please speak up if you have any objections.

@mspncp mspncp added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Feb 26, 2020
openssl-machine pushed a commit that referenced this pull request Feb 26, 2020
In the first step, we just add the .md extension and move some
files around, without changing any content. These changes will
occur in the following commits.

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #10545)
openssl-machine pushed a commit that referenced this pull request Feb 26, 2020
The goal is to transform the standard documents

    README, INSTALL, SUPPORT, CONTRIBUTING, ...

from a pure text format into markdown format, but in such a way
that the documentation remains nicely formatted an easy readable
when viewed with an normal text editor.

To achieve this goal, we use a special form of 'minimalistic' markdown
which interferes as little as possible with the reading flow.

 * avoid [ATX headings][] and use [setext headings][] instead
   (works for `<h1>` and `<h2>` headings only).
 * avoid [inline links][] and use [reference links][] instead.
 * avoid [fenced code blocks][], use [indented-code-blocks][] instead.

The transformation will take place in several steps. This commit
introduces mostly changes the formatting and does not chang the
content significantly.

[ATX headings]:         https://github.github.com/gfm/#atx-headings
[setext headings]:      https://github.github.com/gfm/#setext-headings
[inline links]:         https://github.github.com/gfm/#inline-link
[reference links]:      https://github.github.com/gfm/#reference-link
[fenced code blocks]:   https://github.github.com/gfm/#fenced-code-blocks
[indented code blocks]: https://github.github.com/gfm/#indented-code-blocks

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #10545)
openssl-machine pushed a commit that referenced this pull request Feb 26, 2020
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #10545)
openssl-machine pushed a commit that referenced this pull request Feb 26, 2020
 * Add an OpenSSL logo and CI badges
 * Add a table of contents
 * Add a lot of links

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #10545)
openssl-machine pushed a commit that referenced this pull request Feb 26, 2020
Up to now, NEWS entries for older releases where only added to the
corresponding stable branches, so they were missing in the master
branch. This commit adds the missing entries, taking them from the
respective stable branches.

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #10545)
openssl-machine pushed a commit that referenced this pull request Feb 26, 2020
Up to now, CHANGES entries for older releases where only added to the
corresponding stable branches, so they were missing in the master
branch. This commit adds the missing entries, taking them from the
respective stable branches.

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #10545)
openssl-machine pushed a commit that referenced this pull request Feb 26, 2020
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #10545)
openssl-machine pushed a commit that referenced this pull request Feb 26, 2020
Too be continued...

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #10545)
openssl-machine pushed a commit that referenced this pull request Feb 26, 2020
@mspncp
Copy link
Contributor Author

mspncp commented Feb 26, 2020

Done. Thanks for the feedback!

c50604e doc: add a fancy CHANGES entry to celebrate the new Markdown format
be0c6a3 doc: revamp the SUPPORT file
6ede7d7 doc: revamp the INSTALL file
44652c1 doc: add missing CHANGES entries for all versions >= 1.0.0
4477bea doc: add missing NEWS entries for all versions >= 1.0.0
dac5138 doc: revamp the README file
569b74a doc: add OpenSSL logo
5f8e6c5 doc: introduce some minimalistic markdown without essential changes
2e07506 doc: convert standard project docs to markdown

@mspncp mspncp closed this Feb 26, 2020
Comment on lines 216 to 224
<!-- Logos and Badges -->
<!--
Note: The security token for the appveyor badge (the random number in
the URL below) was obtained for the mspncp/openssl project.
It needs to be replaced by the correct token by some core member
(@levitte, @mattcaswell?). It can be obtained for project members at
https://ci.appveyor.com/project/openssl/openssl/settings/badges.
-->

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You just need to mail me the token, I can open the pull request.

@mspncp mspncp mentioned this pull request May 5, 2020
2 tasks
mspncp added a commit to mspncp/openssl that referenced this pull request Aug 9, 2020
The AppVeyor badge was still showing the build state for
the mspncp/openssl fork.

This commit fixes a forgotten todo from openssl#10545.
openssl-machine pushed a commit that referenced this pull request Aug 11, 2020
The AppVeyor badge was still showing the build state for
the mspncp/openssl fork.

This commit fixes a forgotten todo from #10545.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from #12361)
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
The AppVeyor badge was still showing the build state for
the mspncp/openssl fork.

This commit fixes a forgotten todo from openssl#10545.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#12361)
mspncp added a commit to mspncp/openssl that referenced this pull request Feb 2, 2021
Formatting is still very mixed in the NOTES and README files.
This commit tries to make formatting more consistent with the one
introduced in pull request openssl#10545.
openssl-machine pushed a commit that referenced this pull request Feb 12, 2021
Formatting is still very mixed in the NOTES and README files.
This commit tries to make formatting more consistent with the one
introduced in pull request #10545.

Reviewed-by: Paul Dale <[email protected]>
(Merged from #14042)
@mspncp mspncp deleted the revamp-the-docs branch October 20, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants