Skip to content

Commit f2d82f9

Browse files
authored
Merge pull request #460 from plotly/seo-meta-titles-descriptions
SEO: update /graphing-libraries/ meta title and description
2 parents 1d30354 + 074db2a commit f2d82f9

8 files changed

Lines changed: 220 additions & 59 deletions

File tree

‎_includes/layouts/seo.html‎

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
{% capture language %}{% if page.language == 'plotly_js' %}JavaScript{% elsif page.language == 'ggplot2'%}ggplot2{% elsif page.language == 'f_sharp' %}F#{% elsif page.language == 'matlab' %}MATLAB{% else %}{{page.language | capitalize }}{% endif %}{% endcapture %}
33
<!-- Create a title -->
44
{% capture title %}
5-
{% if page.permalink == '/python/' or page.language == '/julia/' or page.language == '/r/' or page.language == '/ggplot2/' or page.language == '/f_sharp/' or page.language == '/matlab/' or page.language == '/javascript/' %}{{page.name}}
5+
{% if page.permalink == '/python/' %} Open Source Python Graphing &amp; Data Visualization Library | Plotly
6+
{% elsif page.language == '/julia/' or page.language == '/r/' or page.language == '/ggplot2/' or page.language == '/f_sharp/' or page.language == '/matlab/' or page.language == '/javascript/' %}{{page.name}}
67
{% elsif page.name == '404' %} 404 Page Not Found
7-
{% elsif page.permalink == '/api/' or page.permalink == '/graphing-libraries/' %} Plotly Open Source Graphing Libraries
8+
{% elsif page.permalink == '/javascript/' %} Open Source JavaScript Graphing &amp; Chart Library | Plotly
9+
{% elsif page.permalink == '/api/' or page.permalink == '/graphing-libraries/' %} Open-Source Graphing Libraries for Python &amp; JavaScript | Plotly
810
{% elsif page.name %} {{page.name | capitalize}} in {{language}}{% else %} Plotly Open Source Graphing Libraries{% endif %}
911
{% endcapture %}
1012
<!-- Count number of plots on the page -->
@@ -23,7 +25,7 @@
2325
{% if page.layout == 'langindex' %}
2426
{% capture description %}{{page.description}}{% endcapture %}
2527
{% elsif page.permalink == '/api/' or page.permalink == '/graphing-libraries/' %}
26-
{% capture description %}"Interactive charts and maps for Python, R, Julia, Javascript, ggplot2, F#, MATLAB®, and Dash."{% endcapture %}
28+
{% capture description %}"Access interactive charts and maps for Python and JavaScript, for use with Dash, Notebooks, ChatGPT, Claude, and LLMs. Graphing libraries for data analytics."{% endcapture %}
2729
{% else %}
2830
{% assign counter = 0 %}
2931
{% for code_block in code_blocks %}
@@ -42,26 +44,36 @@
4244
{% endif %}
4345

4446

47+
<!-- Normalize the captured values before they go into attributes.
48+
The capture blocks above are multi-line, so they arrive padded with
49+
newlines/indentation, and some of them wrap their text in literal double
50+
quotes to compensate for the content= attributes having been unquoted.
51+
Strip both, then quote the attributes properly below: an unquoted
52+
content= truncates the value at its first space, which is why every
53+
langindex description used to render as a single word. -->
54+
{% assign title = title | strip_newlines | strip | replace: '"', '' %}
55+
{% assign description = description | strip_newlines | strip | replace: '"', '' %}
56+
4557
<!-- SEO Tags - title, meta_description -->
4658
<title>{{title}}</title>
47-
<meta name="description" content={{description}}>
59+
<meta name="description" content="{{description}}">
4860

