Skip to content

Commit da87669

Browse files
committed
Rewrite documentation with Material for mkdocs
- remove doc build from autotools - don't depend anymore on asciidoc - don't provide man pages anymore - new illustrations - provide mkdocs instructions
1 parent ef3c4bc commit da87669

File tree

125 files changed

+3317
-3120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+3317
-3120
lines changed

.gitignore

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
.libs
1111
.DS_Store
1212

13-
# Emacs
14-
GPATH
15-
GRTAGS
16-
GSYMS
17-
GTAGS
13+
# Editors
14+
/*.sublime-*
15+
/.vscode
16+
/.venv
1817

1918
# Generated by Autotools
2019
INSTALL
@@ -28,17 +27,17 @@ Makefile.in
2827
/configure.scan
2928
/depcomp
3029
/install-sh
30+
/libmodbus.pc
3131
/libtool
3232
/ltmain.sh
3333
/missing
34-
/libmodbus.pc
3534
/stamp-h1
3635
src/modbus-version.h
3736
src/win32/modbus.dll.manifest
3837
tests/unit-test.h
3938

40-
/*.sublime-*
41-
/.vscode
39+
# mkdocs
40+
/site
4241

4342
# Binary
4443
tests/bandwidth-client
@@ -50,8 +49,3 @@ tests/unit-test-client
5049
tests/unit-test-server
5150
tests/version
5251
tests/stamp-h2
53-
54-
# Documentation
55-
doc/*.html
56-
doc/*.3
57-
doc/*.7

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ How Do I Submit A Good Bug Report?
44
Please, don't send direct emails to Stéphane Raimbault unless you want
55
commercial support.
66

7-
Take care to read the documentation at http://libmodbus.org/documentation/.
7+
Take care to read the documentation at http://libmodbus.org/.
88

99
- *Be sure it's a bug before creating an issue*, in doubt, post a message on
1010
https://groups.google.com/forum/#!forum/libmodbus or send an email to
@@ -24,6 +24,6 @@ the clients are connected (TCP, RTU, ASCII) and the source code you are using.
2424

2525
- *Enable the debug mode*, libmodbus provides a function to display the content
2626
of the Modbus messages and it's very convenient to analyze issues
27-
(http://libmodbus.org/docs/latest/modbus_set_debug.html).
27+
(http://libmodbus.org/docs/modbus_set_debug/).
2828

2929
Good bug reports provide right and quick fixes!

ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ When you get here and you are still convinced that you want to report a bug:
3434

3535
- *Enable the debug mode*, libmodbus provides a function to display the content
3636
of the Modbus messages and it's very convenient to analyze issues
37-
(<http://libmodbus.org/docs/latest/modbus_set_debug.html>).
37+
(<http://libmodbus.org/docs/modbus_set_debug/>).
3838

3939
Good bug reports provide right and quick fixes!
4040

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CLEANFILES += libmodbus.pc
99

1010
dist_doc_DATA = MIGRATION README.md AUTHORS NEWS
1111

12-
SUBDIRS = src doc
12+
SUBDIRS = src
1313

1414
if BUILD_TESTS
1515
SUBDIRS += tests

README.md

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
A groovy modbus library
2-
=======================
1+
# A groovy modbus library
32

43
![Build Status](https://github.com/stephane/libmodbus/actions/workflows/build.yml/badge.svg)
54

6-
Overview
7-
--------
5+
## Overview
86

97
libmodbus is a free software library to send/receive data with a device which
108
respects the Modbus protocol. This library can use a serial port or an Ethernet
@@ -15,21 +13,15 @@ Protocol Reference Guide which can be obtained from [www.modbus.org](http://www.
1513

1614
The license of libmodbus is *LGPL v2.1 or later*.
1715

18-
The documentation is available as manual pages (`man libmodbus` to read general
19-
description and list of available functions) or Web pages
20-
[www.libmodbus.org/documentation/](http://libmodbus.org/documentation/). The
21-
documentation is licensed under the Creative Commons Attribution-ShareAlike
22-
License 3.0 (Unported) (<http://creativecommons.org/licenses/by-sa/3.0/>).
23-
24-
The official website is [www.libmodbus.org](http://www.libmodbus.org).
16+
The official website is [www.libmodbus.org](http://www.libmodbus.org). The
17+
website contains the latest version of the documentation.
2518

2619
The library is written in C and designed to run on Linux, Mac OS X, FreeBSD, Embox,
2720
QNX and Windows.
2821

2922
You can use the library on MCUs with Embox RTOS.
3023

31-
Installation
32-
------------
24+
## Installation
3325

3426
You will only need to install automake, autoconf, libtool and a C compiler (gcc
3527
or clang) to compile the library and asciidoc and xmlto to generate the
@@ -59,19 +51,7 @@ automake libtool`.
5951

6052
To build under Embox, you have to use its build system.
6153

62-
Documentation
63-
-------------
64-
65-
The documentation is available [online](http://libmodbus.org/documentation) or
66-
as manual pages after installation.
67-
68-
The documentation is based on
69-
[AsciiDoc](http://www.methods.co.nz/asciidoc/). Only man pages are built
70-
by default with `make` command, you can run `make htmldoc` in *doc* directory
71-
to generate HTML files.
72-
73-
Testing
74-
-------
54+
## Testing
7555

7656
Some tests are provided in *tests* directory, you can freely edit the source
7757
code to fit your needs (it's Free Software :).
@@ -87,7 +67,15 @@ By default, all TCP unit tests will be executed (see --help for options).
8767

8868
It's also possible to run the unit tests with `make check`.
8969

90-
To report a bug or to contribute
91-
--------------------------------
70+
## To report a bug or to contribute
9271

9372
See [CONTRIBUTING](CONTRIBUTING.md) document.
73+
74+
## Documentation
75+
76+
You can serve the local documentation with:
77+
78+
```shell
79+
pip install mkdocs-material
80+
mkdocs serve
81+
```

acinclude.m4

Lines changed: 0 additions & 29 deletions
This file was deleted.

configure.ac

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ AC_CHECK_HEADERS([ \
9494
unistd.h \
9595
])
9696

97-
# Check whether to build docs / install man pages
98-
AC_LIBMODBUS_CHECK_BUILD_DOC
99-
10097
# Cygwin defines IPTOS_LOWDELAY but can't handle that flag so it's necessary to
10198
# workaround that problem and Cygwin doesn't define MSG_DONTWAIT.
10299
AC_CHECK_DECLS([__CYGWIN__])
@@ -161,7 +158,6 @@ AC_CONFIG_FILES([
161158
src/modbus-version.h
162159
src/win32/modbus.dll.manifest
163160
tests/Makefile
164-
doc/Makefile
165161
libmodbus.pc
166162
])
167163

@@ -179,6 +175,5 @@ AC_MSG_RESULT([
179175
cflags: ${CFLAGS}
180176
ldflags: ${LDFLAGS}
181177
182-
documentation: ${ac_libmodbus_build_doc}
183178
tests: ${enable_tests}
184179
])

doc/Makefile.am

Lines changed: 0 additions & 88 deletions
This file was deleted.

doc/asciidoc.conf

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)