Skip to content

Commit

Permalink
skip saving flickr image if already exists (#206)
Browse files Browse the repository at this point in the history
* skip saving flickr image if already exists

* upd README.md

* readme: note about flickr

* fix 02-download-page.spec.ts

* fix tests

* tests: fix Reports locator

* add level 4 to sidebar

* move stripe styles to stripe.sass
  • Loading branch information
sleeping-h authored Mar 4, 2024
1 parent 932e142 commit 7a5a137
Show file tree
Hide file tree
Showing 121 changed files with 214 additions and 180 deletions.
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ to see if it is suitable for publication on our site.
./fetch_feeds.py --flickr=yes
```

Flickr parsing creates new files and md pages with param `draft: true`. It can be changed to `false` after manual verification. The script will not overwrite the changes. Pictures with `draft: false` will appear on /product/overview/maps/ and /product/overview/screenshots/.

This script is run nightly as a github action (see .github/workflows/update-feeds.yml).

## Search Functionality
Expand All @@ -145,6 +147,14 @@ The site needs to work in production, where the links of the site are all below

**Note:** We do not use a leading slash, only an ending slash.

## Styles (SASS/CSS)

SASS for most components is stored in themes/hugo-bulma-blocks-theme/assets/sass/bulma/components/

Some common styles are places in themes/hugo-bulma-blocks-theme/assets/sass/style.sass - this file is compiled as hugo template, hence has access to config.toml variables and hugo macroses

Also some bulma theme overrides are placed in themes/hugo-bulma-blocks-theme/assets/css/custom.css

## 📁 File naming conventions

* Separate words in file names with hyphens e.g. windows-download.md
Expand All @@ -167,7 +177,10 @@ We welcome your contributions! All contributors are expected to sign a contribut

## 🏠 Editing the landing (home) page

The ``content/_index.md`` is the content for the landing page. Just edit whatever you like there. The blocks shortcodes are described below.
The layout of the landing page is themes/hugo-bulma-blocks-theme/layouts/index.html: the main page has many diverse blocks, that are not used anywhere else, hence its content is mostly in the partials.

The ``content/_index.md`` contains the front matter of the page and the contents for the `feature` shortcodes. Just edit whatever you like there. The blocks shortcodes are described [here](https://github.com/qgis/QGIS-Hugo/blob/main/docs/shortcodes.md)


## 📃 Adding a top level page

Expand All @@ -189,6 +202,8 @@ markdown as ```/img/foo.png```.

The site uses a number of shortcodes to create reusable blocks of content. These are defined in the ```themes/hugo-bulma-blocks-theme/layouts/shortcodes/``` folder.

The shortcodes with screenshots are described [here](https://github.com/qgis/QGIS-Hugo/blob/main/docs/shortcodes.md)

<!-- 3rd level header with icon with title Reusable header web component -->
### Reusable header web component

Expand Down Expand Up @@ -271,15 +286,17 @@ Notes:
Bulk redirects can be done like

```
location ~ ^/[A-Za-z-]+/site/about/case_studies/(.*).html {
rewrite ^/[A-Za-z-]+/site/about/case_studies/(.*).html /product/case-studies/$1/ permanent;
}
location ~ ^/[A-Za-z-]+/site/forusers/visualchangelog(.*)/index.html {
rewrite ^/[A-Za-z-]+/site/forusers/visualchangelog(.*)/index.html /product/visual-changelogs/visualchangelog$1/ permanent;
map $url $new_url {
...
^/[A-Za-z-]+/site/about/case_studies/(.*).html /product/case-studies/$1/;
^/[A-Za-z-]+/site/forusers/visualchangelog(.*)/index.html /product/visual-changelogs/visualchangelog$1/;
^/[A-Za-z-]+/site/forusers/usergroups.html /community/organisation/groups/;
...
}
```

See [nginx map tutorial](https://gauravswaroop.medium.com/nginx-bulk-url-redirect-with-map-47c2cd6ad50a) and [examples with regex capture](https://dzone.com/articles/about-using-regexp-in-nginx-map)

## Stripe donations

main donation page: [https://qgis.github.io/QGIS-Hugo/funding/donate/](https://qgis.github.io/QGIS-Hugo/funding/donate/)
Expand All @@ -288,6 +305,10 @@ Stripe widget can be included to any page with the shortcode `{{<stripe-widget>}

Payment options are implemented with [Payment Links](https://docs.stripe.com/no-code/payment-links). Values and links can be updated in data/stripe_products.yml

### Donors scraping

Is not ported yet. Donors are stored in data/donors.json. [adddonor.pl](https://github.com/qgis/QGIS-Website/blob/master/scripts/adddonor.pl) and related scripts & webhooks should be adapted to the new format

## Auto-checking for broken links

```
Expand Down
2 changes: 1 addition & 1 deletion content/flickr-images/25796687067_124027ab7b_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "3"
image: "25796687067_124027ab7b_b.jpg.jpg"
date: "2018-03-07"
link: "https://live.staticflickr.com/4706/25796687067_124027ab7b_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/27601321077_94b74dae0a_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Venues in Helsinki"
image: "27601321077_94b74dae0a_b.jpg.jpg"
date: "2018-05-31"
link: "https://live.staticflickr.com/1744/27601321077_94b74dae0a_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/27634645378_d79d1a8f0a_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Working With QGIS"
image: "27634645378_d79d1a8f0a_b.jpg.jpg"
date: "2018-04-16"
link: "https://live.staticflickr.com/797/27634645378_d79d1a8f0a_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/27634646058_558ed9f3bf_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Working With QGIS"
image: "27634646058_558ed9f3bf_b.jpg.jpg"
date: "2018-04-16"
link: "https://live.staticflickr.com/899/27634646058_558ed9f3bf_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/28097501817_022c83ecc9_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "QGIS & SVG ranks Emojione"
image: "28097501817_022c83ecc9_b.jpg.jpg"
date: "2018-06-23"
link: "https://live.staticflickr.com/1800/28097501817_022c83ecc9_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/29105600222_e08487065c_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Local Flows - Arrow Styling in QGIS 2.16"
image: "29105600222_e08487065c_b.jpg.jpg"
date: "2016-08-25"
link: "https://live.staticflickr.com/8458/29105600222_e08487065c_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/33648104655_9a8c9ec90a_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Mount Everest versus Mont Blanc"
image: "33648104655_9a8c9ec90a_b.jpg.jpg"
date: "2017-03-25"
link: "https://live.staticflickr.com/2945/33648104655_9a8c9ec90a_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/33833955444_b02df025ba_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "3dGeology"
image: "33833955444_b02df025ba_b.jpg.jpg"
date: "2017-05-15"
link: "https://live.staticflickr.com/4190/33833955444_b02df025ba_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/34591075792_3979900661_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "PAT"
image: "34591075792_3979900661_b.jpg.jpg"
date: "2017-05-19"
link: "https://live.staticflickr.com/4186/34591075792_3979900661_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/34610619895_2233519668_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Qgis - Editing Symbols"
image: "34610619895_2233519668_b.jpg.jpg"
date: "2017-05-12"
link: "https://live.staticflickr.com/4168/34610619895_2233519668_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/34775119651_116544e6ec_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "US-SpyHut-1"
image: "34775119651_116544e6ec_b.jpg.jpg"
date: "2017-05-26"
link: "https://live.staticflickr.com/4224/34775119651_116544e6ec_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/34826091952_10292040c4_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Mobility patterns"
image: "34826091952_10292040c4_b.jpg.jpg"
date: "2017-05-30"
link: "https://live.staticflickr.com/4224/34826091952_10292040c4_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/39607529780_d3bbbe1a56_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Finding My Way"
image: "39607529780_d3bbbe1a56_b.jpg.jpg"
date: "2018-04-12"
link: "https://live.staticflickr.com/895/39607529780_d3bbbe1a56_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/39642970622_94a3a2281f_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Raster Tanaka Contours in QGIS"
image: "39642970622_94a3a2281f_b.jpg.jpg"
date: "2018-01-13"
link: "https://live.staticflickr.com/4658/39642970622_94a3a2281f_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/39758150430_daf5e3357b_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Working With QGIS"
image: "39758150430_daf5e3357b_b.jpg.jpg"
date: "2018-04-19"
link: "https://live.staticflickr.com/901/39758150430_daf5e3357b_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/39772322495_f8762e942d_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "1"
image: "39772322495_f8762e942d_b.jpg.jpg"
date: "2018-03-07"
link: "https://live.staticflickr.com/4771/39772322495_f8762e942d_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/40127557070_6e039c85ac_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "DataTable To SHP Layer"
image: "40127557070_6e039c85ac_b.jpg.jpg"
date: "2018-05-06"
link: "https://live.staticflickr.com/943/40127557070_6e039c85ac_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/40625245812_20cdb9afd4_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "2"
image: "40625245812_20cdb9afd4_b.jpg.jpg"
date: "2018-03-07"
link: "https://live.staticflickr.com/4757/40625245812_20cdb9afd4_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/41413898674_bc25336853_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "... And The Answer is: Err, *Probably* Not"
image: "41413898674_bc25336853_b.jpg.jpg"
date: "2018-05-15"
link: "https://live.staticflickr.com/951/41413898674_bc25336853_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/41525473522_3317c8c2be_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Working With QGIS"
image: "41525473522_3317c8c2be_b.jpg.jpg"
date: "2018-04-19"
link: "https://live.staticflickr.com/871/41525473522_3317c8c2be_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/41935172781_4c592c3a34_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "DataTable To SHP Layer"
image: "41935172781_4c592c3a34_b.jpg.jpg"
date: "2018-05-06"
link: "https://live.staticflickr.com/967/41935172781_4c592c3a34_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/42565210515_16650cb6d4_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Visualisation of all civil flights over Ireland on 22th of May 2018 from
image: "42565210515_16650cb6d4_b.jpg.jpg"
date: "2018-07-17"
link: "https://live.staticflickr.com/1762/42565210515_16650cb6d4_b.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/42809689140_0d3572345b_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "L’importanza commerciale del territorio #TradaValue"
image: "42809689140_0d3572345b_b.jpg.jpg"
date: "2018-09-11"
link: "https://live.staticflickr.com/1866/42809689140_0d3572345b_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/43001040485_008835aaaa_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "uso_cobertura_Brasil"
image: "43001040485_008835aaaa_b.jpg.jpg"
date: "2018-08-07"
link: "https://live.staticflickr.com/1819/43001040485_008835aaaa_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/45686093281_a90e54849a_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Quick N' Dirty Terrain / Topo Shading V2"
image: "45686093281_a90e54849a_b.jpg.jpg"
date: "2018-11-02"
link: "https://live.staticflickr.com/4856/45686093281_a90e54849a_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/48685270827_7030b49860_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Southern Mexico Ethnolinguistic Mapping"
image: "48685270827_7030b49860_b.jpg.jpg"
date: "2019-09-05"
link: "https://live.staticflickr.com/65535/48685270827_7030b49860_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/48833946281_2605a44cf8_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Map of the Alps"
image: "48833946281_2605a44cf8_b.jpg.jpg"
date: "2019-10-02"
link: "https://live.staticflickr.com/65535/48833946281_2605a44cf8_b.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/49085983771_ed68d268c8_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "River Catchment"
image: "49085983771_ed68d268c8_b.jpg.jpg"
date: "2019-11-18"
link: "https://live.staticflickr.com/65535/49085983771_ed68d268c8_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
2 changes: 1 addition & 1 deletion content/flickr-images/50746721948_c939c1b745_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Deep in the Inner Hebrides"
image: "50746721948_c939c1b745_b.jpg.jpg"
date: "2020-12-22"
link: "https://live.staticflickr.com/65535/50746721948_c939c1b745_b.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/50913395008_8ff153e1ac_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Sal (Cape Verde) Topographic Map"
image: "50913395008_8ff153e1ac_b.jpg.jpg"
date: "2021-02-06"
link: "https://live.staticflickr.com/65535/50913395008_8ff153e1ac_b.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51163930404_3c956edc8b_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Agriculture in Europe"
image: "51163930404_3c956edc8b_b.jpg.jpg"
date: "2014-10-05"
link: "https://live.staticflickr.com/65535/51163930404_3c956edc8b_b.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51370508076_89c0ed84e1_z.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "TOPOGRAFICA - CAPITAIS DO BRASIL - BRASÍLIA - DF (Distrito Federal)"
image: "51370508076_89c0ed84e1_z.jpg.jpg"
date: "2021-08-11"
link: "https://live.staticflickr.com/65535/51370508076_89c0ed84e1_z.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51370509071_d86aeb5aa2_z.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "TOPOGRAFICA - CAPITAIS DO BRASIL - SÃO PAULO - SP"
image: "51370509071_d86aeb5aa2_z.jpg.jpg"
date: "2021-08-11"
link: "https://live.staticflickr.com/65535/51370509071_d86aeb5aa2_z.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51371232874_668fbdef27_z.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "TOPOGRAFICA - CAPITAIS DO BRASIL - FLORIANÓPOLIS - SC (Santa Catarina)"
image: "51371232874_668fbdef27_z.jpg.jpg"
date: "2021-08-11"
link: "https://live.staticflickr.com/65535/51371232874_668fbdef27_z.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51371237979_3b2e533df3_z.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "TOPOGRAFICA - CAPITAIS DO BRASIL - CURITIBA - PR (Paraná)"
image: "51371237979_3b2e533df3_z.jpg.jpg"
date: "2021-08-11"
link: "https://live.staticflickr.com/65535/51371237979_3b2e533df3_z.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51371240209_91d642dbfd_z.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "TOPOGRAFICA - CAPITAIS DO BRASIL - RIO DE JANEIRO - RJ"
image: "51371240209_91d642dbfd_z.jpg.jpg"
date: "2021-08-11"
link: "https://live.staticflickr.com/65535/51371240209_91d642dbfd_z.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51418386808_8822b63ddc_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Gallatin Valley, Montana"
image: "51418386808_8822b63ddc_b.jpg.jpg"
date: "2021-09-01"
link: "https://live.staticflickr.com/65535/51418386808_8822b63ddc_b.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51549865720_5fce390ae8_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Ötztal glacier extends 1893 and 2020"
image: "51549865720_5fce390ae8_b.jpg.jpg"
date: "2014-10-05"
link: "https://live.staticflickr.com/65535/51549865720_5fce390ae8_b.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51735108603_ba293dde21_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "Whaletrack: tracking the migration of humpback whales in the NE Atlantic
image: "51735108603_ba293dde21_b.jpg.jpg"
date: "2021-12-09"
link: "https://live.staticflickr.com/65535/51735108603_ba293dde21_b.jpg"
draft: "true"
draft: "false"
showcase: "map"
---
2 changes: 1 addition & 1 deletion content/flickr-images/51759940337_93be764c42_b.jpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: "QGIS - TreeJS - XYZ Metaverse map"
image: "51759940337_93be764c42_b.jpg.jpg"
date: "2021-12-21"
link: "https://live.staticflickr.com/65535/51759940337_93be764c42_b.jpg"
draft: "true"
draft: "false"
showcase: "screenshot"
---
Loading

0 comments on commit 7a5a137

Please sign in to comment.