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

fix: autogen icons based on last segments #93

Merged
merged 1 commit into from Mar 7, 2024
Merged

fix: autogen icons based on last segments #93

merged 1 commit into from Mar 7, 2024

Conversation

cpreston321
Copy link
Member

@cpreston321 cpreston321 commented Mar 6, 2024

πŸ”— Linked issue

#94

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Resolves: #94

Before

CleanShot 2024-03-06 at 15 42 30@2x

After

CleanShot 2024-03-06 at 15 41 29@2x

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

Deploying with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: 7bf097d
Status:Β βœ…Β  Deploy successful!
Preview URL: https://bc9addac.undocs.pages.dev
Branch Preview URL: https://fix-autogenicons.undocs.pages.dev

View logs

@cpreston321 cpreston321 marked this pull request as ready for review March 6, 2024 20:44
@cpreston321 cpreston321 requested a review from pi0 March 6, 2024 20:49
@pi0 pi0 changed the title fix: autogen icons fix: autogen icons based on last segments Mar 7, 2024
// Filter out non-markdown files
if (!file._id.endsWith('.md')) {
return
}

// Set the icon for the file if it is not already set
if (!file.icon) {
file.icon = await resolveIcon(file._path)
file.icon = resolveIcon(file._path)
Copy link
Member

Choose a reason for hiding this comment

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

I intentionally kept it async to prepare for your external resolver πŸ˜…

Copy link
Member Author

Choose a reason for hiding this comment

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

I will add it back! πŸ˜…

@pi0 pi0 merged commit 9ddaa14 into main Mar 7, 2024
3 checks passed
@pi0 pi0 deleted the fix/autoGenIcons branch March 7, 2024 15:20
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.

autogen icons not correct icon
2 participants