Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to quickly build a document server under Windows

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about how to quickly build a document server under Windows. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

Preface

When engaged in the translation of official documents, the first task is to set up a local document server to facilitate the verification of the translated content at any time.

The official documents are stored in the kubernetes/website project, which is developed based on the Hugo framework. Here is how to run the project using Hugo in Windows.

If you strictly follow the method recommended by kubernetes/website to run the document server, you need the following dependencies:

Hugo

Docker

Chocolatey

Make

The method described below only needs to install Hugo, which is easier to use.

Install Hugo version selection

The netlify.toml file of the kubernetes/website repository specifies the dependent Hugo version. For example, viewing the dependent Hugo version information under the 1.14 branch is as follows:

... HUGO_VERSION = ".53"...

When downloading Hugo, you can choose this version, and in general, there is no problem downloading a later version.

download

The corresponding version of the package can be downloaded from the release interface (https://github.com/gohugoio/hugo/releases) of the Hugo project.

As shown in the following figure, there are release packages for many platforms under Assets:

Just choose your own platform to download the corresponding package.

Installation

The package downloaded in the previous step can be unzipped and can be used without installation. Hugo official documentation is used to putting it on disk C.

Create the directory C:\ Hugo\ bin, and extract the package downloaded in the previous step to this directory. The result is as follows:

Finally, add C:\ Hugo\ bin to the environment variable for later use.

Verify installation

After the installation is complete, open a command line window and execute the hugo help command to verify that the installation was successful.

After a successful installation, the execution effect of the command is as follows:

Start the project

Bring the kubernetes/website clone locally, and then enter the project directory. Start the command line in this directory (shift+ right, start the command line), and use the command hugo server-- buildFuture to start the document server. As shown in the following figure:

Note: when starting the document server, you need to download some resources from the external network, especially those that need to be downloaded from the Google website, may need an agent.

Access local documents

Use a browser to access http://localhost:1313/ to access the local server, as shown in the following figure:

A document is usually a markdown file, and each markdown file may have multiple language versions, and the translation actually modifies such a markdown file.

The above is the editor for you to share how to quickly build a document server under Windows, if you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report