Get Started

Guide to getting started using Nift

unDraw teaching illustration

If you are new to Nift the following guide will help you get started. To understand how Nift/nsm works even better check out the Nift tutorials which will give you a more thorough understanding of how different parts of Nift work.

The easiest way to learn how Nift works is to get your feet wet and hands dirty. If there are any problems with the following guide please file an issue here or here.

  1. If you haven't already installed Nift, you can find install instructions here;
  2. Open up a terminal or command prompt/power shell window and enter nsm commands to get a list of available commands (check out the Nift commands page from the documentation for information about Nift commands);
  3. On Bitbucket, GitHub or GitLab import (or fork and rename) an existing site repository template from here;
  4. If you used GitHub for the last step, go in to the imported/forked repository's settings, scroll down to GitHub Pages and set the source to master branch (there may be some delay before your website goes live);
  5. To view the website remotely, open up a browser of your choice and go to:
    https://[user/team/organisation/group-name].[bitbucket/github/gitlab].io/repo-name
    
    Note if you name the repository:
    [user/team/organisation/group-name].[bitbucket/github/gitlab].io
    
    then the url will be just:
    https://[user/team/organisation/group-name].[bitbucket/github/gitlab].io
    
  6. Clone the site repository locally using nsm clone clone-url, eg.:
    nsm clone https://gitlab.com/nsm-templates/parchment-site.git;
    
  7. To view the website locally, open up one of the pages in the site directory with a browser of your choice;
  8. Try modifying some of the files in the content directory and run nsm build-updated, then refresh your browser to view the changes (check out the documentation pages for functions giving information about functions you can use and n++ which is the template language being used;
  9. Try modifying some of the files in the template directory and run nsm build-updated, then refresh your browser to view the changes (check out the template files page from the documentation for information about writing template files);
  10. You can push your changes back to Bitbucket/GitHub/GitLab using nsm bcp "commit message" (there may be some delay before your changes go live).
  11. Check out the hosting page from the documentation for information about hosting websites. Especially useful is Netlify for custom domains with auto renewing Let's encrypt certificates or Heroku for free hosting of dynamic websites;
  12. Check out the mathematics page from the documentation for information about $\LaTeX$ support for your webpages using MathJax;
  13. Check out the code blocks page from the documentation for information about syntax highlighting support for your webpages using Google Code Prettify;
  14. Check here for all sorts of useful links.