Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

blogdown: Creating Websites with R

Markdown Yihui Xie


Visit to download the full and correct content document:
https://ebookmass.com/product/blogdown-creating-websites-with-r-markdown-yihui-xi
e/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Creating Responsive Websites Using HTML5 and CSS3: A


Perfect Reference for Web Designers Varun Gor

https://ebookmass.com/product/creating-responsive-websites-using-
html5-and-css3-a-perfect-reference-for-web-designers-varun-gor/

Divestitures: Creating Value Through Strategy,


Structure, and Implementation Emilie R. Feldman

https://ebookmass.com/product/divestitures-creating-value-
through-strategy-structure-and-implementation-emilie-r-feldman-2/

Divestitures: Creating Value Through Strategy,


Structure, and Implementation Emilie R. Feldman

https://ebookmass.com/product/divestitures-creating-value-
through-strategy-structure-and-implementation-emilie-r-feldman/

Discover Digital Libraries. Theory and Practice 1st


Edition Iris Xie

https://ebookmass.com/product/discover-digital-libraries-theory-
and-practice-1st-edition-iris-xie/
Random Process Analysis With R Marco Bittelli

https://ebookmass.com/product/random-process-analysis-with-r-
marco-bittelli/

Basic Statistics with R: Reaching Decisions with Data


Stephen C. Loftus

https://ebookmass.com/product/basic-statistics-with-r-reaching-
decisions-with-data-stephen-c-loftus/

Easy Statistics for Food Science with R Abdulraheem


Alqaraghuli

https://ebookmass.com/product/easy-statistics-for-food-science-
with-r-abdulraheem-alqaraghuli/

Practical Highcharts with Angular: Your Essential Guide


to Creating Real-time Dashboards, 2nd Edition Sourabh
Mishra

https://ebookmass.com/product/practical-highcharts-with-angular-
your-essential-guide-to-creating-real-time-dashboards-2nd-
edition-sourabh-mishra/

Practical Highcharts with Angular: Your Essential Guide


to Creating Real-time Dashboards 2nd Edition Sourabh
Mishra

https://ebookmass.com/product/practical-highcharts-with-angular-
your-essential-guide-to-creating-real-time-dashboards-2nd-
edition-sourabh-mishra-2/
blogdown
Creating Websites
with R Markdown
Chapman & Hall/CRC
The R Series

Series Editors
John M. Chambers Torsten Hothorn
Department of Statistics Division of Biostatistics
Stanford University University of Zurich
Stanford, California, USA Switzerland

Duncan Temple Lang Hadley Wickham


Department of Statistics RStudio
University of California, Davis Boston, Massachusetts, USA
Davis, California, USA

Aims and Scope


This book series reflects the recent rapid growth in the development and application
of R, the programming language and software environment for statistical computing
and graphics. R is now widely used in academic research, education, and industry.
It is constantly growing, with new versions of the core software released regularly
and more than 10,000 packages available. It is difficult for the documentation to
keep pace with the expansion of the software, and this vital book series provides
a forum for the publication of books covering many aspects of the development
and application of R.
The scope of the series is wide, covering three main threads:
• Applications of R to specific disciplines such as biology, epidemiology,
genetics, engineering, finance, and the social sciences.
• Using R for the study of topics of statistical methodology, such as linear and
mixed modeling, time series, Bayesian methods, and missing data.
• The development of R, including programming, building packages, and
graphics.
The books will appeal to programmers and developers of R software, as well as
applied statisticians and data analysts in many fields. The books will feature
detailed worked examples and R code fully integrated into the text, ensuring their
usefulness to researchers, practitioners and students.
Published Titles

Stated Preference Methods Using R, Hideo Aizaki, Tomoaki Nakatani,


