Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
401
Merge Requests
66
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
de34bd78
Commit
de34bd78
authored
9 minutes ago
by
Mark Harding
Browse files
Options
Download
(chore): robot rules for low interaction posts
parent
6822f8c9
master
No related merge requests found
Pipeline
#118016893
canceled with stages
in 4 minutes and 1 second
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
5 deletions
+26
-5
src/app/common/services/meta.service.ts
View file @
de34bd78
...
...
@@ -6,6 +6,7 @@ import { ConfigsService } from './configs.service';
const
DEFAULT_META_TITLE
=
'
Minds
'
;
const
DEFAULT_META_DESCRIPTION
=
'
...
'
;
export
const
MIN_METRIC_FOR_ROBOTS
=
5
;
@
Injectable
()
export
class
MetaService
{
...
...
This diff is collapsed.
src/app/modules/blogs/view/infinite.ts
View file @
de34bd78
...
...
@@ -10,7 +10,10 @@ import { AnalyticsService } from '../../../services/analytics';
import
{
MindsBlogResponse
}
from
'
../../../interfaces/responses
'
;
import
{
MindsBlogEntity
}
from
'
../../../interfaces/entities
'
;
import
{
ConfigsService
}
from
'
../../../common/services/configs.service
'
;
import
{
MetaService
}
from
'
../../../common/services/meta.service
'
;
import
{
MetaService
,
MIN_METRIC_FOR_ROBOTS
,
}
from
'
../../../common/services/meta.service
'
;
@
Component
({
selector
:
'
m-blog-view-infinite
'
,
...
...
@@ -125,6 +128,9 @@ export class BlogViewInfinite {
.
setDescription
(
description
)
//.setAuthor(this.blog.custom_meta['author'] || `@${this.blog.ownerObj.username}`)
.
setOgUrl
(
blog
.
perma_url
)
.
setOgImage
(
blog
.
thumbnail_src
);
.
setOgImage
(
blog
.
thumbnail_src
)
.
setRobots
(
blog
[
'
thumbs:up:count
'
]
>=
MIN_METRIC_FOR_ROBOTS
?
'
all
'
:
'
noindex
'
);
}
}
This diff is collapsed.
src/app/modules/channels/channel.component.ts
View file @
de34bd78
...
...
@@ -18,7 +18,10 @@ import { DialogService } from '../../common/services/confirm-leave-dialog.servic
import
{
BlockListService
}
from
'
../../common/services/block-list.service
'
;
import
{
ChannelSortedComponent
}
from
'
./sorted/sorted.component
'
;
import
{
ClientMetaService
}
from
'
../../common/services/client-meta.service
'
;
import
{
MetaService
}
from
'
../../common/services/meta.service
'
;
import
{
MetaService
,
MIN_METRIC_FOR_ROBOTS
,
}
from
'
../../common/services/meta.service
'
;
import
{
ConfigsService
}
from
'
../../common/services/configs.service
'
;
@
Component
({
...
...
@@ -133,7 +136,12 @@ export class ChannelComponent {
width
:
2000
,
height
:
1000
,
});
this
.
metaService
.
setRobots
(
this
.
user
.
is_mature
?
'
noindex
'
:
'
all
'
);
this
.
metaService
.
setRobots
(
this
.
user
.
is_mature
||
this
.
user
[
'
subscribers_count
'
]
>
MIN_METRIC_FOR_ROBOTS
?
'
noindex
'
:
'
all
'
);
}
else
if
(
this
.
username
)
{
this
.
metaService
.
setTitle
(
this
.
username
);
}
else
{
...
...
This diff is collapsed.
src/app/modules/newsfeed/single/single.component.ts
View file @
de34bd78
...
...
@@ -10,7 +10,10 @@ import { EntitiesService } from '../../../common/services/entities.service';
import
{
Client
}
from
'
../../../services/api/client
'
;
import
{
FeaturesService
}
from
'
../../../services/features.service
'
;
import
{
ClientMetaService
}
from
'
../../../common/services/client-meta.service
'
;
import
{
MetaService
}
from
'
../../../common/services/meta.service
'
;
import
{
MetaService
,
MIN_METRIC_FOR_ROBOTS
,
}
from
'
../../../common/services/meta.service
'
;
import
{
ConfigsService
}
from
'
../../../common/services/configs.service
'
;
@
Component
({
...
...
@@ -166,6 +169,9 @@ export class NewsfeedSingleComponent {
?
activity
.
custom_data
[
0
][
'
src
'
]
:
activity
.
thumbnail_src
,
{
width
:
2000
,
height
:
1000
}
)
.
setRobots
(
activity
[
'
thumbs:up:count
'
]
>=
MIN_METRIC_FOR_ROBOTS
?
'
all
'
:
'
noindex
'
);
if
(
activity
.
custom_type
===
'
video
'
)
{
...
...
This diff is collapsed.
Please
register
or
sign in
to comment