aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers/Site.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Site.java')
-rw-r--r--src/main/java/com/juick/www/controllers/Site.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java
index 49736a60..2a1c89ae 100644
--- a/src/main/java/com/juick/www/controllers/Site.java
+++ b/src/main/java/com/juick/www/controllers/Site.java
@@ -33,7 +33,6 @@ import jakarta.servlet.http.HttpSession;
import com.juick.service.*;
import com.juick.util.MessageUtils;
import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.Pair;
import org.apache.commons.text.StringEscapeUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
@@ -50,7 +49,6 @@ import javax.inject.Inject;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
@@ -289,7 +287,7 @@ public class Site {
String head = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + user.getName()
+ "\" href=\"//rss.juick.com/" + user.getName() + "/blog\"/>";
head += "<meta name=\"Description\" content=\"" + title + "\" />\n";
- if (paramTag != null && tagService.getTagNoIndex(paramTag.getId())) {
+ if (paramTag != null && tagService.getTag(paramTag.getId()).isNotIndexed()) {
head += "<meta name=\"robots\" content=\"noindex,nofollow\"/>";
} else if (before > 0 || paramShow != null) {
head += "<meta name=\"robots\" content=\"noindex\"/>";
@@ -435,7 +433,7 @@ public class Site {
}
String head = StringUtils.EMPTY;
- if (tagService.getTagNoIndex(paramTag.getId())) {
+ if (tagService.getTag(paramTag.getId()).isNotIndexed()) {
head = "<meta name=\"robots\" content=\"noindex,nofollow\"/>";
} else if (before > 0 || mids.size() < 5) {
head = "<meta name=\"robots\" content=\"noindex\"/>";