Skip to content

Commit 068058c

Browse files
committed
📖
1 parent f01e147 commit 068058c

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

docs/Basics/Configuration-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ The file storage root path (requires permissions 0777)
9898
The length of the PKCE challenge verifier (43-128 characters)
9999

100100

101-
**See also:**
101+
**Links:**
102102

103103
- [datatracker.ietf.org/doc/html/rfc7636#section-4.1](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1)
104104

docs/Development/Create-provider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Mastodon extends OAuth2Provider{
9292
## Informational values
9393

9494
In order to automatically create the fancy table under [supported providers](../Basics/Overview.md#supported-providers),
95-
a provider class can implement the following informational properties (that can be accessed via magic `__get()`):
95+
a provider class can implement the following informational properties:
9696

9797
- `$apiDocs` - a link to the API documentation for this service
9898
- `$applicationURL` - links to the OAuth application page, where a developer can obtain (or apply for) credentials

docs/oauth-options-doc.php

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
array_shift($lines);
3636
array_pop($lines);
3737

38-
$see = [];
38+
$see = [];
39+
$link = [];
3940

4041
foreach($lines as $line){
4142

@@ -55,6 +56,13 @@
5556
continue;
5657
}
5758

59+
// collect links for "links"
60+
if(str_starts_with($line, '@link')){
61+
$link[] = $line;
62+
63+
continue;
64+
}
65+
5866
$content[] = $line;
5967
}
6068

@@ -88,6 +96,28 @@
8896

8997
}
9098

99+
if(!empty($link)){
100+
$content[] = "\n**Links:**\n";
101+
102+
foreach($link as $line){
103+
$line = substr($line, 6); // cut off the "@link "
104+
105+
// skip non-url
106+
if(!str_starts_with($line, 'http')){
107+
continue;
108+
}
109+
110+
$url = explode(' ', $line, 2);
111+
112+
$content[] = match(count($url)){
113+
1 => sprintf('- [%s](%s)', explode('://', $url[0])[1], $url[0]),
114+
2 => sprintf('- [%s](%s)', trim($url[1]), $url[0]),
115+
};
116+
117+
}
118+
119+
}
120+
91121
$content[] = "\n";
92122
}
93123

0 commit comments

Comments
 (0)