This is an awesome book. It’s written in AsciiDoc and compiles to HTML, PDF, and EPUB using the Asciidoctor Gradle plugin.
To convert this book to HTML and EPUB, run the following command:
npm run build
-
Open build/asciidoc/html5/index.html in your browser to see the generated HTML file.
-
Open build/asciidoc/pdf-prepress/index.pdf to see the 6x9" printable PDF file.
-
Open build/asciidoc/pdf-screen/index.pdf to see the downloadable 8.5x11" PDF file.
-
Open build/asciidoc/epub3/index.epub in iBooks to see the generated EPUB file.
If you’d like a very pleasant authoring experience, the project provides build files that make it possible. First,
you’ll need to run gradlew
once. After it finishes, you can run ./gradlew watch
to watch for any changes and
recompile files as you save them.
To have a similar awesome experience (watch and auto-reload) in your browser, install Node.js on your machine.
After installing Node, you can run the following command to install development tools (like Browsersync).
npm install
Tip
|
You will only need to run this command when dependencies change in package.json .
|
Now you can run the following command:
npm start
This will start two daemons:
-
Gradle, which will watch the file system and rebuild the HTML version continuously using Asciidoctor
-
BrowserSync, which will serve the updated HTML version all of the time and make it available over HTTP
Thanks to this, you’ll have a constantly up to date HTML version available in your browser while editing.
To update the dependencies in build.gradle
, run:
./gradlew useLatestVersions
To update the dependencies in package.json
, install npm-check-updates and run it:
npm i -g npm-check-updates ncu
To deploy to Netlify, create an account and log in.
-
Select New site from Git
-
Select your Git provider
-
Select your repository
-
Select the branch to deploy
-
Build command:
npm run build:site
-
Publish directory:
public/
-
Click Deploy site
Your site should take less than a minute to deploy, depending on the size of your book.
This repository is using a netlify.toml
configuration file to build and publish the static site to Netlify. You can see the result at https://jhipster-mini-book.netlify.app.