and Kazuo Sato
Using R for Numerical Analysis in Science and Engineering, Victor A. Bloomfield
Event History Analysis with R, Göran Broström
Extending R, John M. Chambers
Computational Actuarial Science with R, Arthur Charpentier
Testing R Code, Richard Cotton
The R Primer, Second Edition, Claus Thorn Ekstrøm
Statistical Computing in C++ and R, Randall L. Eubank and Ana Kupresanin
Basics of Matrix Algebra for Statistics with R, Nick Fieller
Reproducible Research with R and RStudio, Second Edition, Christopher Gandrud
R and MATLAB®David E. Hiebeler
Statistics in Toxicology Using R Ludwig A. Hothorn
Nonparametric Statistical Methods Using R, John Kloke and Joseph McKean
Displaying Time Series, Spatial, and Space-Time Data with R,
Oscar Perpiñán Lamigueiro
Programming Graphical User Interfaces with R, Michael F. Lawrence
and John Verzani
Analyzing Sensory Data with R, Sébastien Lê and Theirry Worch
Parallel Computing for Data Science: With Examples in R, C++ and CUDA,
Norman Matloff
Analyzing Baseball Data with R, Max Marchi and Jim Albert
Growth Curve Analysis and Visualization Using R, Daniel Mirman
R Graphics, Second Edition, Paul Murrell
Introductory Fisheries Analyses with R, Derek H. Ogle
Data Science in R: A Case Studies Approach to Computational Reasoning and
Problem Solving, Deborah Nolan and Duncan Temple Lang
Multiple Factor Analysis by Example Using R, Jérôme Pagès
Customer and Business Analytics: Applied Data Mining for Business Decision
Making Using R, Daniel S. Putler and Robert E. Krider
Flexible Regression and Smoothing: Using GAMLSS in R, Mikis D. Stasinopoulos,
Robert A. Rigby, Gillian Z. Heller, Vlasios Voudouris, and Fernanda De Bastiani
Implementing Reproducible Research, Victoria Stodden, Friedrich Leisch,
and Roger D. Peng
Published Titles continued

Graphical Data Analysis with R, Antony Unwin


Using R for Introductory Statistics, Second Edition, John Verzani
Advanced R, Hadley Wickham
bookdown: Authoring Books and Technical Documents with R Markdown,
Yihui Xie
blogdown: Creating Websites with R Markdown, Yihui Xie, Amber Thomas,
and Alison Presmanes Hill
Dynamic Documents with R and knitr, Second Edition, Yihui Xie
blogdown
Creating Websites
with R Markdown

Yihui Xie
Amber Thomas
Alison Presmanes Hill
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742

© 2018 by Taylor & Francis Group, LLC


CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works

Printed on acid-free paper

International Standard Book Number-13: 978-0-8153-6372-9 (Paperback)


International Standard Book Number-13: 978-0-8153-6384-2 (Hardback)

This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize
to copyright holders if permission to publish in this form has not been obtained. If any copyright material
has not been acknowledged please write and let us know so we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information storage
or retrieval system, without written permission from the publishers.

