Skip to content

Commit b568612

Browse files
authored
Merge pull request #3 from mkdocs/require-homepage
Add require_homepage option
2 parents 96b117d + 4cf2ecd commit b568612

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,11 @@ The configuration example above changes the default configuration to show all pr
476476
<td>Project will be hidden if it has a less stars on GitHub.</td>
477477
<td><code>100</code></td>
478478
</tr>
479+
<tr>
480+
<td><code>require_homepage</code></td>
481+
<td>If <code>True</code>, all projects without a detected homepage will be hidden.</td>
482+
<td><code>True</code></td>
483+
</tr>
479484
<tr>
480485
<td><code>require_license</code></td>
481486
<td>If <code>True</code>, all projects without a detected license will be hidden.</td>

src/best_of/default_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ def prepare_configuration(cfg: dict) -> Dict:
2828
if "min_stars" not in config:
2929
config.min_stars = 100
3030

31+
if "require_homepage" not in config:
32+
config.require_homepage = True
33+
3134
if "require_license" not in config:
3235
config.require_license = True
3336

src/best_of/projects_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def apply_filters(project_info: Dict, configuration: Dict) -> None:
394394
project_info.show = False
395395
return
396396

397-
if not project_info.homepage:
397+
if not project_info.homepage and configuration.require_homepage:
398398
log.info(f"Could not find a valid homepage for {project_info.name}")
399399
project_info.show = False
400400

0 commit comments

Comments
 (0)