Skip to content

Instantly share code, notes, and snippets.

@mrotaru
Created February 7, 2020 22:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mrotaru/ce37fd41ce7270f27d6189d3127261b7 to your computer and use it in GitHub Desktop.
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