hexojs / hexojs/hexo-server

Start hexo server with `-s` options do not work properly

Open
#363 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
81
Forks
55
PR merge metrics
No merged PRs in 30d

Description

### Check List

- [x] I have already read README.
- [x] I have already searched existing issues and they are not help to me.
- [x] I examined error or warning messages and it's difficult to solve.
- [x] I am using the latest version of this repository.
- [x] I am using the [latest](https://github.com/hexojs/hexo/releases) version of Hexo.
- [x] My Node.js is matched the required version.

### Describe the bug

The short options `-s` do not work properly.

### Expected behavior

According to the hexo document, the command `hexo server -s` can used to start a hexo server on static mode, but it does not work, the server still work on watch mode.

### How to reproduce

Use `hexo server -s` command to start a hexo server.

### Screenshots

![Image](https://github.com/user-attachments/assets/ac457be5-d9b9-4246-9f6e-c872907a5b12)

### Environment information

_No response_

### Additional context

I did some tiny research and printed out the args on `server.js`.
It seems that the `s` arg was taken specially treatment by Hexo.
![Image](https://github.com/user-attachments/assets/e3f2fd33-ff1c-46e3-b3cf-df769229e430)

![Image](https://github.com/user-attachments/assets/7afe9b9f-9afb-4130-a92f-9b1b05c06b1b)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.