Skip to content

Commit

Permalink
download: Introduce settings for updating maintenance banner
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Jun 28, 2023
1 parent 514a67e commit ff5fc9f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ connect to the server in order to make changes.

This branch is expected to be manually pulled into the download server.

To update the maintenance page, edit [_config_download_maintenance.yml](_config_download_maintenance.yml) and submit a pull-request.

| Branch | Jekyll build configuration |
|--------|----------------------------|
| [download-maintenance-slicer-org][branch-download-maintenance-slicer-org] | `--config _config.yml,_config_download.yml,_config_download_maintenance.yml` |
Expand Down Expand Up @@ -141,6 +143,7 @@ _The following instructions assumes you have docker installed. On Windows, you m
config_opts=_config.yml,_config_dev.yml # For slicer.org
#config_opts=_config.yml,_config_download.yml,_config_dev.yml # For download.slicer.org
#config_opts=_config.yml,_config_download.yml,_config_download_maintenance.yml,_config_dev.yml # For download.slicer.org maintenance page
rm -rf /_site/*
Expand Down Expand Up @@ -183,6 +186,14 @@ See [_config_download.yml](_config_download.yml)

It is should be specified in addition of `_config.yml`.

### `_config_download_maintenance.yml`

The `_config_download_maintenance.yml` file contains settings used to generate the download site with a banner indicating
that the regular downloads are not available and will be available soon.

See [_config_download_maintenance.yml](_config_download_maintenance.yml)

It is should be specified in addition of `_config.yml` and `_config_download.yml`.

### `index.markdown`

Expand Down
9 changes: 8 additions & 1 deletion _config_download_maintenance.yml
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
slicer_download_maintenance_enabled: true
slicer_download_maintenance:
enabled: true
info_url: https://discourse.slicer.org/t/maintenance-of-download-slicer-org-slicer-kitware-com-and-slicer-packages-kitware-com-planned-for-june-27th-2023-2-00pm-to-4-00pm-et/30250
date: June 27th, 2023
start_time: 2:00 PM
end_time: 4:00 PM
duration: two hours
timezone: ET
6 changes: 3 additions & 3 deletions download.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ animated_navbar: false
Read about <a href="https://slicer.readthedocs.io/en/latest/user_guide/getting_started.html#system-requirements">system requirements</a>.
</div>

{% if site.slicer_download_maintenance_enabled %}
{% if site.slicer_download_maintenance.enabled %}
<div class="columns is-mobile is-centered has-text-centered">

<div class="column is-12">
<div class="notification is-warning">
<p class="title is-4">
We&rsquo;ll be back very soon! Scheduled maintenance happening on June 27th, 2023.
We&rsquo;ll be back very soon! Scheduled maintenance happening on {{ site.slicer_download_maintenance.date }}.
</p>
<p class="content">
Sorry for the inconvenience, but we are performing some maintenance at the moment.
If you have questions or would like to learn more, see <a href="https://discourse.slicer.org/t/maintenance-of-download-slicer-org-slicer-kitware-com-and-slicer-packages-kitware-com-planned-for-june-27th-2023-2-00pm-to-4-00pm-et/30250">here</a>, otherwise we anticipate the maintenance to last for approximately two hours, from 2:00 PM to 4:00 PM ET on June 27th, 2023.
If you have questions or would like to learn more, see <a href="{{ site.slicer_download_maintenance.info_url }}">here</a>, otherwise we anticipate the maintenance to last for approximately {{ site.slicer_download_maintenance.duration }}, from {{ site.slicer_download_maintenance.start_time }} to {{ site.slicer_download_maintenance.end_time }} {{ site.slicer_download_maintenance.timezone }} on {{ site.slicer_download_maintenance.date }}.
</p>
<p class="content">
In the meantime, explore our <a href="https://slicer.readthedocs.io/">documentation</a> for tips on how to use Slicer or join our <a href="https://discourse.slicer.org/">forum</a> to connect with other users.
Expand Down

0 comments on commit ff5fc9f

Please sign in to comment.