Skip to content
ActivityPub object

comments.config.models

PageActorConfiguration

Bases: BaseModel

Configuration for the Service actor

Parameters:

Name Type Description Default
name str

Name of the actor

required
handle str

Will be used to construct the webfinger handle of the actor. It will be of the Form acct:handle@domain

required
summary str | None

Profile description of the actor

None
icon str

Profile picture

'https://comments.bovine.social/assets/user.png'
Source code in comments/config/models.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class PageActorConfiguration(BaseModel):
    """Configuration for the Service actor"""

    name: str = Field(
        examples=["My Comment Tracking System"], description="Name of the actor"
    )
    handle: str = Field(
        examples=["handle"],
        description="Will be used to construct the webfinger handle of the actor. It will be of the Form `acct:handle@domain`",
    )
    summary: str | None = Field(
        default=None,
        examples=["I'm a helper to allow people to comment on static sites"],
        description="Profile description of the actor",
    )
    icon: str = Field(
        default=default_icon,
        description="Profile picture",
    )

PageConfiguration

Bases: BaseModel

Configuration of a page, comments are tracked for

Parameters:

Name Type Description Default
base_url str

Base url of the page

required
name str

Name given to the actor inside cattle_grid

required
path str

Path required for this actor. This means that this actor answers to all pages, whose URL starts with {base_url}/{path}

'/'
actor PageActorConfiguration | None

Configuration for the actor, if none configuration will be loaded from `{base_url}/{path}/fedi-actor.json

None
Source code in comments/config/models.py
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class PageConfiguration(BaseModel):
    """Configuration of a page, comments are tracked for"""

    base_url: str = Field(description="Base url of the page")
    name: str = Field(
        examples=["my_ages"], description="Name given to the actor inside cattle_grid"
    )
    path: str = Field(
        default="/",
        description="Path required for this actor. This means that this actor answers to all pages, whose URL starts with {base_url}/{path}",
    )

    actor: PageActorConfiguration | None = Field(
        default=None,
        description="Configuration for the actor, if none configuration will be loaded from `{base_url}/{path}/fedi-actor.json",
    )

Comments