I would approach this by creating a simple shortcode plugin using a php include to pull in the html.
This quick n dirty plugin could probably be improved and assumes that you only have a single html file you want to include. It should be easy to tweak to allow several different books.
Create a new folder with an appropriate name within your wp-content/plugins directory
Lat time I used Word it was only able to output pretty bad & bloaty html by default, so you might need to do some clean up. I believe Google doc can take an uploaded Word doc & export cleaner html than Word itself can, but I’ve not tried this. If this doesn’t work, you may be able to run a few ‘search & replace all’ operations in a text editor.
Once the book’s html file in your favourite text editor and cleaned up, a few other things need to be changed at the beginning & end.
Delete the opening & closing <html>
& <body>
tags & also delete the head section from the file. What you want to be left with is a file containing everything that was inside the ‘<body>’ & ‘</body>’ tags after cleaning the html up.
Name the html file appropriately (all lower case and hyphens instead of spaces is good) and upload it into the new directory you created.
Create a new file in the folder you created for the plugin function. Change the names etc in my example (unless you actually are including the same Sherlock Holmes story I am using.)
<?php
/*
Plugin Name: Sign of Four
Plugin URI: https://cubecolour.co.uk
Description: Include a book in a WP page using a shortcode
Author: cubecolour
Version: 0.1.0
Author URI: https://cubecolour.co.uk/wp/
*/
function cc_signoffour( $atts, $content = null ) {
$plugin_dir_path = dirname(__FILE__);
return sanitize_html_class(include_once($plugin_dir_path . '/the-sign-of-the-four.html'));
}
add_shortcode('signoffour', 'cc_signoffour');
My example enables me to include the whole book within a WordPress page using the [signoffour]
shortcode which is defined on the last line.