From 2fd6861fb72dcd0cd41bd014fda6b44a172c496b Mon Sep 17 00:00:00 2001 From: oceanlvr <36698124+oceanlvr@users.noreply.github.com> Date: Sat, 31 Jul 2021 22:41:15 +0800 Subject: refactor(docs): refactor man & index page (#1472) --- _adoc/index.adoc | 2 +- _config.yml | 3 +- _includes/footer-manpage.html | 2 +- _includes/footer-nng.html | 24 +- _includes/footer.html | 2 +- _includes/header-manpage.html | 85 ++++++ _includes/header-nng.html | 91 ++++-- _includes/nn-content.html | 162 ++++++++++ _includes/nn-footer.html | 2 +- _layouts/manpage.html | 4 +- _layouts/manpage_v2.html | 40 ++- _layouts/nng.html | 19 +- arrows.png | Bin 30345 -> 0 bytes assets/css/bulma.css | 22 ++ assets/css/index.css | 266 ++++++++++++++++ assets/css/man.css | 272 +++++++++++++++++ assets/css/nn-pygments.css | 69 +++++ assets/css/nn.css | 508 ++++++++++++++++++++++++++++++ assets/image/NNg-black.png | Bin 0 -> 2850 bytes assets/image/NNg-white.png | Bin 0 -> 2599 bytes assets/image/compatibility.png | Bin 0 -> 94670 bytes assets/image/feat-extensibility.png | Bin 0 -> 4358 bytes assets/image/feat-maintainability.png | Bin 0 -> 5078 bytes assets/image/feat-reliability.png | Bin 0 -> 4804 bytes assets/image/feat-scalability.png | Bin 0 -> 2018 bytes assets/image/feat-security.png | Bin 0 -> 4456 bytes assets/image/feat-usability.png | Bin 0 -> 3585 bytes assets/image/footer-email.png | Bin 0 -> 1411 bytes assets/image/platforms.png | Bin 0 -> 52005 bytes assets/image/quick-start-bg.png | Bin 0 -> 44106 bytes nn-pygments.css | 69 ----- nn.css | 561 ---------------------------------- 32 files changed, 1511 insertions(+), 692 deletions(-) create mode 100644 _includes/header-manpage.html create mode 100644 _includes/nn-content.html delete mode 100644 arrows.png create mode 100644 assets/css/bulma.css create mode 100644 assets/css/index.css create mode 100644 assets/css/man.css create mode 100644 assets/css/nn-pygments.css create mode 100644 assets/css/nn.css create mode 100644 assets/image/NNg-black.png create mode 100644 assets/image/NNg-white.png create mode 100644 assets/image/compatibility.png create mode 100644 assets/image/feat-extensibility.png create mode 100644 assets/image/feat-maintainability.png create mode 100644 assets/image/feat-reliability.png create mode 100644 assets/image/feat-scalability.png create mode 100644 assets/image/feat-security.png create mode 100644 assets/image/feat-usability.png create mode 100644 assets/image/footer-email.png create mode 100644 assets/image/platforms.png create mode 100644 assets/image/quick-start-bg.png delete mode 100644 nn-pygments.css delete mode 100644 nn.css diff --git a/_adoc/index.adoc b/_adoc/index.adoc index 1bcf3302..55344c6e 100644 --- a/_adoc/index.adoc +++ b/_adoc/index.adoc @@ -12,7 +12,7 @@ image:https://img.shields.io/codacy/grade/f241cba192974787b66f7e4368777ebf?logo= image:https://img.shields.io/lgtm/grade/cpp/github/nanomsg/nng?logo=lgtm&logoColor=grey&label=[LGTM,link="https://lgtm.com/projects/g/nanomsg/nng/?mode=list"] image:https://img.shields.io/discord/639573728212156478?label=&logo=discord[Discord,link="https://discord.gg/Xnac6b9"] image:https://img.shields.io/github/license/nanomsg/nng.svg?logoColor=silver&logo=open-source-initiative&label=&color=blue[MIT License,link="https://github.com/nanomsg/nng/blob/master/LICENSE.txt"] -image:https://img.shields.io/github/v/tag/nanomsg/nng.svg?logo=github&label=[Latest version,link="https://github.com/nanomsg/nng/releases] +image:https://img.shields.io/github/v/tag/nanomsg/nng.svg?logo=github&label=[Latest version,link="https://github.com/nanomsg/nng/releases"] This is the landing page for NNG. diff --git a/_config.yml b/_config.yml index 688f4fef..fb1a9ca0 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,4 @@ latest: v1.3.2 important_icon: http://nanomsg.org/icons/important.png -exclude: [ _tools ] +exclude: [_tools] +index_path: / diff --git a/_includes/footer-manpage.html b/_includes/footer-manpage.html index 061b7658..37b0e997 100644 --- a/_includes/footer-manpage.html +++ b/_includes/footer-manpage.html @@ -4,7 +4,7 @@
NNG Reference Manual {{ page.version }}
- © 2020 Staysail Systems, + © 2021 Staysail Systems, Inc. © 2018 Capitar IT Group BV
diff --git a/_includes/footer-nng.html b/_includes/footer-nng.html index d4691bb7..aa4e534b 100644 --- a/_includes/footer-nng.html +++ b/_includes/footer-nng.html @@ -1,12 +1,18 @@ \ No newline at end of file diff --git a/_includes/footer.html b/_includes/footer.html index 2a948333..fc83d176 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -3,7 +3,7 @@ -© 2020 Garrett D'Amore and contributors. +© 2021 Garrett D'Amore and contributors.
nanomsg™ and nng™ are trademarks of Garrett D'Amore.
diff --git a/_includes/header-manpage.html b/_includes/header-manpage.html new file mode 100644 index 00000000..3e4f5682 --- /dev/null +++ b/_includes/header-manpage.html @@ -0,0 +1,85 @@ +
+
+ +
+ +
\ No newline at end of file diff --git a/_includes/header-nng.html b/_includes/header-nng.html index 2ea7d51d..1f1a112b 100644 --- a/_includes/header-nng.html +++ b/_includes/header-nng.html @@ -1,20 +1,75 @@
-
- - - +
+
-
+ + \ No newline at end of file diff --git a/_includes/nn-content.html b/_includes/nn-content.html new file mode 100644 index 00000000..728466ad --- /dev/null +++ b/_includes/nn-content.html @@ -0,0 +1,162 @@ +
+

NNG: Lightweight Messaging Library

+

A lightweight, broker-less library

+ Download +
+
+
+
+
+
+
+
+
+

Introduction

+

NNG, like its predecessors nanomsg + (and + to some extent ZeroMQ), + is a + lightweight, broker-less library, offering a simple API to solve common + recurring messaging problems, such as publish/subscribe, RPC-style + request/reply, or service discovery. The API frees the programmer from worrying + about details like connection management, retries, and other common + considerations, so that they can focus on the application instead of the + plumbing.

+
+
+
+
+
+

+ Features +

+
+
+
+ +

Reliability

+

NNG is designed for production use from the beginning. Every error case is considered, + and it is designed to avoid crashing except in cases of gross developer error. (Hopefully we don’t have + any of these in our own code.)

+
+
+
+
+ +

Scalability

+

NNG scales out to engage multiple cores using a bespoke asynchronous I/O framework, + using thread pools to spread load without exceeding typical system limits.

+
+
+
+
+ +

Maintainability

+

NNG’s architecture is designed to be modular and easily grasped by developers + unfamiliar with the code base. The code is also well documented.

+
+
+
+
+ +

Extensibility

+

Because it avoids ties to file descriptors, and avoids confusing interlocking state + machines, it is easier to add new protocols and transports to NNG. This was demonstrated by the addition + of the TLS and ZeroTier transports.

+
+
+
+
+ +

Security

+

NNG provides TLS 1.2 and ZeroTier transports, offering support for robust and industry + standard authentication and encryption. In addition, it is hardened to be resilient against malicious + attackers, with special consideration given to use in a hostile Internet.

+
+
+
+
+ +

Usability

+

NNG eschews slavish adherence parts of the more complex and less well understood POSIX + APIs, while adopting the semantics that are familiar and useful. New APIs are intuitive, and the optional + support for separating protocol context and state from sockets makes creating concurrent applications + vastly simpler than previously possible.

+
+
+
+
+
+
+
+
+
+

Compatibility

+

This project offers both wire compatibility and API compatibility, so most nanomsg + users can begin using + NNG right away.

+

+ Existing nanomsg and mangos applications can inter-operate with NNG applications automatically.

+
+
+ +
+
+
+
+
+
+

Supported Platforms

+

NNG supports Linux, macOS, Windows (Vista or better), illumos, + Solaris, FreeBSD, + Android, and iOS. Most other POSIX platforms should work out of the box but have not been tested. Very old + versions of otherwise supported platforms might not work.

+
+
+ +
+
+
+
+
+
+

+ Quick Start +

+
+
+

+ To build this project, you will need a C99 compatible compiler and CMake version 3.13 or + newer. +

+

We recommend using the Ninja build system (pass "-G Ninja" + to CMake) when + you + can. (And not just because + Ninja sounds like "NNG" — it’s also blindingly fast and has made our lives as developers measurably better.) +

+

If you want to build with TLS support you will also need + mbedTLS. See + docs/BUILD_TLS.adoc for details. +

+
+
+

With a Linux or UNIX environment:

+
$ mkdir build
+$ cd build
+$ cmake -G Ninja ..
+$ ninja
+$ ninja test
+$ ninja install
+
+
+
+
+
\ No newline at end of file diff --git a/_includes/nn-footer.html b/_includes/nn-footer.html index d4691bb7..46993667 100644 --- a/_includes/nn-footer.html +++ b/_includes/nn-footer.html @@ -1,7 +1,7 @@