FIX rendering of readme

This commit is contained in:
unpregnant 2017-02-05 00:57:24 +01:00
parent 95eb520bf2
commit 9edb68bb67
2 changed files with 41 additions and 56 deletions

View File

@ -1,66 +1,50 @@
<html>
<head>
<p><html></p>
<p><head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="public/style.min.css" rel=" stylesheet">
<title> Best resume ever </title>
</head>
<body>
</head></p>
<p><body>
<a href="https://github.com/SalamiMitPizza/best-resume-ever" target="_blank">
<div id="forkme">View on Github <img src="public/github.png" /></div>
</a>
<div id="readme">
# best-resume-ever
Build your best resume ever!
A collection of beautiful resumes build with LESS and Mustache Templates. Choose your favorite Curriculum Vitae and easily export it as pdf.
## Resumes
<a href="resumes/resume-1/resume-1.png"><img src="resumes/resume-1/resume-1.png" width="150"/></a>
# best-resume-ever</p>
<p>Build your best resume ever!</p>
<p>A collection of beautiful resumes build with LESS and Mustache Templates. Choose your favorite Curriculum Vitae and easily export it as pdf.</p>
<h2 id="resumes">Resumes</h2>
<p><a href="resumes/resume-1/resume-1.png"><img src="resumes/resume-1/resume-1.png" width="150"/></a>
<a href="resumes/resume-2/resume-2.png"><img src="resumes/resume-2/resume-2.png" width="150"/></a>
<a href="resumes/resume-3/resume-3.png"><img src="resumes/resume-3/resume-3.png" width="150"/></a>
<a href="resumes/resume-4/resume-4.png"><img src="resumes/resume-4/resume-4.png" width="150"/></a>
<a href="resumes/resume-5/resume-5.png"><img src="resumes/resume-5/resume-5.png" width="150"/></a>
<a href="resumes/resume-6/resume-6.png"><img src="resumes/resume-6/resume-6.png" width="150"/></a>
## Install
Follow these instructions to create your own CV:
- Clone this repository.
- Switch to project directory and run `npm install`.
- Adjust your personal information in `person.js`.
- Replace placeholder image `/public/person.jpg` with your portrait.
- To preview your CV run `npm start`. Check out <http://localhost:3000>.
- Feel free to adjust styles in `/less` according to your needs.
- When finished, run `npm run pdf` to generate all CVs as pdf. You will find the generated pdfs in `/pdf`.
## Adding a template
TODO
## How to add a font
TODO
## Contribute
Feel free to create your own templates!
--------------------------------------------------------------------------------
Icons made by [Vectors Market](http://www.flaticon.com/authors/vectors-market "Vectors Market") from [www.flaticon.com](http://www.flaticon.com "Flaticon") is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/ "Creative Commons BY 3.0")
</div>
<script>
var headline = document.getElementsByTagName('h1')[0];
headline.innerHTML += '<img src="public/suitcase.png" width="150" />';
</script>
</body>
</html>
<a href="resumes/resume-6/resume-6.png"><img src="resumes/resume-6/resume-6.png" width="150"/></a></p>
<h2 id="install">Install</h2>
<p>Follow these instructions to create your own CV:</p>
<ul>
<li>Clone this repository.</li>
<li>Switch to project directory and run <code>npm install</code>.</li>
<li>Adjust your personal information in <code>person.js</code>.</li>
<li>Replace placeholder image <code>/public/person.jpg</code> with your portrait.</li>
<li>To preview your CV run <code>npm start</code>. Check out <a href="http://localhost:3000">http://localhost:3000</a>.</li>
<li>Feel free to adjust styles in <code>/less</code> according to your needs.</li>
<li>When finished, run <code>npm run pdf</code> to generate all CVs as pdf. You will find the generated pdfs in <code>/pdf</code>.</li>
</ul>
<h2 id="addingatemplate">Adding a template</h2>
<p>TODO</p>
<h2 id="howtoaddafont">How to add a font</h2>
<p>TODO</p>
<h2 id="contribute">Contribute</h2>
<p>Feel free to create your own templates!</p>
<hr />
<p>Icons made by <a href="http://www.flaticon.com/authors/vectors-market" title="Vectors Market">Vectors Market</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC 3.0 BY</a></p>
<pre><code>&lt;/div&gt;
&lt;script&gt;
var headline = document.getElementsByTagName('h1')[0];
headline.innerHTML += '&lt;img src="public/suitcase.png" width="150" /&gt;';
&lt;/script&gt;
</code></pre>
<p></body></p>
<p></html></p>

View File

@ -16,11 +16,12 @@ function readFileContent(fileName) {
}
async function renderReadMe() {
const readme = await readFileContent('README.md');
const readmeContent = await readFileContent('README.md');
const githubPagesTemplate = await readFileContent('resumes/views/githubPages.mustache');
var html = Mustache.render(githubPagesTemplate, {
content: readme
const readme = Mustache.render(githubPagesTemplate, {
content: readmeContent
});
const html = converter.makeHtml(readme);
writeFile('index.html', html, err => {
if (err) console.log(err)
else console.log('Github pages index.html was successfully generated from README.');