- You have a Word document or documents that you want to convert to a web page(s).
- You have a bash shell. On Windows, you can use Git Bash or Windows Subsystem for Linux (WSL)
- You have Hugo installed on your computer.
- You have Pandoc installed on your computer.
- You have existing Hugo based website.
- Copy/move your Word document(s) to a temporary folder.
- Copy the
createMarkdownFromWord.sh
,cleanMarkdown.sh
,prepend-frontmatter.sh
,renameMarkdownFilesWithSpaces.sh
, andmain.sh
scripts to the same folder. - Run the
main.sh
script. - Update the frontmatter in the markdown file(s) to your desired content. For example, update the title.
- Copy the markdown file(s) from the temporary folder to your Hugo site's
content\posts
folder. In this repo's case:
cp *.md ../w2wdemo/content/posts/
- Copy the images folder from the temporary folder to your Hugo site's
static
folder. In this repo's case:
cp images/ ../w2wdemo/static/ -r
- Issue a
hugo serve
command in your hugo site folder to build the site. - Open your browser and navigate to your Hugo site's URL to test the new content. Typically,
http://localhost:1313/
. - After testing, commit and push your code to your remote repo (GitHub, GitLab, Bitbucket, etc.) to invoke a CI/CD pipeline to deploy your Hugo site to the hosting service/CDN of your choice.