4961
<!-- Bing tags -->
5062
<meta name="msvalidate.01" content="D319859A832F9F1D15A7646E2A42150A" />
5163
<!-- Facebook tags -->
52-
<meta property="og:title" content={{title}}/>
64+
<meta property="og:title" content="{{title}}"/>
5365
<meta property="og:type" content="website"/>
5466
<meta property="og:image" content="{% if page.imageurl %}{{page.imageurl}}{% else %}{% if page.thumbnail%}{{site.imgurl}}{{page.thumbnail}}{%else%}https://help.plot.ly/images/twitter-default.png{% endif %}{% endif %}">
55-
<meta property="og:description" content={{description}}/>
67+
<meta property="og:description" content="{{description}}"/>
5668
<meta property="og:url" />
5769
<meta property="fb:admins" content="1123751525"/>
5870
<meta property="fb:admins" content="22418"/>
5971

6072
<!-- twitter tags -->
6173
<meta name="twitter:card" content="photo" />
62-
<meta name="twitter:title" content={{title}}/>
74+
<meta name="twitter:title" content="{{title}}"/>
6375
<meta name="twitter:url" content="{% if page.permalink %}https://plotly.com/{{page.permalink}}{% endif %}"/>
64-
<meta name="twitter:description" content={{description}}/>
76+
<meta name="twitter:description" content="{{description}}"/>
6577
<meta name="twitter:image" content="{% if page.imageurl %}{{page.imageurl}}{% else %}{% if page.thumbnail%}{{site.imgurl}}{{page.thumbnail}}{%else%}https://help.plot.ly/images/twitter-default.png{% endif %}{% endif %}">
6678
<meta name="twitter:site" content="@plotlygraphs"/>
6779

‎_includes/posts/mainlang_documentation_eg.html‎

Lines changed: 61 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{% if file_settings %}
5959
<section class="--tutorial-section">
6060
<header class="--section-header">
61-
<a href="#fundamentals" name="fundamentals" id="fundamentals">Fundamentals</a>
61+
<span name="fundamentals" id="fundamentals">Fundamentals</span>
6262

6363
{% assign forloop_idx = 0 %}
6464
{%- for page in languagelist -%}
@@ -71,6 +71,9 @@
7171
<a href="/{{language}}/plotly-fundamentals" class="langindexlink">More Fundamentals &raquo;</a>
7272
{% endif %}
7373
</header>
74+
{% if language == "python" %}
75+
<p class="--section-description">Explore step-by-step tutorials and code examples for figure structures, updating figures, displaying figures, and framework integrations to master our Python graphing library.</p>
76+
{% endif %}
7477
<section class="--grid">
7578
<ul class="--grid-list">
7679

@@ -96,7 +99,7 @@
9699
{% if chart_type %}
97100
<section class="--tutorial-section">
98101
<header class="--section-header">
99-
<a href="#basic-charts" id="basic-charts">Basic Charts</a>
102+
<span id="basic-charts">Basic Charts</span>
100103

101104
{% assign forloop_idx = 0 %}
102105
{%- for page in languagelist -%}
@@ -109,6 +112,9 @@
109112
<a href="/{{language}}/basic-charts/" class="langindexlink">More Basic Charts &raquo;</a>
110113
{% endif %}
111114
</header>
115+
{% if language == "python" %}
116+
<p class="--section-description">Find copy-pasteable code snippets and interactive demos to create standard Python charts, including scatter plots, line graphs, bar charts, pie charts, and bubble charts.</p>
117+
{% endif %}
112118
<section class="--grid">
113119
<ul class="--grid-list">
114120

@@ -135,7 +141,7 @@
135141
{% if statistical %}
136142
<section class="--tutorial-section">
137143
<header class="--section-header">
138-
<a href="#statistical-charts" id="statistical-charts">Statistical Charts</a>
144+
<span id="statistical-charts">Statistical Charts</span>
139145

