CenterForDigitalHumanities / CenterForDigitalHumanities/rerum
Unwrap the Angular Routing
- Dominant language
- JavaScript
- Stars
- 11
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
This is in relation to app.js, which sets the routing for the app.
Most of this file can go away and be replaced with [YAML and Jekyll Front Matter syntax ](https://jekyllrb.com/docs/front-matter/) on the HTML page. For example https://rerum.io/#/about is routed like this in app.js
```javascript
var rerum = angular.module('rerum', ['ui.bootstrap', 'ngRoute', 'ngAnimate','ngSanitize', 'angular-loading-bar', 'cfp.hotkeys', 'utils']);
rerum.config(['$routeProvider', '$locationProvider',
function ($routeProvider, $locationProvider) {
...
.when('/about', {
templateUrl: 'app/about/about.html'
})
}])
```
That is a fair amount of overhead for a static community site. Instead, all that is needed is an /about directory or a /public/about.html file with some YAML at the top.
```YAML
---
title: About Page
permalink: /about
---
```
Do this for all static pages that are routed to by this app.js file.
Contributor guide
Research direction
Start by reading app.js and the static-page routes it defines, then review the linked pull request (#89) and the Jekyll front-matter documentation. Done means every static page routed there has an equivalent directory or public HTML page with front matter and the old routing overhead is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jekyll
- Domain
- frontend, web-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100