For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc.
(CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization
that provides licenses and registration for a variety of users. For organizations that have been granted a
photocopy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are
used only for identification and explanation without intent to infringe.

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com

and the CRC Press Web site at


http://www.crcpress.com
百千万劫弹指过,春夏秋⼼凭谁托。
日月星灭观夜落,天地⼈间对⽂酌。

Life is short. Write for eternity.


Contents

List of Tables xiii

List of Figures xv

Preface xvii

About the Authors xxv

1 Get Started 1
1.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Update . . . . . . . . . . . . . . . . . . . . . . 2
1.2 A quick example . . . . . . . . . . . . . . . . . . . . . 2
1.3 RStudio IDE . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Global options . . . . . . . . . . . . . . . . . . . . . . 10
1.5 R Markdown vs. Markdown . . . . . . . . . . . . . . . . 12
1.6 Other themes . . . . . . . . . . . . . . . . . . . . . . . 17
1.7 A recommended workflow . . . . . . . . . . . . . . . . 19

2 Hugo 23
2.1 Static sites and Hugo . . . . . . . . . . . . . . . . . . . 23
2.2 Configuration . . . . . . . . . . . . . . . . . . . . . . 25
2.2.1 TOML Syntax . . . . . . . . . . . . . . . . . . . 26
2.2.2 Options . . . . . . . . . . . . . . . . . . . . . . 28
2.3 Content . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.3.1 YAML metadata . . . . . . . . . . . . . . . . . 31
2.3.2 Body . . . . . . . . . . . . . . . . . . . . . . . 32
2.3.3 Shortcode . . . . . . . . . . . . . . . . . . . . 32
2.4 Themes . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.4.1 The default theme . . . . . . . . . . . . . . . . 34
2.5 Templates . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.5.1 A minimal example . . . . . . . . . . . . . . . . 39

ix
x Contents

2.5.2 Implementing more features . . . . . . . . . . . 52


2.6 Custom layouts . . . . . . . . . . . . . . . . . . . . . . 59
2.7 Static files . . . . . . . . . . . . . . . . . . . . . . . . 61

3 Deployment 63
3.1 Netlify . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.2 Updog . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.3 GitHub Pages . . . . . . . . . . . . . . . . . . . . . . . 67
3.4 Travis + GitHub . . . . . . . . . . . . . . . . . . . . . . 70
3.5 GitLab Pages . . . . . . . . . . . . . . . . . . . . . . . 74

4 Migration 77
4.1 From Jekyll . . . . . . . . . . . . . . . . . . . . . . . . 78
4.2 From WordPress . . . . . . . . . . . . . . . . . . . . . 82
4.3 From other systems . . . . . . . . . . . . . . . . . . . . 83

5 Other Generators 85
5.1 Jekyll . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.2 Hexo . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.3 Default site generator in rmarkdown . . . . . . . . . . . 91
5.4 pkgdown . . . . . . . . . . . . . . . . . . . . . . . . . 92

Appendix 95

A R Markdown 95

B Website Basics 99
B.1 HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
B.2 CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
B.3 JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . 110
B.4 Useful resources . . . . . . . . . . . . . . . . . . . . . 114
B.4.1 File optimization . . . . . . . . . . . . . . . . . 114
B.4.2 Helping people find your site . . . . . . . . . . . 115

C Domain Name 117


C.1 Registration . . . . . . . . . . . . . . . . . . . . . . . 118
C.2 Nameservers . . . . . . . . . . . . . . . . . . . . . . . 118
C.3 DNS records . . . . . . . . . . . . . . . . . . . . . . . 119
Contents xi

D Advanced Topics 123


D.1 More global options . . . . . . . . . . . . . . . . . . . . 123
D.2 LiveReload . . . . . . . . . . . . . . . . . . . . . . . . 124
D.3 Building a website for local preview . . . . . . . . . . . 126
D.4 Functions in the blogdown package . . . . . . . . . . . 127
D.4.1 Exported functions . . . . . . . . . . . . . . . . 128
D.4.2 Non-exported functions . . . . . . . . . . . . . 129
D.5 Paths of figures and other dependencies . . . . . . . . . 130
D.6 HTML widgets . . . . . . . . . . . . . . . . . . . . . . 132
D.7 Version control . . . . . . . . . . . . . . . . . . . . . . 133
D.8 The default HTML template . . . . . . . . . . . . . . . 134
D.9 Different building methods . . . . . . . . . . . . . . . . 137

E Personal Experience 139

Bibliography 141

Index 143
List of Tables

1.1 Global options that affect the behavior of blogdown. . . . . 11

D.1 A few more advanced global options. . . . . . . . . . . . . 123

xiii
List of Figures

1.1 The homepage of the default new site. . . . . . . . . . . . 4


1.2 Create a new post using the RStudio addin. . . . . . . . . 7
1.3 Update the metadata of an existing post using the RStudio
addin. . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Create a new website project in RStudio. . . . . . . . . . . 8
1.5 Create a website project based on blogdown. . . . . . . . 9
1.6 RStudio project options. . . . . . . . . . . . . . . . . . . 10

2.1 Possible files and folders created when you create a new site
using blogdown. . . . . . . . . . . . . . . . . . . . . . . 25
2.2 A tweet by Jeff Leek. . . . . . . . . . . . . . . . . . . . . 33
2.3 Edit a text file online on GitHub. . . . . . . . . . . . . . . 58

3.1 Example settings of a website deployed on Netlify. . . . . 65

B.1 Developer Tools in Google Chrome. . . . . . . . . . . . . 100

C.1 Some DNS records of the domain yihui.name on Cloudflare. 120

xv
Preface

In the summer of 2012, I did my internship at AT&T Labs Research,1 where


I attended a talk given by Carlos Scheidegger (https://cscheid.net), and
Carlos said something along the lines of “if you don’t have a website nowa-
days, you don’t exist.” Later I paraphrased it as:

“I web, therefore I am a spiderman.”

Carlos’s words resonated very well with me, although they were a little ex-
aggerated. A well-designed and maintained website can be extremely help-
ful for other people to know you, and you do not need to wait for suitable
chances at conferences or other occasions to introduce yourself in person
to other people. On the other hand, a website is also highly useful for your-
self to keep track of what you have done and thought. Sometimes you may
go back to a certain old post of yours to relearn the tricks or methods you
once mastered in the past but have forgotten.
We introduce an R package, blogdown, in this short book, to teach you how
to create websites using R Markdown and Hugo. If you have experience with
creating websites, you may naturally ask what the benefits of using R Mark-
down are, and how blogdown is different from existing popular website plat-
forms, such as WordPress. There are two major highlights of blogdown:

1. It produces a static website, meaning the website only consists


of static files such as HTML, CSS, JavaScript, and images, etc.
You can host the website on any web server (see Chapter 3 for
1
In this book, “I” and “my” refer to Yihui unless otherwise noted.

xvii
xviii Preface

details). The website does not require server-side scripts such as


PHP or databases like WordPress does. It is just one folder of static
files. We will explain more benefits of static websites in Chapter
2, when we introduce the static website generator Hugo.
2. The website is generated from R Markdown documents (R is op-
tional, i.e., you can use plain Markdown documents without R
code chunks). This brings a huge amount of benefits, especially if
your website is related to data analysis or (R) programming. Being
able to use Markdown implies simplicity and more importantly,
portability (e.g., you are giving yourself the chance to convert your
blog posts to PDF and publish to journals or even books in the fu-
ture). R Markdown gives you the benefits of dynamic documents
— all your results, such as tables, graphics, and inline values, can
be computed and rendered dynamically from R code, hence the
results you present on your website are more likely to be repro-
ducible. An additional yet important benefit of using R Markdown
is that you will be able to write technical documents easily, due
to the fact that blogdown inherits the HTML output format from
bookdown (Xie, 2016). For example, it is possible to write LaTeX
math equations, BibTeX citations, and even theorems and proofs
if you want.

Please do not be misled by the word “blog” in the package name: blogdown
is for general-purpose websites, and not only for blogs. For example, all au-
thors of this book have their personal websites, where you can find infor-
mation about their projects, blogs, package documentations, and so on.2 All
their pages are built from blogdown and Hugo.
If you do not prefer using Hugo, there are other options, too. Chapter
2
Yihui’s homepage is at https://yihui.name. He writes blog posts in both Chinese
(https://yihui.name/cn/) and English (https://yihui.name/en/), and documents his soft-
ware packages such as knitr (https://yihui.name/knitr/) and animation (https://yihui.
name/animation/). Occasionally he also writes articles like https://yihui.name/rlp/ when
he finds interesting topics but does not bother with a formal journal submission. Amber’s
homepage is at https://amber.rbind.io, where you can find her blog and project pages.
Alison’s website is at https://alison.rbind.io, which uses an academic theme at the mo-
ment.
Preface xix

5 presents possibilities of using other site generators, such as Jekyll and


rmarkdown’s default site generator.

Structure of the book

Chapter 1 aims at getting you started with a new website based on blogdown:
it contains an installation guide, a quick example, an introduction to RStu-
dio addins related to blogdown, and comparisons of different source docu-
ment formats. All readers of this book should finish at least this chapter (to
know how to create a website locally) and Section 3.1 (to know how to pub-
lish a website). The rest of the book is mainly for those who want to further
customize their websites.
Chapter 2 briefly introduces the static website generator Hugo, on which
blogdown is based. We tried to summarize the official Hugo documentation
in a short chapter. You should consult the official documentation when in
doubt. You may skip Section 2.5 if you do not have basic knowledge of web
technologies. However, this section is critical for you to fully understand
Hugo. We have spent the most time on this section in this chapter. It is very
technical, but should be helpful nonetheless. Once you have learned how to
create Hugo templates, you will have the full freedom to customize your web-
site.
Chapter 3 tells you how to publish a website, so that other people can visit
it through a link. Chapter 4 shows how to migrate existing websites from
other platforms to Hugo and blogdown. Chapter 5 gives a few other options
if you do not wish to use Hugo as your site generator.
Appendix A is a quick tutorial on R Markdown, the prerequisite of blogdown
if you are going to write R code in your posts. Appendix B contains basic
knowledge about websites, such as HTML, CSS, and JavaScript. If you really
care about your website, you will have to learn them someday. If you want
to have your own domain name, Appendix C provides an introduction to
how it works. We have also covered some optional topics in Appendix D for
advanced users.
Another random document with
no related content on Scribd:
Käy ilma vienommin,
Hiljallansa
On kukkaskansa,
Miettivi, kuulevi, tuoksuvi hienommin.

Teitä, vierahat,
Tänne kun tullen
Ja lausuen, laulain
Mielenne innon
Mullekin soitte,
Teitä mä kiitän!

Mi, laulua tuota


En kaikkia voinut
Ma oivaltaa.
Niin outona, unten',
Kuin itsekin ootte,
Se lens' ohi kuuloni,
Vieritse luuloni,
Jäänyt ei jälkeäkään.

Laaksohon tänne,
Puiden latvahan
Laskevi joskus
Outonen lintu.
Ja illan tullen,
Kaikk' kun on hiljoin,
Käy satakielisen liiretys viljoin.
Sen kummaa tahtia
Kielien soitoll'
Ei kenkään ennä.
Sen kilvalla laulaa
Huokuvin rinnoin
Ei kenkään voi;
Sulokaunoisesti sen ääni soi.

Siell' onko, vierahat,


Laulunne synty,
Miss' surumieli
Ja kaipuu — arvelen —
Yöhyen tyynessä
Uhkuvi ilmi?
Ootteko ilmojen
Liiteliöiltä
Sävelet saaneet?
Sävelet vilkkaat,
Kummaiset, oivat;
Kuink' unehessan'
Ne korviini soivat!
Sävelet lempeät,
Juur' ihastuttavat,
Minne jos kuuluvat,
Kaikk' jalostuttavat.

JAUFFRED.

Oi, kuinka runollista!

TRISTAN (Jolanthalle).

Lauluamme
Te vertailette satakielen lauluun.
Oi, jospa oisin joku, vaikka pienin,
Vaikk' köyhin noista lintusista, jotk on
Luonanne täällä, saadakseni kuulla
Yhäti noita sulosäveleitä,
Joit' teidän rinnassanne heräjää.

JAUFFRED.

Oi jalo neiti, anteeks' antakaa,


Ett' teen mä yhden kysymyksen, jonka
ihailuksemme huulillemme saattaa.
Maailmast' erillään te ootte täällä.
Oivallisista noista lahjoistanne
Ei mitäkään Provence'n ritarit
Ja jalot naiset tiedä. Kenpä ootte
Te syntyänne? Kenp' on isänne?

JOLANTHA.

Vai et sä sitä tiedä? Sep' on kumma.


Tääll' ei käy kenkään, jok' ei häntä tunne.

JAUFFRED.

Mi hänen nimens' on?

JOLANTHA.

Raimbaud'ksi häntä
Nimitetään.

JAUFFRED.
Raimbaud'ksi? Ritari
Hän onko?

JOLANTHA.

Ritar'?

JAUFFRED.

Eli sotilas.
Kypärä, kilpi, kultakannukset
Häll' onko? Mikä hänen virkans' on?

JOLANTHA.

En koskaan ole tuota kysynyt.

JAUFFRED.

Mintähden teitä pidetähän täällä


Niin tarkoin?

JOLANTHA (kummastellen).

Tarkoin?

JAUFFRED.

Niinpähän, niin yksin.

JOLANTHA

Ei yksin. Siinä aivan erhetyt.


JAUFFRED.

Mut tääll' ei ole ketäkään.

JOLANTHA.

Niin tääll'
Ei ole… siinä oikeassa oot…
En tiedä, mistähän se tulee. Muuten
En yksin ole täällä milloinkaan.
Mut varroppas, ma kutsun… Bertrand kyll'
On ilostuva teidän tulostanne.

(Menee huoneesen.)

JAUFFRED.

Nyt nähdä saamme, kenen on tää laakso.


Mut kovin mua aavistaa, ett' on täss'
Sekassa jotain salaisuutta, jot'
Ei minkään laakson herra kenenkään
Ois suonut vainustavan.
(Osottaa ovea perällä.)
Huomatkaas,
Kuink' ovi tuolla taidokkaasti ompi
Kivillä, sammalilla peitetty,
Niin ett' ei, kun se suljetaan, voi vuoren
Rinteestä sitä erottaa. Nyt kuulkaa
Mun neuvoan' ja oven luona olkaa.
Ma varron, kunnes joku tulee. Sitte
Mä menon vuoren käytävähän, ett'
Ei voida estää palaustamme.
Kenties mä kohtaan jonkun väestämme.
Jos huomaan jonkun vaaran, palajan
Ma kohta. — Kai jo ymmärrätte, Tristan?

TRISTAN (omissa ajatuksissaan).


Niin, menkää vaan!

JAUFFRED.

Ah, huolissa te ootte;


Tuo kaunonen on viehättänyt teidät.

TRISTAN.

Kipeä oon ma. Hurmoksiss' on pääni.


Minusta on, kuin hiljainen tää laakso
Se määrä oisi, johon tähän asti
Oon pyrkinyt, kuin voitonhimoinen
Uljuuten' oikean sais levon täällä.

JAUFFRED (totisesti).

Tok' ette ole unhottanut, että


Teit' odottaapi kuningas René?

TRISTAN.

Niin, kuningas René! Oi, mitä huolin


Mä hänestä? Maakunnan, joka lailla
Ja oikeudella on meidän, jok'
On meidän miekoillamme valloitettu, —
Pitäiskö eestä sen mun kiinnittämän
Nuoruuten' hänen tyttäreensä, jot'
Ei kenkään tunne, kenkään ole nähnyt…
Kun mulla tääll' on…

JAUFFRED.

Älkää jatkako!
Te haaveksitte! Itse tiedätten
Te, mitä tulevainen aika teilt'
On vaativa. Mut hurmattu te ootte.
Tuo liekki rinnastanne riistäkää.

TRISTAN.

Oisinko hurmattu, jos tuota voisin?

JAUFFRED.

Nyt tullaan: — hiljaa!

(Jolantha tulee ulos jällen.)

JOLANTHA.

Olettenko täällä?

JAUFFRED.

Varromme teidän tuovan huoneen herran.

JOLANTHA (vähän alakuloisena).


Kaikk' on he kaukana. Ma kutsuin, vaan
Ei kenkään tullut. Miksi jättäneet
Mun ovat?

TRISTAN.

Tulevat kai pian.

JOLANTHA.

Niin,
He kyllä tulevat. He viinamarjain
Korjuussa varmaan ovat. Siell' on mun
Myös tapa olla. Muuten joku heistä
Mun luonan' on.

JAUFFRED (hiljaa Tristanille).

Te jäätte tänne?

TRISTAN.

Jään.

JAUFFRED.

No niin, mä teon siis niin kuin lupasin.

(Menee kumartaen Jolanthaa, johon tämä ei vastaa.)

JOLANTHA (kuunnellen).

Sun ystäväs jo läksi.


TRISTAN.

Kohta taas
Hän palajaa. Mut, anteeks' antakaatte,
— Erääsen rikokseen mä syypää oon,
Jon sovittaa mä jällen tahdon. Teidän
Uinaillessanne äsken, pienen kanneen
Ma otin teiltä, muistoksenne vaan.
Täss' on se.

JOLANTHA.

Missä?

(Tristan antaa hänelle amuletin, jonka hän kolmannessa


kohtauksessa otti hänen rinnaltansa.)

Kanne? Mun se onko?

TRISTAN.

Niin, niinpä luulen.

JOLANTHA.

Mun ei ole se,


Mut Marthalta mä kysyn.

(Laskee amuletin pöydälle.)

TRISTAN.
Mulle suokaa
Sen sijaan joku punaruusu tuolta,
Mi nostaa teidän kuvananne latvans'
Ylitse muiden kukkain vähempäin.

JOLANTHA.

Vai ruusu? Mielellän'.

(Poimii ja antaa hänelle valkoisen ruusun.)

TRISTAN.

Ah, valkoinenp'
On tämä! Antakaatte punainen,
Mi kaunis on kuin tekin.

JOLANTHA.

Punainen?
Mitäpä tarkotat?

TRISTAN (osottaen).

No, joku noista.

JOLANTHA.

Otappa itse se.

TRISTAN.
Ei, ennemmin
Mä pidän tään, jon valitsitte te,
Jon poimi teidän kätenne. Ja oikein
Kun mietin, kiitänkin mä valintaanne.
Valkoinen ruusu, jonka helmass' uinuu
Noin raskasmielinen ja vaalas puna,
Tän puiston haaveellisen kaunoisuuden
Vertainen on. Yks ruusu antakaa
Nyt viel', ja valkoinen. Ma hattuhuni
Ne panen molemmat, ja tahdon kantaa
Ne teidän Iempivärinänne.

JOLANTHA (poimii ja antaa hänelle ruusun, mutta punaisen).

Täss'
On ruusu. Tätäkö sä tarkotit?

TRISTAN (hämmästyy).

Mä pyysin valkoista.

JOLANTHA.

Minlainen tää on?

TRISTAN.

Tää — tää…
(Erikseen:)
Haa, mikä mun aavistaa!
(Ääneen:)
Hei, sanokaas —
(Pitää Jolanthan edessä noita kahta ruusua ja muutamia
muita, joita hän itse poimii lisäksi.)

kuin mont' on ruusua


Mun kädessän'?

JOLANTHA (kurottaa kättänsä niitä saadakseen, silmiänsä


avaamatta).

No annappa ne tänne.

TRISTAN.

Ei, koskematta.

JOLANTHA.

Kuinka voin ma muuten?

TRISTAN (syrjään).

Ah, sokea hän raukka on.


(Ääneen ja vitkastellen.)
Ma luulen.
Ett' toki voipi.

JOLANTHA.
Ei, sä erhetyt.
Kun tietoa ma tahdon jostakin,
Minkaltaista se ompi, kuinka monta
Niit' on, niin tuntelen ma. Sehän selvää.

TRISTAN (hämillänsä).
Niin — oikeassa ootte — mutta väliin…

JOLANTHA.

Mut väliin? Puhuppa!

TRISTAN.

Ma tarkotan,
Ett'.. että löytyy kappaleita, joita
Vaan väristänsä erottaapi, niin
Kuin monet kukkaslajit, monet aineet.

JOLANTHA.

Niin laadun, kaavan suhteen, arvelet


Sa. Eikö niin?

TRISTAN.

Ei, sit' en tarketa.

JOLANTHA.

Ja onkos kukkaa työläs tuntea?


Juur' hento, pehmyt, uhkea on ruusu,
Niin hieno tuntea, kuin ilman henki,
Ja lämpöinen kuin sekin kesä-illoin.
Neilikka onko ruusun kaltainen?
Sen tuoksu päätä huumaa, kuin tuo viini.
Jot' annoin sulle. Entäs kaktus? Eikö
Sen piikit tunnu niin, kuin vastatuuleen
Jää-siitehessä astuisit?

TRISTAN (erikseen).

Oi kummaa!
(Ääneen.)
Sanottu eikö ole teille, että
Kaikk' kappalehet voipi erottaa
Etäältä kautta… näön, näkemällä?

JOLANTHA.

Etäältä? Kyllä. Pikku lintusen,


Jok' istuu huoneen harjalla, ma tunnen
Sen viserryksestä, ja ihmiset
Ma tunnen kaikki heidän puheestansa.
Heponi vilkkaan, jolla joka päivä
Ma ratsastan, ma hirnunnasta tunnen
Etäältä, käynnistään. — Mut näöllä?
Ei ole tuota mulle sanottu.
Se onko jotain, jolla tutkitaan?
Jokuinen konstillinen kapine,
Vai yksinkertainenko? Näköä
En tunne. Taidatko sa opettaa
Minulle näön käytöksen ja hyödyn?

TRISTAN (erikseen).

Oi Jumalani! Hän ei itse tiedä


Sokea olevansa.
JOLANTHA (vähän viivähyksen perästä).

Mistä maasta
Sa oot? Sull' lauseit' ompi, joita kenkään
Ei täällä tunne; paljon, kuin jo sanoin,
Puheessas on semmoista, joka mulle
On outoa ja uutta. Onkohan
Se laakso, jost' oot sinä kotoisin,
Niin aivan toisen kaltainen kuin tää?
Siis tänne jää, jos voit, ja sitä mulle
Opeta, mitä tiedostani puuttuu.

TRISTAN.

Oi kaunis neito nuor', en voi, en taida


Opettaa teille, mitä teiltä puuttuu.

JOLANTHA.

Jos tahdot, niin ma luulen, että taidat.


Mua herkkäoppiseksi sanotaan.
Ja moni noista täällä käynehistä
Opetti mulle monta tointa, joita
Mä hyvin ymmärsin. Nyt koetappas.
En pety suinkaan: hyvä oot sa mulle:
Sun äänes hellä on ja lempeä,
Et tuota multa kiellä, kun mä pyydän.
Puhuppa; tarkoin puhettas ma kuulen.

TRISTAN.
Ah, vähän tarkka kuulunta teit' auttaa.
Mut — sanokaas: sen huomanneet kai ootte,
Ett' ilman erinäistä tarkotusta
Ja hyötyä ei ole yksikään
Ruumiinne kauniin jäsenistä. Sormin
Ja käsin tartutten te esineisin;
Jalkanne, vaikka pienet kyllä, vievät
Helposti teitä, minne halajatte.
Ja korvan koukeroisen kautta lauseen,
Sävelten ääni sieluhunne saapuu.
Puheenne käypi huuliltanne. Rinta
On suojus kevykäisen hengen tuon,
Mi huoletonna nousevi ja laskee.

JOLANTHA.

Sen kyll' oon huomannut. Mut jatkaa vaan.

TRISTAN.

Siis sanokaatte: mihin tarkotukseen


On Luoja teille suonut — silmänne?
Mi hyöty teill' on noista tähtilöistä,
Joill' itse on niin kumman kirkas loiste,
Ett'eivät päivän säteistä ne huoli —?

JOLANTHA (koskettaa silmiänsä, vähän miettien).

Mi hyöty, kysyt sä… Voi, kuinka kysyt!


Vaikk' — aatellut en ole tuota koskaan.
No, silmäni — sen helpost' ymmärtää…
Kun illoin oon mä väsyneenä, raskaast'
Unonen laskee silmillen', ja sieltä
Se valuu koko ruumiin yli, melkein
Kuin tunto sormen päästä leviää.
Siis tiedän silmän mua hyödyttävän.
Pait sitä, etkö itse usein huomaa,
Ett' on sun silmäs hyödyks' sulle? Kerran,
Kun maahan pientä ruusupensasta
Ma istuttuiin, juoksi muuan eläin
Ja puri sormeen'; tuosta kivusta
Ma itkin. Kerran taas, kun huolissan'
Ma kauan olin ollut, siksi että
Isäni poissa viipyili, mä itkin
Ilosta kun hän tuli. Kyyneleistä
Mä sydämellen', jok' ol' liian täynnä,
Sain huojennusta, silmäin kautta huoli
Ylitse tulvas'. Siis ei kysellä
Sun sovi, mihin tarkotukseen Luoja
On silmät unille suonut. Niiden kautta
Minulle lepo tuodaan, väsynyt
Kun oon ma. Niiden kautta lievitystä
Ma murheeseni saan ja niiden kautta
Iloni puhdistuu.

TRISTAN.

Oi anteeks' suokaa
Mun kysymyksen' oli julma. Moinen
Sisäinen sielun kirkkaus on teillä,
Ett'ette kaipaa tuota, jot' on meidän
Valosta lainaaminen silmäin kautta.
Tulisko aatella, ett' alkuperää
Oudoista olennoista ootte, joill on
Avuja toisenlaisia kuin meillä?
Tääll' yksin elätten; tää laakso näyttää.
Kuin loihdituksi vuorten lomihin.
Idästä, Peri-parvi kerallanne
Te tulittenko? Tyttäriä Brahman
Te lietto, jonkun Magin tänne tuoma
Luot' Induksen? Oi kaunis tuntematon!
Jos syntyisin te ootte ihmisistä,
Kut maata äidiksensä mainivat,
Jos ootte mieltyväinen tään maailman
Katoavaiseen riemuhun kuin minä,
Niin lempeästi ottakaatte vastaan
Ritarin suosittelu: kuulkaa hänen
Lupaustansa, ett' ei nainen ykskään,
Vaikk' ihanuuden, synnyn kautta kuinka
Etevä ois se, poista tuota kuvaa,
Jonk' ootte te mun sieluun' painaneet.

JOLANTHA (vähän viivähyksen perästä).

Kuink' kauheasti puhua sa taidat.


Milt¹ oot sa mestarilta taidon saanut
Noin viehätellä lauseill' oudoilla?
Minusta on, kuin yksin astuisin
Mä tietä, joll' en ollut ennen koskaan.
Mut kaikki, kaikki, mitä lausut, sentään
Taivaalliselta, herttaiselta kuuluu.
— Puhuppa taas. Ei, ällös puhuko!
Suo ennen mielessän' mun kuuleskella
Sanoja noita, joita lausuit, joista
Yht' aikaa riemastun ja huolestun.

(Jauffred tulee äkisti sisään.)

JAUFFRED (erikseen Tristanille).

Miesjoukko, näin mä, kaukaa lähenee.


Ja huomatkaas, ett' yksin oomme vaan.

TRISTAN (Jolanthalle).

Nyt, jalo neiti, lähteä mun täytyy.

JOLANTHA.

Voi! Miksi lähdet pois?

TRISTAN.

Ma tulen jällen,
Ja pian — tulen tänäpänä vielä.
Ettenkö tahdo käsin tunnustella,
Kuin pitkä oon, ett' taas, kuin yhdymme,
Te huokeammin minut tunnetten?

JOLANTHA.

Oi, miksi hyödyks'? Enkö tiedä, että


Niin korkea sa oot, kuin harva on?
Ylhäältä puhees mulle tulee, niin
Kuin kaikk', jok' ylhäist' on ja ihmeellistä.
Ja enköhän sun ääntäs tunne? Niin,
Kuin sä, ei puhu kenkään. Koko luonnoss'
Ei ole millään sävelell', ei äänell',
Ei millään soittimella, jota tunnen,
Niin vieno, helevä ja herttainen,
Niin raikas sointi, kuin sun äänelläs.
— Oi usko, sinut tuhansista tunnen.

TRISTAN.

Hyvästi siis, siks kuin taas yhdymme.

JOLANTHA.

Mun anna kättä. — Hyvästi! — Siis tulet.


Ja tulet pian? Ma odotan, sen tiedät.

TRISTAN (suutelee polvistuen hänen kättänsä).

Oi, ällös epäelkö, pian ma tulen.


Mun mielen' tänne hehkuu. Vaikka lähden,
Jää aatosteni paras puoli tänne,
Ja mitä viel' on mulla henkeä,
Luo teidän levotonna halajaa se.
Hyvästi!

(Menee sala-ovesta Jauffredin kanssa, joka jo ennen on


lähestynyt ovea.)

JOLANTHA (yksin, kuunnellen).

Nyt hän lähti! Läpi vuoren,


Jost' usein kuulin jalan oudon, nyt mä

You might also like