Skip to content

polklabs/PolkLabs

Repository files navigation

PolkLabs

How to add a Project

  1. Add initial info to projectList.json with a unique PROJECT_ID
  2. Create separate json file in /src/assets/json/projects, with the filename matching the PROJECT_ID in projectList.json
  3. Add any necessary content to /src/assets/content/projects/PROJECT_ID/, such as header.png

Optional Prerendering Steps

The previous steps will work on their own but will not show up in google searches

  1. Run python routesGen.py to generate routesFile.txt, needed for prerendering
  2. Edit /src/apps/prerendered/prerender-project.ts, add import for json, add PROJECT_ID to switch case

Publishing

Run npm run ghpages

For prerendering, no longer used

  1. Remove /dist/ folder
  2. Run npm run build, output will be in /dist/PolkLabs/browser
  3. cd into output folder /dist/PolkLabs/browser
  4. git init
  5. git add .
  6. git commit -m "Initial commit"
  7. git remote add origin [email protected]:polklabs/PolkLabs.git
  8. git push --force origin master:gh-pages

To add a blog post, perform the above steps replacing project(s) with blog(s)


This project was generated with Angular CLI version 8.3.20.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.