Skip to content

Commit

Permalink
🩹 修改生成站点地图信息时排除导航中的站外链接
Browse files Browse the repository at this point in the history
  • Loading branch information
iTanken authored and 88250 committed Jan 17, 2022
1 parent bacc9c9 commit 8944c2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/b3log/solo/processor/SitemapProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ private void addNavigations(final Sitemap sitemap) throws Exception {
if (!permalink.contains("://")) {
url.setLoc(Latkes.getServePath() + permalink);
} else {
if (!permalink.startsWith(Latkes.getServePath())) {
// Non-station link
continue;
}
url.setLoc(permalink);
}
sitemap.addURL(url);
Expand Down

0 comments on commit 8944c2f

Please sign in to comment.