Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = (eleventyConfig) => {
eleventyConfig.addShortcode("currentYear", () => new Date().getFullYear());
// Add this line to copy your external assets
eleventyConfig.addPassthroughCopy("src/assets");
eleventyConfig.addPassthroughCopy("src/favicon.ico");
// 1. Recognize YAML as a template format
eleventyConfig.addTemplateFormats("yaml");

Expand Down
Binary file added src/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions src/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ layout: false
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Developer Directory</title>
<link rel="icon" type="image/x-icon" href="{{ '/favicon.ico' | url }}">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The addition of the url filter for the favicon is a good practice for supporting subpath deployments (e.g., GitHub Pages). However, I noticed that the existing stylesheet links on the following lines (11 and 12) do not use this filter. This creates an inconsistency where the favicon might load correctly on a subpath while the CSS fails. For full portability, you should consider applying the url filter to all internal assets in the <head>.

<link rel="stylesheet" href="/assets/css/tailwind.css">
<link rel="stylesheet" href="/assets/css/style.css">
</head>
Expand Down
Loading