Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #148 from trailimage/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Jason-Abbott committed Aug 11, 2018
2 parents 4d74fa0 + 45d117a commit 7b22782
Show file tree
Hide file tree
Showing 9 changed files with 274 additions and 392 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"tslint.enable": true,
"eslint.enable": false,
"jest.autoEnable": false,
"typescript.tsdk": "node_modules\\typescript\\lib",
"typescript.tsdk": "node_modules/typescript/lib",
"[handlebars]": {
"editor.formatOnSave": false
}
Expand Down
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
## 4.1.4

- Update copyright date
- Fix lens name normalization
- Fix post category icon
- Increase post cache capacity

## 4.1.3

- Use secure YouTube link
- Use secure YouTube link

## 4.1.2

- Fix navigation ordering (was reversed)

## 4.1.1

= Fix Mapbox pin image reference to use HTTPS
- Fix Mapbox pin image reference to use HTTPS

## 4.1.0

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
"gulp-typescript": "^4.0.0",
"gulp-uglify": "^3.0.0",
"merge2": "^1.2.0",
"nodemon": "^1.8.0",
"nodemon": "^1.18.0",
"through2": "^2.0.3",
"ts-node": "^7.0.0",
"tslint": "^5.10.0",
"typescript": "^2.9.0",
"typescript": "^3.0.0",
"vinyl": "^2.2.0"
},
"repository": {
Expand Down
16 changes: 12 additions & 4 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export function configureModels() {
modelConfig.maxPhotoMarkersOnMap = config.providers.map.maxMarkers;
modelConfig.providers.post = postProvider;
modelConfig.providers.map = mapProvider;
modelConfig.artistsToNormalize = new RegExp(
config.posts.artistNames.join('|')
);
}

async function createWebService() {
Expand Down Expand Up @@ -56,10 +59,15 @@ async function createWebService() {
app.use(Express.static(path.join(root, 'public')));

await blog.load();
// blog must be loaded before routes are defined
route.standard(app);
app.listen(port);
log.info(`Listening on port ${port}`);

if (blog.loaded) {
// blog must be loaded before routes are defined
route.standard(app);
app.listen(port);
log.info(`Listening on port ${port}`);
} else {
log.error('Blog data failed to load. Stopping application.');
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/config/post-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const postProvider: ProviderConfig = {
],
maxRetries: 10,
retryDelay: 300,
useCache: true,
maxCacheSize: 500,
auth: {
apiKey: env('FLICKR_API_KEY'),
secret: env('FLICKR_SECRET'),
Expand Down
Empty file removed src/config/providers.ts
Empty file.
8 changes: 3 additions & 5 deletions src/views/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,16 @@ function categoryIcon(title: string): string {
* HTML tag for mode of travel category icon.
*/
function travelModeIcon(
categories: string[] | { [key: string]: Category }
categories: Map<string, string> | Map<string, Category>
): string {
const icons = config.style.icon;
const map = icons.mode;
const categoryNames = Array.from(categories.keys());

if (!is.array(categories)) {
categories = Object.keys(categories);
}
if (is.value(map)) {
const iconName = Object.keys(map).find(iconName => {
const re = map[iconName];
return (categories as string[]).find(c => re.test(c)) !== undefined;
return categoryNames.find(c => re.test(c)) !== undefined;
});

if (is.value(iconName)) {
Expand Down
2 changes: 1 addition & 1 deletion views/partials/footer.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer class="page content">
<p class="rights"><strong>Text, images and video are &#169; Copyright 2017 Jason Abbott. All Rights Reserved.</strong></p>
<p class="rights"><strong>Text, images and video are &#169; Copyright 2018 Jason Abbott. All Rights Reserved.</strong></p>
<p>Topographic background courtesy of the <a href='http://motoidaho.com/'>Idaho Adventure Motorcycling Club</a></p>
<p>Maps are &#169; Copyright <a href="https://www.mapbox.com/about/maps/">Mapbox</a>
and &#169; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>
Expand Down
Loading

0 comments on commit 7b22782

Please sign in to comment.