Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
e9200f95
Unverified
Commit
e9200f95
authored
Feb 27, 2020
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐛
修复生成静态站点链接问题 Fix #70
parent
be29ff9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
15 deletions
+5
-15
src/main/java/org/b3log/solo/processor/console/StaticSiteConsole.java
...a/org/b3log/solo/processor/console/StaticSiteConsole.java
+5
-15
No files found.
src/main/java/org/b3log/solo/processor/console/StaticSiteConsole.java
View file @
e9200f95
...
...
@@ -49,7 +49,7 @@ import java.util.List;
* Static site console request processing. HTML 静态站点生成 https://github.com/88250/solo/issues/19
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.0.
0.0, Feb 9
, 2020
* @version 2.0.
1.0, Feb 27
, 2020
* @since 3.9.0
*/
@Singleton
...
...
@@ -93,18 +93,12 @@ public class StaticSiteConsole {
FileUtils
.
forceMkdir
(
new
File
(
staticSitePath
));
final
URL
u
=
new
URL
(
url
);
final
String
curScheme
=
Latkes
.
getServerScheme
();
final
String
curHost
=
Latkes
.
getServerHost
();
final
String
curPort
=
Latkes
.
getServerPort
();
// 切换至静态站点生成模式
Latkes
.
setServerScheme
(
u
.
getProtocol
());
Latkes
.
setServerHost
(
u
.
getHost
());
Latkes
.
setScheme
(
u
.
getProtocol
());
Latkes
.
setHost
(
u
.
getHost
());
if
(-
1
!=
u
.
getPort
())
{
Latkes
.
set
Server
Port
(
String
.
valueOf
(
u
.
getPort
()));
Latkes
.
setPort
(
String
.
valueOf
(
u
.
getPort
()));
}
else
{
Latkes
.
set
Server
Port
(
""
);
Latkes
.
setPort
(
""
);
}
Solos
.
GEN_STATIC_SITE
=
true
;
...
...
@@ -129,10 +123,6 @@ public class StaticSiteConsole {
genFile
(
"robots.txt"
);
genFile
(
"CHANGE_LOGS.md"
);
// 恢复之前的动态运行模式
Latkes
.
setServerScheme
(
curScheme
);
Latkes
.
setServerHost
(
curHost
);
Latkes
.
setServerPort
(
curPort
);
Solos
.
GEN_STATIC_SITE
=
false
;
LOGGER
.
log
(
Level
.
INFO
,
"Static site generated [dir="
+
staticSitePath
+
"]"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment