Repository: incubator-gearpump Updated Branches: refs/heads/master 9ed67a12c -> 7bc1a506a
[GEARPUMP-305][Doc] Use MkDocs plugin to validate html Get rid of ruby tools Author: manuzhang <[email protected]> Closes #252 from manuzhang/html_proofer. Project: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/commit/7bc1a506 Tree: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/tree/7bc1a506 Diff: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/diff/7bc1a506 Branch: refs/heads/master Commit: 7bc1a506ae0dfbe9359952d3fc96a49d3035cf75 Parents: 9ed67a1 Author: manuzhang <[email protected]> Authored: Mon Aug 27 22:47:34 2018 +0800 Committer: manuzhang <[email protected]> Committed: Mon Aug 27 22:48:13 2018 +0800 ---------------------------------------------------------------------- docs/README.md | 37 ++++--------------------------------- docs/build_doc.sh | 7 ------- docs/mkdocs.yml | 1 + 3 files changed, 5 insertions(+), 40 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/7bc1a506/docs/README.md ---------------------------------------------------------------------- diff --git a/docs/README.md b/docs/README.md index d193c86..8e87ae2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,39 +5,10 @@ have docs corresponding to your checked out version. # Requirements -You need to install ruby and ruby-dev first. On Ubuntu, you ca run command like this: - - sudo apt-get install ruby - sudo apt-get install ruby-dev - sudo apt-get install python-setuptools - sudo apt-get install pip - -We use Markdown to write and Jekyll to translate the documentation to static HTML. You can install -all needed software via: - - sudo pip install mkdocs - sudo gem install html-proofer - - -If you are using Mac OSX 10.11+ (El Capitan), you will need to execute following command: -``` -sudo gvim /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.10/lib/ffi/library.rb -``` -And change following code in this file: -```ruby -module FFI -... - def self.map_library_name(lib) - ... - lib = Library::LIBC if lib == 'c' - lib = Library::LIBCURL if lib == 'libcurl' -... -module Library - CURRENT_PROCESS = FFI::CURRENT_PROCESS - LIBC = '/usr/lib/libc.dylib' - LIBCURL = '/usr/lib/libcurl.dylib' -``` +We use [MkDocs](https://www.mkdocs.org/) (>=0.17) to generate our documentation site. You can install +it via: + pip install mkdocs # How to Build Command `./build_doc.sh` can be used to create a full document folder under site/. @@ -67,5 +38,5 @@ how a headline looks. Command `mkdocs build` can be used to make a test build. -Command `mkdocs serve` can be used for debug purpose. Mkdocs will start a web server at +Command `mkdocs serve` can be used for debug purpose. MkDocs will start a web server at `localhost:8000`. Use this mode to experiment commits and check changes locally. http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/7bc1a506/docs/build_doc.sh ---------------------------------------------------------------------- diff --git a/docs/build_doc.sh b/docs/build_doc.sh index 5acd4ed..19e3325 100755 --- a/docs/build_doc.sh +++ b/docs/build_doc.sh @@ -50,13 +50,6 @@ export BUILD_API=$2 # generate site documents mkdocs build --clean -# check html link validity -echo "Checking generated HTMLs using htmlproofer..." - -htmlproofer site \ - --disable-external \ - --file-ignore site/base.html,site/breadcrumbs.html,site/versions.html,site/toc.html,site/footer.html - # generate API doc if [ "$BUILD_API" = 1 ]; then # Build Scaladoc for Java/Scala http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/7bc1a506/docs/mkdocs.yml ---------------------------------------------------------------------- diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 1a11429..13735aa 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -54,6 +54,7 @@ markdown_extensions: plugins: - search - markdownextradata + - htmlproofer extra: GEARPUMP_VERSION: "0.8.5-SNAPSHOT"
