Bug 26454

Summary: Add system preference to set meta description for the OPAC
Product: Koha Reporter: Timothy Alexis Vass <timothy_alexis.vass>
Component: OPACAssignee: Timothy Alexis Vass <timothy_alexis.vass>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, lucas, martin.renvoize
Version: master   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Functionality to add meta description tag with content with the system preference OpacMetaDescription. This is used by search engines to add a description to the library in search results.
Version(s) released in:
20.11.00
Attachments: Bug 26454: Add system preference to set meta description for the OPAC
Bug 26454: Add system preference to set meta description for the OPAC
Bug 26454: Add system preference to set meta description for the OPAC
Bug 26454: Add system preference to set meta description for the OPAC
Bug 26454: Add system preference to set meta description for the OPAC
Bug 26454: Add system preference to set meta description for the OPAC

Description Timothy Alexis Vass 2020-09-14 11:52:32 UTC
Websites should have a meta description tag that shows in search engine results.
<meta name="description" content="This description will show in search engine results." />

It needs to be added to koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc

The content should also be available as a system preference.
Comment 1 Timothy Alexis Vass 2020-09-16 11:58:40 UTC Comment hidden (obsolete)
Comment 2 Timothy Alexis Vass 2020-09-16 12:05:46 UTC Comment hidden (obsolete)
Comment 3 Timothy Alexis Vass 2020-09-17 07:52:08 UTC Comment hidden (obsolete)
Comment 4 Timothy Alexis Vass 2020-09-17 07:52:55 UTC Comment hidden (obsolete)
Comment 5 Magnus Enger 2020-09-17 08:06:37 UTC
Created attachment 110241 [details] [review]
Bug 26454: Add system preference to set meta description for the OPAC

Websites should have a meta description tag that shows in search engine results.
The content should also be available to set as a system preference.

To test:
1) Look at opac-main source (in the browser) and see that meta name="description" is missing.
2) Apply patch.
3) Run: perl installer/data/mysql/updatedatabase.pl
4) Go to system preferences > OPAC and add a description to OpacMetaDescription.
5) Look at opac-main source and confirm that meta name="description" now has content equal to the text set in the OpacMetaDescription system preference.
6) Sign off.

Sponsored by: Lunds University Libraries

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Newlines are preserved. Double quote is rendered
as &quot;. Nice enhancement!
Comment 6 Martin Renvoize 2020-09-17 08:16:05 UTC
Created attachment 110247 [details] [review]
Bug 26454: Add system preference to set meta description for the OPAC

Websites should have a meta description tag that shows in search engine results.
The content should also be available to set as a system preference.

To test:
1) Look at opac-main source (in the browser) and see that meta name="description" is missing.
2) Apply patch.
3) Run: perl installer/data/mysql/updatedatabase.pl
4) Go to system preferences > OPAC and add a description to OpacMetaDescription.
5) Look at opac-main source and confirm that meta name="description" now has content equal to the text set in the OpacMetaDescription system preference.
6) Sign off.

Sponsored by: Lunds University Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Newlines are preserved. Double quote is rendered
as &quot;. Nice enhancement!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2020-09-17 08:16:29 UTC
Nice enhancements, works well, no QA failures.

Passing QA
Comment 8 Jonathan Druart 2020-10-01 09:45:50 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 9 Lucas Gass 2020-10-20 17:32:11 UTC
enhancement will not be backported to 20.05.x