Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,11 @@ The configuration example above changes the default configuration to show all pr
<td>Projects with fewer stars than the specified threshold will be hidden.</td>
<td><code>100</code></td>
</tr>
<tr>
<td><code>require_homepage</code></td>
<td>If <code>True</code>, all projects without a detected homepage will be hidden.</td>
<td><code>True</code></td>
</tr>
<tr>
<td><code>require_license</code></td>
<td>If <code>True</code>, all projects without a detected license will be hidden.</td>
Expand Down
3 changes: 3 additions & 0 deletions src/best_of/default_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def prepare_configuration(cfg: dict) -> Dict:
if "min_stars" not in config:
config.min_stars = 100

if "require_homepage" not in config:
config.require_homepage = True

if "require_license" not in config:
config.require_license = True

Expand Down
2 changes: 1 addition & 1 deletion src/best_of/generators/markdown_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def generate_license_info(project: Dict, configuration: Dict) -> Tuple[str, int]
licenses_url = licenses_name
licenses_name = "Custom"
else:
licenses_url = "https://tldrlegal.com/search?q=" + urllib.parse.quote(
licenses_url = "https://tldrlegal.com/search?query=" + urllib.parse.quote(
project.license
)
license_metadata = get_license(licenses_name)
Expand Down
2 changes: 1 addition & 1 deletion src/best_of/projects_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def apply_filters(project_info: Dict, configuration: Dict) -> None:
project_info.show = False
return

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

Expand Down