Skip to content

Commit

Permalink
Update docs, show only updated apps
Browse files Browse the repository at this point in the history
In the previous commit, all updated packages were shown in the sidebar,
instead of apps. This commit reverts that change, because apps are
usually more relevant to users.

It may make more sense to display recently updated packages on the page
that showcase packages, but that can be done later.
  • Loading branch information
HenkKalkwater committed Dec 25, 2023
1 parent d70de9b commit 5d1f9f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ sequenceDiagram
#### [chumweb/\_\_main\_\_.py](chumweb/__main__.py)
Contains the main function.

#### [chumweb/atom_feed.py](chumweb/atom_feed.py)
Contains functions for creating Atom feeds.

#### [chumweb/config.py](chumweb/config.py)
Contains the definitions of all settings that can be set via environment variables
or command line options.
Expand Down
6 changes: 3 additions & 3 deletions chumweb/static_site_gen.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""
This module generates the static website
"""
import dataclasses
import json
import os
import random
Expand Down Expand Up @@ -118,7 +117,7 @@ def render_template(template: Template, out_file: str | Path, **kwargs):
kwargs["chum_installer"] = "sailfishos-chum-gui-installer"
kwargs["config"] = CONFIG
kwargs["repo_version"] = repo_info.version
kwargs["recently_updated_pkgs"] = recently_updated_pkgs[:CONFIG.updated_apps_count]
kwargs["recently_updated_pkgs"] = recently_updated_apps[:CONFIG.updated_apps_count]
kwargs["feeds"] = feeds
template.stream(**kwargs).dump(str(out_file))

Expand Down Expand Up @@ -268,7 +267,7 @@ def create_package_page(pkg: Package):

render_template(pkg_template, str(out_file), pkg=pkg)

total_sitegen_steps = 5
total_sitegen_steps = 6
step_progress(sitegen_step, "Creating directory structure", 1, total_sitegen_steps)
recreate_directory_skeleton()
copy_static_dirs()
Expand Down Expand Up @@ -319,6 +318,7 @@ def create_package_page(pkg: Package):
json.dump(search_documents, packages_file)

# Write Atom feeds
step_progress(sitegen_step, "Generating atom feeds", 6, total_sitegen_steps)
for feed in feeds:
xml = create_package_atom_feed(feed.pkgs[:CONFIG.feed_updated_apps_count], feed.url, feed.title)
with open(www_path.joinpath(feed.path), "w") as atom_file:
Expand Down

0 comments on commit 5d1f9f5

Please sign in to comment.