You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/tutorials/contribute-api.markdown
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,12 +127,21 @@ npm install -g http-server
127
127
128
128
# Start it in the "dist/" folder
129
129
# The "--cors" part at the end allows the website on port 1313 to reach the spec on the different port 8080.
130
-
http-server dist/ --cors
130
+
http-server dist/ --cors
131
131
```
132
132
133
-
Your version of the specification is now available at `http://localhost:8080/openapi.yaml`. Switch VSCode window to the website project and modify the `spec-url` URL at the top of the `layouts/docs/single.html` file to point to this file instead.
133
+
Your version of the specification is now available at `http://localhost:8080/openapi.yaml`. Switch VSCode window to the website project and restart the hugo server with the following command:
134
134
135
-
(Note: The API Docs will not automatically reload if you re-bundle the API spec.)
135
+
```bash
136
+
# Windows cmd.exe
137
+
set SPEC_URL=http://localhost:8080/openapi.yaml
138
+
./hugo.exe server
139
+
140
+
# Linux or Git Bash
141
+
SPEC_URL=http://localhost:8080/openapi.yaml ./hugo server
142
+
```
143
+
144
+
(Note: The API Docs will **not** automatically reload if you re-bundle the API spec.)
0 commit comments