diff --git a/CHANGELOG.md b/CHANGELOG.md index 15fe395..77a370e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Syntax highlighting for preformatted text blocks with alt text (#252, #263, [wiki page](https://github.com/makeworld-the-better-one/amfora/wiki/Source-Code-Highlighting)) - [Client certificates](https://github.com/makeworld-the-better-one/amfora/wiki/Client-Certificates) can be restricted to certain paths of a host (#115) +- `header` config option in `[subscriptions]` to allow disabling the header text on the subscriptions page (#191) ### Changed - Center text automatically, removing `left_margin` from the config (#233) diff --git a/config/config.go b/config/config.go index bcd23bc..1a1a1d9 100644 --- a/config/config.go +++ b/config/config.go @@ -263,6 +263,7 @@ func Init() error { viper.SetDefault("subscriptions.update_interval", 1800) viper.SetDefault("subscriptions.workers", 3) viper.SetDefault("subscriptions.entries_per_page", 20) + viper.SetDefault("subscriptions.header", true) viper.SetConfigFile(configPath) viper.SetConfigType("toml") diff --git a/config/default.go b/config/default.go index 08c6fc3..eade807 100644 --- a/config/default.go +++ b/config/default.go @@ -333,6 +333,9 @@ workers = 3 # The number of subscription updates displayed per page. entries_per_page = 20 +# Set to false to remove the explanatory text from the top of the subscription page +header = true + [theme] # This section is for changing the COLORS used in Amfora. diff --git a/default-config.toml b/default-config.toml index 4feac30..1a13574 100644 --- a/default-config.toml +++ b/default-config.toml @@ -330,6 +330,9 @@ workers = 3 # The number of subscription updates displayed per page. entries_per_page = 20 +# Set to false to remove the explanatory text from the top of the subscription page +header = true + [theme] # This section is for changing the COLORS used in Amfora. diff --git a/display/subscriptions.go b/display/subscriptions.go index 2bc5c78..106f3d0 100644 --- a/display/subscriptions.go +++ b/display/subscriptions.go @@ -97,9 +97,11 @@ func Subscriptions(t *tab, u string) string { } else { // Render page - rawPage += "You can use Ctrl-X to subscribe to a page, or to an Atom/RSS/JSON feed. See the online wiki for more.\n" + - "If you just opened Amfora then updates may appear incrementally. Reload the page to see them.\n\n" + - "=> about:manage-subscriptions Manage subscriptions\n\n" + if viper.GetBool("subscriptions.header") { + rawPage += "You can use Ctrl-X to subscribe to a page, or to an Atom/RSS/JSON feed. See the online wiki for more.\n" + + "If you just opened Amfora then updates may appear incrementally. Reload the page to see them.\n\n" + } + rawPage += "=> about:manage-subscriptions Manage subscriptions\n\n" // curDay represents what day of posts the loop is on. // It only goes backwards in time.