140146
{% assign forloop_idx = 0 %}
141147
{%- for page in languagelist -%}
@@ -148,6 +154,9 @@
148154
<a href="/{{language}}/statistical-charts/" class="langindexlink">More Statistical Charts &raquo;</a>
149155
{% endif %}
150156
</header>
157+
{% if language == "python" %}
158+
<p class="--section-description">Browse code tutorials and live previews for complex data analysis, featuring box plots, histograms, error bars, and 2D density plots.</p>
159+
{% endif %}
151160
<section class="--grid">
152161
<ul class="--grid-list">
153162

@@ -168,7 +177,7 @@
168177
{% if scientific %}
169178
<section class="--tutorial-section" id="scientific-charts">
170179
<header class="--section-header">
171-
<a href="#scientific-charts">Scientific Charts</a>
180+
<span>Scientific Charts</span>
172181

173182
{% assign forloop_idx = 0 %}
174183
{%- for page in languagelist -%}
@@ -181,6 +190,9 @@
181190
<a href="/{{language}}/scientific-charts/" class="langindexlink">More Scientific Charts &raquo;</a>
182191
{% endif %}
183192
</header>
193+
{% if language == "python" %}
194+
<p class="--section-description">Access interactive examples and code snippets for domain-specific visualizations. Build heatmaps, contour plots, ternary plots, and log plots.</p>
195+
{% endif %}
184196
<section class="--grid">
185197
<ul class="--grid-list">
186198

@@ -201,7 +213,7 @@
201213
{% if financial %}
202214
<section class="--tutorial-section" id="financial-charts">
203215
<header class="--section-header">
204-
<a href="#financial-charts">Financial Charts</a>
216+
<span>Financial Charts</span>
205217

206218
{% assign forloop_idx = 0 %}
207219
{%- for page in languagelist -%}
@@ -214,6 +226,9 @@
214226
<a href="/{{language}}/financial-charts/" class="langindexlink">More Financial Charts &raquo;</a>
215227
{% endif %}
216228
</header>
229+
{% if language == "python" %}
230+
<p class="--section-description">Explore code guides and live examples for financial data, including candlestick charts, OHLC plots, waterfall diagrams, funnel charts, and time series lines to create interactive graphs in Python.</p>
231+
{% endif %}
217232
<section class="--grid">
218233
<ul class="--grid-list">
219234

@@ -234,7 +249,7 @@
234249
{% if maps %}
235250
<section class="--tutorial-section" id="maps">
236251
<header class="--section-header">
237-
<a href="#maps">Maps</a>
252+
<span>Maps</span>
238253

239254
{% assign forloop_idx = 0 %}
240255
{%- for page in languagelist -%}
@@ -247,6 +262,9 @@
247262
<a href="/{{language}}/maps/" class="langindexlink">More Maps &raquo;</a>
248263
{% endif %}
249264
</header>
265+
{% if language == "python" %}
266+
<p class="--section-description">Learn how to build interactive geographic visualizations with step-by-step code snippets for Mapbox integration, tile choropleth maps, lines on maps, and bubble maps.</p>
267+
{% endif %}
250268
<section class="--grid">
251269
<ul class="--grid-list">
252270

@@ -267,7 +285,7 @@
267285
{% if ai_ml %}
268286
<section class="--tutorial-section">
269287
<header class="--section-header">
270-
<a href="#ai_ml" name="ai_ml" id="ai_ml">Artificial Intelligence and Machine Learning</a>
288+
<span name="ai_ml" id="ai_ml">Artificial Intelligence and Machine Learning</span>
271289

272290
{% assign forloop_idx = 0 %}
273291
{%- for page in languagelist -%}
@@ -280,6 +298,9 @@
280298
<a href="/{{language}}/ai-ml/" class="langindexlink">More AI and ML &raquo;</a>
281299
{% endif %}
282300
</header>
301+
{% if language == "python" %}
302+
<p class="--section-description">Visualize machine learning models with tutorials for ML regression, kNN classification, ROC and PR curves, and PCA visualization.</p>
303+
{% endif %}
283304
<section class="--grid">
284305
<ul class="--grid-list">
285306

@@ -301,9 +322,12 @@
301322

