mirror of
https://github.com/Xevion/utsa-handbook.git
synced 2025-12-10 16:09:05 -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 {render, data} = Astro.props;
|
||||||
const {title, lastModified} = data;
|
const {title, lastModified} = data;
|
||||||
const { Content, headings } = await render();
|
const { Content, headings } = await render();
|
||||||
|
|
||||||
|
if (isProd && lastModified === undefined) {
|
||||||
|
console.log({props: Astro.props, content: Content})
|
||||||
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
<Main {headings} { ...data}>
|
<Main {headings} { ...data}>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export const remarkModifiedTime: RemarkPlugins[number] = () => {
|
|||||||
return function (_, file) {
|
return function (_, file) {
|
||||||
const filepath = file.history[0];
|
const filepath = file.history[0];
|
||||||
const command = `git log -1 --pretty="format:%cI" "${filepath}"`;
|
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
|
// File is not in git yet
|
||||||
if (result === "") {
|
if (result === "") {
|
||||||
|
|||||||
Reference in New Issue
Block a user