Skip to content

m2web/word-to-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Word to Web with Hugo in 5 Minutes

Readme Banner

Prerequisites

  1. You have a Word document or documents that you want to convert to a web page(s).
  2. You have a bash shell. On Windows, you can use Git Bash or Windows Subsystem for Linux (WSL)
  3. You have Hugo installed on your computer.
  4. You have Pandoc installed on your computer.
  5. You have existing Hugo based website.

How to do it

  1. Copy/move your Word document(s) to a temporary folder.
  2. Copy the createMarkdownFromWord.sh, cleanMarkdown.sh, prepend-frontmatter.sh, renameMarkdownFilesWithSpaces.sh, and main.sh scripts to the same folder.
  3. Run the main.sh script.
  4. Update the frontmatter in the markdown file(s) to your desired content. For example, update the title.
  5. 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/
  1. 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
  1. Issue a hugo serve command in your hugo site folder to build the site.
  2. Open your browser and navigate to your Hugo site's URL to test the new content. Typically, http://localhost:1313/.
  3. 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.

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published