Skip to content
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

Display last updated date #1337

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Display last updated date #1337

wants to merge 3 commits into from

Conversation

philhawksworth
Copy link
Member

  • Adds date to content pages
  • Adds conditional operations to Lume for expensive tasks, suitable for skipping during dev work.
    Opt in with BUILD_TYPE=FULL env var when running build task
  • BUILD_TYPE=FULL flag added to production build task
  • deno task serve:full task added for developing with inclusion of expensive operations
  • Production and full builds enhance the date from the file creation date to the git last modified date

Comment on lines +22 to +28
function displayDate(date: string) {
return new Date(date).toLocaleDateString("en-US", {
year: "numeric",
month: "short",
day: "numeric",
});
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to render this as YYYY-mm-dd

also I think this should take a Date arg rather than string

function displayDate(date: Date): string {
  return date.toISOString().slice(0, 10);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants