Getting Started

If you are new to Nift the following guide will help you get started:

  1. If you haven't already installed Nift, you can find install instructions here.
  2. Open up a terminal or 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. Import (or fork and rename) a scaffolding repository project from here.
  4. Go in to the imported/forked repository's settings, go to the Pages settings and set the source to main branch (there may be some delay before the website goes live).
  5. To view the website remotely, open up a browser of your choice and go to:
    https://organization-name.github.io/repo-name
    
    Note if you name the repository:
    organization-name.github.io
    
    then the url will be just:
    https://organization-name.github.io
    
  6. Clone the site repository locally using nift clone <clone-url>, eg.:
    nift clone https://gitlab.com/nsm-templates/parchment-site.git;
    
  7. To view the website locally, open up one of the pages in the output 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 GitHub using nift bcp "commit message" (note: there may be some delay before your changes go live).
  11. Check out the hosting page from the documentation for information about hosting websites.
  12. Try tracking a new page using nift track about/ (note: using about/ will build the page about/index.html, use nift track about if you would prefer it to be about.html).
  13. You can remove the page again with nift rm about/.
  14. Take a look at the files .nift/config.json and .nift/tracked.json, one can avoid opening these using the available Nift commands, however one may also edit the files directly.