Skip to content

Commit

Permalink
add manual entry about url checker
Browse files Browse the repository at this point in the history
+ fix CI
+add details in render
  • Loading branch information
vincent-peugnet committed Nov 26, 2024
1 parent 7feea33 commit 5aff7ee
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
25 changes: 24 additions & 1 deletion MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,23 @@ During the render process, some semantic datas are added to the __HTML classes o
- `public`, `private`, `not_published` if page exist, indicate it's [privacy](#privacy) level
- `current_page` the link point to the current page


#### URL checker

If this option is activated in admin panel, W can verify if external links are still working. If a link have been checked, a class is added to the link:

- `ok` if the url is considered as working
- `dead` if the url seems to be dead

URL check is done every time a page is displayed, if the page has been edited and new urls have been added.

Status of all checked URLs is stored in cache and stay valid during 90 days.

To avoid taking to much time, if a lot of links have been added or need to be re-checked: all links may not be processed at once. The rest will be checked the next time the page is displayed.




#### CSS examples

To color in red internal links to page that does not exist:
Expand All @@ -173,7 +190,13 @@ Add a symbol after external links:

```css
a.external::after {
content: "";
content: "";
}
```

```css
a.dead::after {
content: " ☠️";
}
```

Expand Down
2 changes: 1 addition & 1 deletion RENDER.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ flowchart TD
```

- *every link: rendering option that transform every word as a link
- *HTML tag: rendering option that does not print Element's corresponding HTML tags
- *HTML tag: [rendering option](MANUAL.md#html-tags) that does not print Element's corresponding HTML tags (only for pages V1)



Expand Down
6 changes: 5 additions & 1 deletion app/class/Controllerhome.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,11 @@ public function multirender(): void
$count = 0;
foreach ($pagelist as $page) {
try {
$page = $this->pagemanager->renderpage($page, $this->router, Config::urlchecker() ? new Serviceurlchecker(0) : 0);
$page = $this->pagemanager->renderpage(
$page,
$this->router,
Config::urlchecker() ? new Serviceurlchecker(0) : 0
);
if ($this->pagemanager->update($page)) {
$count++;
}
Expand Down

0 comments on commit 5aff7ee

Please sign in to comment.