- 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.shscripts to the same folder. - Run the
main.shscript. - 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\postsfolder. In this repo's case:
cp *.md ../w2wdemo/content/posts/- Copy the images folder from the temporary folder to your Hugo site's
staticfolder. In this repo's case:
cp images/ ../w2wdemo/static/ -r- Issue a
hugo servecommand 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.
