Open balaji-dutt opened 3 years ago
Hi @balaji-dutt
I tried this on my end, with the same theme you are using, but couldn't replicate the issue. Following are my Extension and Software details:
0.1.0
Version: 1.58.2 (Universal)
hugo v0.86.0+extended
Following are my configs:
./settings.json (Vscode Settings)
./config.toml
And I also tried replicating the same scenarios you mentioned above, but they are working for me on the custom port set.
Server Start Command
Creating a new content in default contentDir
:
Can you verify if you have properly setup the extension. One thing to note here, this extension is meant to work with hugo
command-line tool (You can see the windows installation here - https://gohugo.io/getting-started/installing#chocolatey-windows) and thus the cmd tool should be installed before working with this extension.
Also, if everything is setup properly, it would be great if you can share a reproduction of this issue, by either creating a small test hugo project which replicates this issue or else if your source code is open, you can share me your project's link which I can use to verify the same.
Also, if everything is setup properly, it would be great if you can share a reproduction of this issue, by either creating a small test hugo project which replicates this issue
So I'm still having a problem with getting the extension to work, even with a brand new hugo site. Steps I followed so far:
>hugo version
hugo v0.86.0-41C6C52E windows/amd64 BuildDate=2021-07-21T09:53:14Z VendorInfo=gohugoio
>hugo new site newhugo
Congratulations! Your new Hugo site is created in C:\path\to\newhugo.
newhugo>git init
Initialized empty Git repository in C:/path/to/newhugo/.git/
newhugo>cd themes && git submodule add https://github.com/halogenica/beautifulhugo.git beautifulhugo Cloning into 'C:/path/to/newhugo/themes/beautifulhugo'... remote: Enumerating objects: 2865, done. remote: Total 2865 (delta 0), reused 0 (delta 0), pack-reused 2865 Receiving objects: 100% (2865/2865), 6.39 MiB | 3.92 MiB/s, done. Resolving deltas: 100% (1661/1661), done. warning: LF will be replaced by CRLF in .gitmodules. The file will have its original line endings in your working directory
* Add a vscode settings file
``` shell
newhugo> mkdir .vscode && cd .vscode
newhugo>(
echo {
echo "gohugo.showTerminal": true
echo }
)>"settings.json"
Open newhugo folder in VSCode and try to launch hugo: https://user-images.githubusercontent.com/3147070/127627566-13d5f0ba-5955-4c13-8059-c2d9a5d88932.mp4
Try to run hugo server
outside VSCode in the same folder:
newhugo>hugo server
Start building sites …
hugo v0.86.0-41C6C52E windows/amd64 BuildDate=2021-07-21T09:53:14Z VendorInfo=gohugoio
| EN
-------------------+------
Pages | 7
Paginator pages | 0
Non-page files | 0
Static files | 184
Processed images | 0
Aliases | 1
Sitemaps | 1
Cleaned | 0
Built in 1854 ms Watching for changes in C:\path\to\newhugo{archetypes,content,data,layouts,static,themes} Watching for config changes in C:\path\to\newhugo\config.toml Environment: "development" Serving pages from memory Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop
The only difference I can see right now is your Operating System seems to be macOS compared to my Windows environment.
> or else if your source code is open, you can share me your project's link which I can use to verify the same.
You can check out this repo: https://github.com/balaji-dutt/tech-notebook
I think that the extension does not work in Windows.
I tried using the extension with VSCode on macOS with the same "tech-notebook" repo. I was able to get use the commands like "GoHugo: Start Server" and "GoHugo: Create New Content" without any errors.
After toggling Developer Tools in VSCode on Windows, when I try the command "GoHugo: Start Server", I seee the following error message in Console:
ERR spawn C:\Windows\system32\cmd.exe ENOENT: Error: spawn C:\Windows\system32\cmd.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
The above error message occurs irrespective of whether I run the command for a Hugo site that's in a VSCode workspace (tech-notebook repo) or just by adding a folder to a VSCode Window (tested with "newhugo" reproduction case).
Thanks, @balaji-dutt for providing these details. Currently, I don't have access to any Windows system, thus it would be difficult to debug and figure out the error.
I will keep this issue open to be fixed later in some time. I will update once done. Apologies for the inconvenience caused till then!
Thanks, @balaji-dutt for providing these details. Currently, I don't have access to any Windows system, thus it would be difficult to debug and figure out the error.
I will keep this issue open to be fixed later in some time. I will update once done. Apologies for the inconvenience caused till then!
If you have the ability to run virtualization software in your development environment, it is possible to install Windows in a VM and use it for atleast 180 days without a license key.
Hi,
I'm a little confused on how to get the extension to work with my local Hugo environment.
Extension version:
My Environment
Expected Behavior
gohugo: Start Server
, the command should launch a local hugo server.gohugo: Create New Content
, the command should place an empty post fileActual Behavior
gohugo: Start Server
, navigating tolocalhost:1313
results in a "Site cannot be reached error"gohugo: Create New Content
, no file is createdSteps to reproduce the problem:
Steps to reproduce:
config.toml
exists in the root of the folder and has the following configuration:gohugo: Start Server
. The following Terminal window appears: