-
Notifications
You must be signed in to change notification settings - Fork 419
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
fix: get image path from HTML <img src=""> tag #493
base: main
Are you sure you want to change the base?
Changes from all commits
78f9cee
571889f
4bd3273
6df50d7
88cdbc0
2890d9b
bde37e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ const getSlideAnchor = featuredSlide => { | |
export default async (initialUrl, targetDir) => { | ||
const { featuredSlide } = getOptions(); | ||
|
||
if (!featuredSlide || !puppeteer) { | ||
if ((!featuredSlide && featuredSlide !== 0) || !puppeteer) { | ||
return; | ||
} | ||
|
||
|
@@ -34,7 +34,8 @@ export default async (initialUrl, targetDir) => { | |
const snapshotFilename = `${targetDir}/featured-slide.jpg`; | ||
|
||
const url = `http://${host}:${port}/${initialUrl}${getSlideAnchor(featuredSlide.toString())}`; | ||
|
||
|
||
console.log("🚀 ~ url:", url) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this isn't supposed to be part of this PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, I should clean this before pushing |
||
debug({ url, snapshotFilename, puppeteerLaunchConfig }); | ||
|
||
try { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ const getFileMeta = async filePath => { | |
// Exports --------------------------------------------------------------------- | ||
|
||
export const renderListFile = async filePaths => { | ||
const { title, listingTemplate, theme, assetsDir } = getOptions(); | ||
const { title, description, listingTemplate, theme, assetsDir } = getOptions(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where's |
||
const template = await getListingTemplate(listingTemplate); | ||
const themeUrl = getThemeUrl(theme, assetsDir, '.'); | ||
let files = await Promise.all(filePaths.map(getFileMeta)); | ||
|
@@ -36,6 +36,7 @@ export const renderListFile = async filePaths => { | |
base: '', | ||
themeUrl, | ||
pageTitle: title, | ||
description, | ||
files, | ||
date: new Date().toISOString() | ||
}); | ||
|
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.
Why this change? Might be a breaking change to some and it's a bit much for one PR.
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.
GitHub seems to change the folder name if there is a dash at the start of the name. See Linking to a page with a dash (hyphen) in the title In GitHub wiki