Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creates a simple website in the current directory
tee ./index.html <<EOF
<html>
<head>
<link rel="stylesheet" type="text/css" href="/style.css"/>
<title>Glorious Website</title>
</head>
<body>
<h1>Version 1</h1>
<p>Go to <a href="/blog/first-post">blog/first-post</a></p>
</body>
</html>
EOF
tee ./style.css <<EOF
html, body {
background: lightgray;
}
EOF
mkdir -p ./blog/first-post
tee ./blog/first-post/index.html <<EOF
<html>
<head>
<link rel="stylesheet" type="text/css" href="/style.css"/>
<title>Glorious Website Blog - First Post</title>
</head>
<body>
<h1>First Post, Version 1</h1>
<img src="./image.svg" />
</body>
</html>
EOF
tee ./blog/first-post/image.svg <<EOF
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="10" y="10" height="100" width="100" style="fill: #0000ff"/>
</svg>
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.