Skip to content

Latest commit

 

History

History
executable file
·
54 lines (28 loc) · 2.28 KB

README.md

File metadata and controls

executable file
·
54 lines (28 loc) · 2.28 KB

Netlify Status

Magic Lab Website

Static site generator for university research lab website.

Access control is by GitHub account permissions. See allowed collaborators here.

Content Management

Navigate to /admin and log in with your GitHub account.

To create or edit a page

Select the Pages Collection on the left-hand side, and select the page or the "New Page" button.

Make your changes and click the "Publish" button. This will upload the page to GitHub.

It should take 30-60 seconds to deploy from GitHub to the content delivery network. Click the status badge at the top of this README for deployment details.

Development

  1. Clone this project.

  2. Install Node.js and run

     npm install
    

    from the project directory.

  3. Run

     npm run watch
    

    and navigate to http://localhost:4000/

    Changes you make to .pug templates in themes/ and .md files in source/ will update the preview automatically.

To add a new type of page
  1. Define the schema for the page editor in source/admin/config.yml
    See the documentation on Collections and Widgets configuration.

  2. For collections that do not support creating new pages in the CMS, create the page file somewhere in source/, typically as a .md file.

  3. Specify which template to use in the layout field. The default is page.pug. You can create additional layout files in themes/magiclab/layout/.

  4. If desired, you can write preview templates for the CMS in source/admin/index.html. (TODO: automatically load the .pug files on the admin page.)