connected-web / product-monitor

A HTML/JavaScript template for monitoring a product by encouraging product developers to gather all the information about the status of a product, including live monitoring, statistics, endpoints, and test results into one place.
8 stars 3 forks source link

Scan `*.content.html` fragments for `<h1>title</h1>` tags, and use this for Navigation #50

Closed Markavian closed 8 years ago

Markavian commented 8 years ago

Currently the format of the file name is used to set the Navigation link.

For example, my-monitor-page.content.html gets converted to My monitor page by replacing dashes.

When generating the navigation, it would be better if the *.content.html fragment be scanned for <h1>title</h1> tags, and use the text content of this field (including only alpha-numeric, dash, quotes, punctuation).

Consider using a library like Cheerio for this purpose.