-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
footer statistics #207
footer statistics #207
Conversation
add commit date to footer |
review notes and added test. |
expect(statistics.revision).toBe('hash123'); | ||
expect(statistics.revisionAbbr).toBe('hsh'); | ||
expect(statistics.revisionDate).toBe('2019-06-07'); | ||
expect(statistics.generationDate).toMatch(/\d{4,}-\d\d-\d\d/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just do .toMatchSnapshot() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just do .toMatchSnapshot() ?
Generation date will be different every time, so snapshot will not match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would something like this work?
.toMatchSnapshot({
generationDate: expect.match(/../),
});
</p> | ||
<p> | ||
Generated {{ generationDate }}, based on commit | ||
<a href="https://github.com/nycJSorg/30-seconds-of-angular/tree/{{ revision }}" target="_blank">{{ revisionAbbr }}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have it in site metadata? We're going to move the repo soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this information belongs to metalsmith meta. It's much easier to change link in template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/nycJSorg/30-seconds-of-angular
this part certainly should not be it 10 different templates
Adds statistics information in the footer
closes #196