302323
{% if bio %}
303324
<section class="--tutorial-section">
304-
<header class="--section-header"><a href="#bio" name="bio" id="bio">Bioinformatics</a>
325+
<header class="--section-header"><span name="bio" id="bio">Bioinformatics</span>
305326
<a href="/{{language}}/bio/" class="langindexlink">More Bioinformatics &raquo;</a>
306327
</header>
328+
{% if language == "python" %}
329+
<p class="--section-description">Access specialized charts for computational biology, including volcano plots, Manhattan plots, clustergrams, and alignment charts.</p>
330+
{% endif %}
307331
<section class="--grid">
308332
<ul class="--grid-list">
309333
{%- for page in languagelist -%}
@@ -321,7 +345,7 @@
321345
{% if 3d_charts %}
322346
<section class="--tutorial-section" id="3d-charts">
323347
<header class="--section-header">
324-
<a href="#3d-charts">3D Charts</a>
348+
<span>3D Charts</span>
325349

326350
{% assign forloop_idx = 0 %}
327351
{%- for page in languagelist -%}
@@ -334,6 +358,9 @@
334358
<a href="/{{language}}/3d-charts/" class="langindexlink">More 3D Charts &raquo;</a>
335359
{% endif %}
336360
</header>
361+
{% if language == "python" %}
362+
<p class="--section-description">View high-performance code examples for 3D axes, 3D scatter plots, 3D surface plots, and 3D subplots to enhance your Python graphs.</p>
363+
{% endif %}
337364
<section class="--grid">
338365
<ul class="--grid-list">
339366

@@ -354,7 +381,7 @@
354381
{% if multiple_axes %}
355382
<section class="--tutorial-section" id="multiple-axes-subplots-and-insets">
356383
<header class="--section-header">
357-
<a href="#subplot-charts" name="subplot-charts" id="subplot-charts">Subplots</a>
384+
<span name="subplot-charts" id="subplot-charts">Subplots</span>
358385

359386
{% assign forloop_idx = 0 %}
360387
{%- for page in languagelist -%}
@@ -367,6 +394,9 @@
367394
<a href="/{{language}}/subplot-charts/" class="langindexlink">More Subplots &raquo;</a>
368395
{% endif %}
369396
</header>
397+
{% if language == "python" %}
398+
<p class="--section-description">Find layout tutorials and code examples for combining multi-chart arrangements, map subplots, table subplots, and mixed layouts when plotting graphs in Python.</p>
399+
{% endif %}
370400
<section class="--grid">
371401
<ul class="--grid-list">
372402

@@ -387,7 +417,7 @@
387417
{% if chart_events and page.language =="python" %}
388418
<section class="--tutorial-section" id="chart-events">
389419
<header class="--section-header">
390-
<a href="#jupyter-widgets" id="jupyter-widgets">Jupyter Widgets Interaction</a>
420+
<span id="jupyter-widgets">Jupyter Widgets Interaction</span>
391421

392422
{% assign forloop_idx = 0 %}
393423
{%- for page in languagelist -%}
@@ -400,6 +430,9 @@
400430
<a href="/{{language}}/chart-events/" class="langindexlink">More Chart Events &raquo;</a>
401431
{% endif %}
402432
</header>
433+
{% if language == "python" %}
434+
<p class="--section-description">Learn how to connect your Python graph to interactive Jupyter environments using FigureWidget tutorials, interactive data analysis, and custom click events.</p>
435+
{% endif %}
403436
<section class="--grid">
404437
<ul class="--grid-list">
405438

@@ -420,7 +453,7 @@
420453
{% if chart_events and page.language =="r" %}
421454
<section class="--tutorial-section" id="custom-interaction">
422455
<header class="--section-header">
423-
<a href="#custom-interaction">Custom Interaction With JavaScript</a>
456+
<span>Custom Interaction With JavaScript</span>
424457

