Skip to content
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

Move to using markdown and better use of templates #324

Closed
levitte opened this issue May 5, 2022 · 6 comments
Closed

Move to using markdown and better use of templates #324

levitte opened this issue May 5, 2022 · 6 comments

Comments

@levitte
Copy link
Member

levitte commented May 5, 2022

Our current web pages all contain a lot of boilerplate... they all start with this (hopefully and with varying titles):

<!DOCTYPE html>
<html lang="en">
<!--#include virtual="/inc/head.shtml" -->

<body>
  <!--#include virtual="/inc/banner.shtml" -->

  <div id="main">
  <div id="content">
    <div class="blog-index">
      <article>
        <header><h2>Welcome to OpenSSL!</h2></header>
        <div class="entry-content">

... and all end with this (hopefully and with varying breadcrumbs):

        </div>
        <footer>
          You are here: <a href="/">Home</a>
          <br/><a href="/sitemap.txt">Sitemap</a>
        </footer>
      </article>
    </div>
    <!--#include virtual="sidebar.shtml" -->
  </div>
</div>

<!--#include virtual="/inc/footer.shtml" -->
</body>
</html>

We now have mechanisms in place, when we can get rid of all this repeated boilerplate, and move to base pages on markdown (do note that markdown files can contain HTML, so a valid lazy move could be to simply rename current .html files and drop all the boilerplate).

It's necessary to create a file dirdata.yaml with the metadata (content corresponding to sidebar.shtml and the breadcrumbs that are currently repeated in every .html file), see policies/dirdata.yaml as an example:

https://github.com/openssl/web/blob/79905834dd07275c013857b7cd9b92f14c292e35/policies/dirdata.yaml

This doesn't have to be done all in one go, but should be encouraged.

@levitte
Copy link
Member Author

levitte commented May 5, 2022

As an example, the top index.html could be converted to the following index.md:

---
title: Welcome to OpenSSL!
---
The OpenSSL Project develops and maintains the OpenSSL software - a robust,
commercial-grade, full-featured toolkit for general-purpose cryptography and
secure communication. The project's technical decision making is managed by
the [OpenSSL Technical Committee](/community/otc.html) (OTC) and the project
governance is managed by
the [OpenSSL Management Committee](/community/omc.html) (OMC).
The project operates under formal [Bylaws](/policies/omc-bylaws.html). 

For more information about the team and community around the project, or to
start making your own contributions, start with the [community](/community)
page. To get the latest news, download the source, and so on, please see the
sidebar or the buttons at the top of every page.

OpenSSL is licensed under an Apache-style license, which basically means
that you are free to get and use it for commercial and non-commercial
purposes subject to some simple license conditions.

For a list of vulnerabilities, and the releases in which they were found and
fixes, see our [Vulnerabilities](news/vulnerabilities.html) page.

### Latest News

<table class="newsflash" width="90%">
<!--#include virtual="newsflash.inc"-->
<tr><td class="d"><a href="news">More...</a></td><td class="t"></td></tr>
</table>
<p>&nbsp;</p>

<!--#include virtual="/inc/legalities.shtml" -->

@levitte
Copy link
Member Author

levitte commented May 5, 2022

At the very least, new pages should be made in Markdown... as it turns out that we've already started doing, see #313

@levitte
Copy link
Member Author

levitte commented May 5, 2022

Note: for rendering, pandoc is used. It understands github markdown, but not only.

levitte added a commit to levitte/openssl-web that referenced this issue Jul 11, 2022
Pandoc makes this really easy:

    pandoc -f html -t markdown -o index.html index.md

Only very minute small manual adjustments are needed afterwards.

Partial fix of openssl#324
levitte added a commit to levitte/openssl-web that referenced this issue Jul 11, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 11, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 11, 2022
We only take the easy parts, and leave manual page generation files alone.

Partial fix of openssl#324
levitte added a commit to levitte/openssl-web that referenced this issue Jul 11, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 11, 2022
Convert docs/*.html to .md

We only take the easy parts, and leave manual page generation files alone.

Partial fix of openssl#324
levitte added a commit to levitte/openssl-web that referenced this issue Jul 11, 2022
Convert all news/*.html to .md

Partial fix of openssl#324
levitte added a commit to levitte/openssl-web that referenced this issue Jul 11, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 12, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 12, 2022
Convert all support/*.html to .md

Partial fix of openssl#324
levitte added a commit to levitte/openssl-web that referenced this issue Jul 12, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 12, 2022
@levitte
Copy link
Member Author

levitte commented Jul 12, 2022

Work has happened. I've merged all the PRs into a branch that is currently used on https://beta.openssl.org
I haven't looked yet, but will do so soon.

openssl-machine pushed a commit that referenced this issue Jul 15, 2022
Partial fix of #324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #344)
openssl-machine pushed a commit that referenced this issue Jul 15, 2022
Partial fix of #324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #346)
openssl-machine pushed a commit that referenced this issue Jul 15, 2022
Partial fix of #324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #348)
openssl-machine pushed a commit that referenced this issue Jul 15, 2022
Pandoc makes this really easy:

    pandoc -f html -t markdown -o index.html index.md

Only very minute small manual adjustments are needed afterwards.

Partial fix of #324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #343)
levitte added a commit to levitte/openssl-web that referenced this issue Jul 15, 2022
We only take the easy parts, and leave manual page generation files alone.

Partial fix of openssl#324
levitte added a commit to levitte/openssl-web that referenced this issue Jul 15, 2022
Convert docs/*.html to .md

We only take the easy parts, and leave manual page generation files alone.

Partial fix of openssl#324
levitte added a commit to levitte/openssl-web that referenced this issue Jul 15, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 15, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 15, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 15, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 15, 2022
We only take the easy parts, and leave manual page generation files alone.

Partial fix of openssl#324
openssl-machine pushed a commit that referenced this issue Jul 16, 2022
Partial fix of #324

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from #347)
levitte added a commit to levitte/openssl-web that referenced this issue Jul 17, 2022
We only take the easy parts, and leave manual page generation files alone.

Partial fix of openssl#324
levitte added a commit to levitte/openssl-web that referenced this issue Jul 17, 2022
levitte added a commit to levitte/openssl-web that referenced this issue Jul 17, 2022
openssl-machine pushed a commit that referenced this issue Jul 20, 2022
We only take the easy parts, and leave manual page generation files alone.

Partial fix of #324

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #345)
openssl-machine pushed a commit that referenced this issue Jul 20, 2022
Partial fix of #324

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #349)
openssl-machine pushed a commit that referenced this issue Jul 20, 2022
Partial fix of #324

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #349)
@levitte
Copy link
Member Author

levitte commented Jul 20, 2022

All associated PRs merged. Closing

@levitte levitte closed this as completed Jul 20, 2022
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from openssl#344)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from openssl#346)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from openssl#348)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from openssl#347)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
We only take the easy parts, and leave manual page generation files alone.

Partial fix of openssl#324

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#345)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#349)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from openssl#344)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from openssl#346)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from openssl#348)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from openssl#347)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
We only take the easy parts, and leave manual page generation files alone.

Partial fix of openssl#324

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#345)
mkoci-koca pushed a commit to mkoci-koca/web that referenced this issue Oct 6, 2022
Partial fix of openssl#324

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#349)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant