Skip to content

Commit

Permalink
SEO and manuals: add viewport and page language (OSGeo#2591)
Browse files Browse the repository at this point in the history
This PR addresses OSGeo#2589 (SEO problems on mobile devices):
- Google: addresses "Page isn't usable on mobile" - "Viewport not set"
    - https://search.google.com/search-console/mobile-usability?resource_id=http%3A%2F%2Fgrass.osgeo.org%2F&hl=en
    - see: https://support.google.com/webmasters/answer/9063469#viewport_not_configured
- Bing: addresses "The page is missing meta language information"
    - https://www.bing.com/webmasters/seoreports?siteUrl=https%3A%2F%2Fgrass.osgeo.org%2F&ruleId=39

Manual pages generated with this PR applied are validated correctly at https://validator.w3.org/
  • Loading branch information
neteler committed Nov 7, 2023
1 parent a4e0952 commit 756d2c4
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 9 deletions.
2 changes: 2 additions & 0 deletions REQUIREMENTS.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>REQUIREMENTS to compile GRASS GIS 8</title>
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="content-language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="#FFFFFF">

Expand Down
6 changes: 4 additions & 2 deletions db/drivers/mysql/grass-mesql.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<html>
<head>
<title>GRASS-MySQL embedded driver - GRASS GIS manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="content-language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white">

Expand Down
6 changes: 4 additions & 2 deletions general/g.setproj/g.setproj.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<html>
<head>
<title>g.setproj - GRASS GIS manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="content-language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white">

Expand Down
8 changes: 7 additions & 1 deletion lib/gis/parser_html.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
\brief GIS Library - Argument parsing functions (HTML output)
(C) 2001-2009, 2011-2020 by the GRASS Development Team
(C) 2001-2022 by the GRASS Development Team
This program is free software under the GNU General Public License
(>=v2). Read the file COPYING that comes with GRASS for details.
Expand Down Expand Up @@ -45,6 +45,12 @@ void G__usage_html(void)
fprintf(stdout, "<html>\n<head>\n");
fprintf(stdout,
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n");
fprintf(stdout,
" <meta name=\"Author\" content=\"GRASS Development Team\">\n");
fprintf(stdout,
" <meta http-equiv=\"content-language\" content=\"en-us\">\n");
fprintf(stdout,
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n");
fprintf(stdout, " <title>%s - GRASS GIS manual</title>\n", st->pgm_name);
fprintf(stdout, " <meta name=\"description\" content=\"%s", st->pgm_name);
if (st->module_info.description)
Expand Down
2 changes: 2 additions & 0 deletions man/build_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>${title} - GRASS GIS Manual</title>
<meta name="Author" content="GRASS Development Team">
<meta http-equiv="content-language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1">
"""
)

Expand Down
6 changes: 4 additions & 2 deletions raster/r.li/r.li.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<html>
<head>
<title>r.li - GRASS GIS manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="content-language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white">
<div id="container">
Expand Down
2 changes: 2 additions & 0 deletions utils/mkhtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ def get_last_git_commit(src_dir, addon_path, is_addon):
<meta name="Author" content="GRASS Development Team">
<meta name="description" content="${PGM}: ${PGM_DESC}">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="content-language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white">
<div id="container">
Expand Down
6 changes: 4 additions & 2 deletions utils/module_synopsis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,10 @@ cat <<EOF >"${TMP}.html"
<html>
<head>
<title>$(g.version | cut -f1 -d'(') Command list</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="content-language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white">
Expand Down

0 comments on commit 756d2c4

Please sign in to comment.