425458
{% assign forloop_idx = 0 %}
426459
{%- for page in languagelist -%}
@@ -453,7 +486,7 @@
453486
{% if chart_events and page.language == 'plotly_js' %}
454487
<section class="--tutorial-section" id="custom-chart-events">
455488
<header class="--section-header">
456-
<a href="#custom-chart-events">Custom Chart Events</a>
489+
<span>Custom Chart Events</span>
457490

458491
{% assign forloop_idx = 0 %}
459492
{%- for page in languagelist -%}
@@ -486,7 +519,7 @@
486519
{% if controls %}
487520
<section class="--tutorial-section" id="controls">
488521
<header class="--section-header">
489-
<a href="#controls">Add Custom Controls</a>
522+
<span>Add Custom Controls</span>
490523

491524
{% assign forloop_idx = 0 %}
492525
{%- for page in languagelist -%}
@@ -499,6 +532,9 @@
499532
<a href="/{{language}}/controls/" class="langindexlink">More Controls &raquo;</a>
500533
{% endif %}
501534
</header>
535+
{% if language == "python" %}
536+
<p class="--section-description">Discover code snippets and tutorials for building interactive UI controls directly into your visualizations, including dropdown menus, custom buttons, sliders, and range selectors to upgrade your graph in Python.</p>
537+
{% endif %}
502538
<section class="--grid">
503539
<ul class="--grid-list">
504540

@@ -519,7 +555,7 @@
519555
{% if animations %}
520556
<section class="--tutorial-section" id="animations">
521557
<header class="--section-header">
522-
<a href="#animations">Animations</a>
558+
<span>Animations</span>
523559

524560
{% assign forloop_idx = 0 %}
525561
{%- for page in languagelist -%}
@@ -532,6 +568,9 @@
532568
<a href="/{{language}}/animations/" class="langindexlink">More Animations &raquo;</a>
533569
{% endif %}
534570
</header>
571+
{% if language == "python" %}
572+
<p class="--section-description">Explore code tutorials and interactive demos for animating data points, building time-series sliders, and creating smooth transitions to build a dynamic Python graph.</p>
573+
{% endif %}
535574
<section class="--grid">
536575
<ul class="--grid-list">
537576

@@ -552,7 +591,7 @@
552591
{% if financial_analysis %}
553592
<section class="--tutorial-section" id="financial-analysis">
554593
<header class="--section-header">
555-
<a href="#financial-analysis">Financial Analysis</a>
594+
<span>Financial Analysis</span>
556595

557596
{% assign forloop_idx = 0 %}
558597
{%- for page in languagelist -%}
@@ -585,8 +624,11 @@
585624
{% if advanced_opt %}
586625
<section class="--tutorial-section no-image" id="advanced-options">
587626
<header class="--section-header">
588-
<a href="#advanced-options">Advanced</a>
627+
<span>Advanced</span>
589628
</header>
629+
{% if language == "python" %}
630+
<p class="--section-description">Take your interactive plots in Python to the next level with advanced Python graphing techniques, including plotting CSV data, generating random walks, peak finding, data smoothing, and rendering LaTeX.</p>
631+
{% endif %}
590632
<section class="--grid">
591633
<ul class="--grid-list">
592634

@@ -611,7 +653,7 @@
611653
{% if style_options %}
612654
<section class="--tutorial-section no-image" id="style-options">
613655
<header class="--section-header">
614-
<a href="#style-options">Style Options</a>
656+
<span>Style Options</span>
615657
</header>
616658
<section class="--grid">
617659
<ul class="--grid-list">
@@ -637,7 +679,7 @@
637679
{% if layout_options %}
638680
<section class="--tutorial-section no-image" id="layout-options">
639681
<header class="--section-header">
640-
<a href="#layout-options">Layout Options</a>
682+
<span>Layout Options</span>
641683
</header>
642684
<section class="--grid">
643685
<ul class="--grid-list">

0 commit comments

Comments
 (0)