npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jsonresume-theme-mu

v0.1.4

Published

Matteo Ugolini theme for JSON Resume

Downloads

3

Readme

Boilerplate theme

This is the boilerplate theme for JSON Resume.

Getting started

To get started with theme development, this is what you'll need:

If you're on Linux, you can simply run:

sudo apt-get install nodejs-legacy npm

Or if you're on OSX and got Homebrew installed:

brew install node

Install the command line

We're going to use the official resume-cli to run our development server.

Go ahead and install it:

sudo npm install -g resume-cli

Download theme

Lets go ahead and download a copy of the repository.

Install npm packages

We need to install the dependencies. cd into the theme folder we just downloaded and run:

sudo npm install

This will read the local package.json and install the packages listed under dependencies.

Serve theme

While inside the theme folder, simply run:

resume serve

You should now see this message:

Preview: http://localhost:4000
Press ctrl-c to stop

Congratulations, you've made it!

The theme development can now begin.

Development

Overview

Now that you have your boilerplate theme installed, go through a quick overview of each of the files needed for your JSONResume theme:

  • package.json: Your package.json is required by all npm packages. Everytime you want to release a new update of your theme, you'll need to update it's version number.
  • index.js: This is the file that will return the needed HTML to the theme server. You can use it to process some things with your theme first, but we'll talk about that a bit later.
  • resume.template: This is your actual template. This file is sent to the index.js for it to sent to the theme server.
  • style.css: This is where all the CSS of your project goes. Since the index.js only returns HTML, the contents of this file are put between <style> tags in your resume.template file.

In order to get values from an actual JSONResume, you'll need to use a templating system, such as Mustache or Handlebars. The default boilerplate theme uses Handlebars.

package.json

Because you'll need to publish this as your own soon, you'll need to change some of the fields. You can replace the name field with your own theme name, so long as it starts with jsonresume-theme-. This prefix will allow your theme to be found by the theme server during deployment.

Next, you'll want to change the description and author. You can change the description to anything you'd like, and the author should be your name.

If you are also putting your theme up on Github, you'll probably want to keep the repository field, but replace the url with your own.

Lastly, you can put all of your theme dependencies in the dependencies field. As you can see, we already have Handlebars as one of the dependencies. If you wish not to use Handlebars, you may remove this, and replace it with another templating system.

index.js

The index.js is where all the compiliing of your theme, and neccessary edits will go.

At the top, you can already see the Node.js require function being used with the dependencies. You can obviously add own dependencies, if you are planning on using a different templating system, you can remove it.

The most important part of index.js is the render function. This is where all the compilation goes. This render function is expected to take a resume object (from a resume.json), and should return HTML. In this case, it is returning a compiled Handlebars document. If you removed the Handlebars dependency, you'll want to remove it and replace it with your own templating system compilation.

Above the return line are css and template variables. Using the Node.js fs module, it reads first the style.css and the resume.template.

resume.template

The resume.template file is where the actual template is. It contains all of the markup needed for your resume. By default, this is a Handlebars document, but it can obviously be changed into a different templating document.

style.css

Last but not least, the style.css defines your styles. Technically, this is completely optional, as you could just write all of your styles in the <style> tags of your resume.template. As the index.js, the contents of the style.css are put into the <style> tags of your compiled theme later, yet again, this is something can change.

Deployment

If you are familar with NPM, you should be done with this in no time.

If you already have an NPM account, you can run npm login and enter your username and password. If not, you can run npm adduser and fill in the proper fields.

If you changed the dependencies or added new ones, you'll want to run npm install again, and just to make sure, run npm update to get the latest version of each dependency.

When you are done with that, you may go into your package.json, and edit the version number. When all of the above is finished, you may run npm publish to release your theme to the public. Now everyone can use your theme with their resume.

When updating your theme, you'll need to change the version number and run npm publish again.

License

Available under the MIT license.