mirror of
https://github.com/Xevion/utsa-handbook.git
synced 2025-12-10 06:09:04 -06:00
Trim, console log lastModified
This commit is contained in:
@@ -15,6 +15,10 @@ const isProd = import.meta.env.PROD;
|
||||
const {render, data} = Astro.props;
|
||||
const {title, lastModified} = data;
|
||||
const { Content, headings } = await render();
|
||||
|
||||
if (isProd && lastModified === undefined) {
|
||||
console.log({props: Astro.props, content: Content})
|
||||
}
|
||||
---
|
||||
|
||||
<Main {headings} { ...data}>
|
||||
|
||||
@@ -5,7 +5,7 @@ export const remarkModifiedTime: RemarkPlugins[number] = () => {
|
||||
return function (_, file) {
|
||||
const filepath = file.history[0];
|
||||
const command = `git log -1 --pretty="format:%cI" "${filepath}"`;
|
||||
let result = execSync(command).toString();
|
||||
let result = execSync(command).toString().trim();
|
||||
|
||||
// File is not in git yet
|
||||
if (result === "") {
|
||||
|
||||
Reference in New Issue
Block a user