generated from google/eleventy-high-performance-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
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
First post - my journey #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MonikaJassova
added a commit
that referenced
this pull request
Jun 4, 2022
* Add archives page Blogs commonly only display the latest `n` blog posts on the home page, while showing the full list on a separate archive page. This change implements that. * Add code snippet with 2 consecutive new lines This demonstrates the issue that 11ty/eleventy-plugin-syntaxhighlight#5 fixes, and could serve as kind of a regression test for the fix. :) * Add sitemap.xml * Use <time> where applicable * Whitespace * Adds liquid templates to templateFormats * Whitespace, adds fourth sample post * Refactored latest posts and with a correct sort. Uses dates on posts rather than file creation dates (unreliable). * Upgrades dependencies to latest. * Fix href on github pages * Same URL pattern for relative paths that I have seen elsewhere * Using deep data merge (post tag is inherited from posts/posts.json) and updates to use 0.7.0. * Bump version * Add link to quick tip in 404 page. Also a link to home. * Eleventy v0.7.1 * xml date fix * Adds 11ty/eleventy#386 to default eleventy-base-blog config * readme update to include how to host using local webserver for development purposes * Nicer font Taken from: https://bitsofco.de/the-new-system-font-stack/ * Updates dependencies. * Use new eleventyExcludeFromCollections feature in 0.8.0: https://www.11ty.io/docs/collections/#option%3A-exclude-content-from-collections * Updates to 0.8.1 * Updates Eleventy dependency. * Add 'remix on glitch' link to readme Working port of this project on glitch.com * use tagList with full filter instead of just excluding posts * run browsersync in ghost mode The average user probably does not want every reader's scroll position synced to every other reader. * Create FUNDING.yml * Builds feed URL from site URL to reduce replication * Dependency update * Updates to Eleventy 0.9.0 * Updates syntaxhighlight plugin * Remove npx from package.json * Add ZEIT Now one-click deployment * Add jsonfeed to metadata * Add filter for HTML content * Add jsonfeed template * Add jsonfeed to base template * Use `eleventy-navigation` plugin for navigation menu * Navigation plugin needs to work with pathprefix (update dep) * Switches to use more obvious markup menu template for eleventy-navigation * v5.0.1 * A bit less redundant editorial :) * Extra colon * Fix #47 * Rename the variable for #47 * Upgrade dep * Rogue markdown! * Nicer browsersync defaults. * v5.0.2 * system-ui font * Update to v0.10.0 * use JSON.stringify for content * Bump nvmrc to 10 for netlify I tried deploying a site based on the starter to netlify and it failed due to a node mismatch. This got the build to work. * Updates to 0.11.0 * Name update post rebranding * bump eleventy navigation to 0.1.5 * Avoid name clash with `tag` in HTML syntax highlighting * Avoid name clash with `tag` in HTML syntax highlighting * Avoid name clash with `tag` in HTML syntax highlighting * Use eleventyComputed instead of renderData * Update TLD * Reverse order of posts in feed * Allows feed readers to make sure they get the latest post, even of parsing is limited. * Updates navigation dependency. * Reuse feed backs from metadata file and adds comments about it. * Reuse the `url` filter to work with path prefixes. * Clean up the JSON code a bit (don’t need that extra filter) * I don’t think `category` is used here. * Get rid of the _11ty folder—we don’t need it. * Adds next and previous post links. * Rename and add disclaimer * Add CONTRIBUTING file * License header * Initial path of porting industrialempathy.com optimizations * Make the tests pass * Make share button work * Add about info * Default functions dir config * Update the function allow list to work on sample site. * Generic GA ID * Update README * Add pointer to favicon * Lighthouse screenshot * Move opportunities to the back * Clarify disclaimer * Add license headers * Cleanup README * README update * Make tests a bit more robust * Update live site * README update * link 11ty in readme * Avoid test freaking out if site isn't built or files are getting renamed * Remove leftover mp4 file\nFixes #1 * Add explanation in demo site * Create build-and-test.yml * Update the package name (#2) Make CI succeed * Switch order * Change jpeg default quality * Persist image script * Persist images * Support for METADATA_JSON env variable (#3) * Actually support METADATA_JSON (#4) * Implement picture element generation and webp support (#5) - Also removes font preloading to avoid conflict with images. * Lighthouse audit * npm audit * AVIF support (#7) * Comment about _site output dir * LH version is too old * Check for undefined outputPath (#8) If you set `permalink: false` then `outputPath` will either be `null` or `undefined` (can't recall which off the top of my head). This causes the attempt to use `endsWith()` to throw. Changes proposed: - Adds check for the existence of `outputPath` before attempting to use `endsWith()` * More output path guarding * Turn off avif * Set expicit referrer policy * Typos (#13) * Support SVG images Fixes #9 * Support for relative image URLs. * Enable removeOptionalTags html-minifier setting (#11) This setting omits e.g. `</li>` and `</p>` where possible (which is still valid HTML). * Rely on npm $PATH resolution ...instead of expicitly referencing binaries in package.json Fixes #15 Or rather probably fixes. Please reopen the issue if the problem persists. * Replace jimp with sharp in placeholder generation Fixes #10 * Commit package-lock.json * Install npm in function * Syntax is hard * WAT * Bump prismjs from 1.20.0 to 1.21.0 (#23) Bumps [prismjs](https://github.com/PrismJS/prism) from 1.20.0 to 1.21.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](PrismJS/prism@v1.20.0...v1.21.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Patch unit test 1 (#20) While creating the blog from the template, new blogs will start with only one blog and then build but the test assumes there will be more than one blog for all those who have created blogs from the template which is errorneous. Since Git Push is tied to all unit tests passing, this is a hindrance in getting the blog deployed. Closes #19 * Link to original site * Make GA integration off-by-default (#29) * Bump node-fetch from 2.6.0 to 2.6.1 (#30) Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/bitinn/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md) - [Commits](node-fetch/node-fetch@v2.6.0...v2.6.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Quick fix for CSP of auto reload * Slightly more robust CSP sync gen * I clearly need checks for this * Info where cached.js is coming from * Fix GA code not used (#33) If the user is not using GA remove metadata and cached.js * Make images `content-visibility: auto` (#34) * Make images `content-visibility: auto` This makes it so that: - Images are only decoded/rasterized when needed. - The blurry placeholder (which can be expensive) is only ever rendered when images enter the viewport before they load. The main work here is to generate the correct value for `contain-intrinsic-size`. This is achieved by: - Defining a CSS variable with the width of the main article body - Expressing the `contain-intrinsic-size` as a function of this and the image aspect ratio. - Using the images `width` and `height`` as ceiling for the intrinsic size. More info https://web.dev/content-visibility/#skipping-rendering-work-with-content-visibility * README update * Fix image over navbar (#35) "Content-visibility: auto" move the images over the other elements. Set z-index to keep the nav over the rasterized images. * Fix typos (#36) * Add oryx_prod_node_modules to fix compatibility with Azure Websites (#40) The folder being ignored is automatically brought in by Azure Static Website's default deployment mechanism, and will break the default build process of eleventy. Ignoring it fixes the issue of trying to syntax highlight files in that directory * Do a better job documenting how to extend the CSP Fixes #41 * Spell out CSP and provide and inline escript example * Fix frame-src spelling in comment * Rename one of the 2 csp.js files to avoid confusion * Change sitemap to also consider the last modified date of the input file * Shell out to git for a better last modified date * Avoid hardcoding image dimensions in test Fixes #42 * Explicit liberal indexing * Make updating the test "should have script elements" easier (#43) * Cache the lastModifiedDate git invocation * Always scale the input image to desired output size. (#45) Fixes #44 * Update tags.njk (#46) `<h1>Tagged “{{ tag }}”</h1>` is redundant since we already render the title `Tagged “{{ tag }}”` * Update tags.njk (#47) * Restore tagList collection (#48) * Patch netlify function dependencies (#49) * Adding .netlify folder to .gitignore * Bump the Netlify function dependencies upstair * npm audit fix Fixes #51 * Make reading minutes always >= 1. (#52) * Make updating the test "should have script elements" easier * Make reading minutes always >= 1. * Prevent duplicate link rel prefetches and prefetching the current page (#54) * Prevent duplicate link rel prefetches and prevent prefetching the current page. Add two checks against the prospective href to prefetch: 1. Has the href already been prefetched? 2. Is the href equal to the current page? There is not a benefit to duplicate prefetches or prefetching the current page. If either check is true, return without prefetching the href. * Remove unnecessary check for duplicate fetches as prefetch cache should already account for this. * Include query string in the URL comparison (exclude the fragment). Co-authored-by: nickFalcone <nfalcone@u.rochester.edu> * Ensure variable font is used on actual content (#55) The variable font was only set on the html element, while the body and certain other elmeents always had the static fonts applied. This resulted in the static fonts always getting loaded, even if the browser supports variable fonts. * Format CSS Related to #57 * When resizing images rotate them based on metadata. This is needed because we throw away the metadata during resizing. * .eleventyignore: Also ignore .netlify/ to avoid template rendering error. (#63) The error was reported at cdeleeuwe/netlify-plugin-submit-sitemap#18. Since Netlify is also a growing service for hosting static sites, this will save people a lot of time debugging. * Add native sharp avif support (#64) * Add core web vitals (#62) * Add Core Web Vitals UMD library and include in base.njk * Send GA event with data for CLS, FID, and LCP. * Add license and attribution info. * Add flag to control sending web vitals data to GA * Add module to check web vital opt-in and that library exists * Web vitals script is dependent on GA - move inside check for GA * Update test to account for potential web vitals script * Fix small typo * Indent to show nesting * Mention sending CWV to GA * Move function to send CWV metrics to web-vitals.js * Check for web vitals library independently of user opt-in * Remove function to send CWV metrtics. Make web vitals library independent of GA * Send CWV metrics to GA from main.js * Remove console log * Check web vitals library separately from GA * Return early if user opts-out of sending CWV * Create function to inject script. Inject CWV script if user opts-in to sending metrics * Remove web-vitals.js and inject if user opts-in. Add attribute to body to check opt-in * Revert back to original script test as web-vitals may be injected dynamically * Send web vitals off by default * Simplify and just return metadata.sendWebVitals. * Ignore error case * Check data-cwv-src attribute of current script for web-vitals.js * Move data-cwv-src attribute from body to script, add hash. * Avoid the header hiding the content on anchor scroll. * Bump ini from 1.3.5 to 1.3.8 (#59) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](npm/ini@v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Transform back-slashes to slashes in generated URLs (#66) * Allow for tags with spaces (#68) * contain-intrinsic-size no longer needed https://www.industrialempathy.com/posts/image-optimizations/#update-01%2F27%2F2021-contain-intrinsic-size-no-longer-needed * npm audit fix * Make font-display optional instead of swap. The CLS impact of swap is too bad * Fix z-index of dialog * Better quality factor for AVIF * Bump pug-code-gen from 2.0.2 to 2.0.3 (#74) Bumps [pug-code-gen](https://github.com/pugjs/pug) from 2.0.2 to 2.0.3. - [Release notes](https://github.com/pugjs/pug/releases) - [Commits](https://github.com/pugjs/pug/compare/pug-code-gen@2.0.2...pug@2.0.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add support for GIFs and auto-transcode them to MP4 (#77) * npm audit fix * Mention GIF transcode feature in README * Add missing license header * Mention incompatibility with GA4 Fixes #69 * Bump y18n from 4.0.0 to 4.0.1 (#79) Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * npm audit fix * Use a resized image as fallback image. Fixes #81 * Bump lodash from 4.17.20 to 4.17.21 (#83) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.20...4.17.21) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump hosted-git-info from 2.8.8 to 2.8.9 (#84) Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](npm/hosted-git-info@v2.8.8...v2.8.9) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ws from 7.3.0 to 7.4.6 (#85) Bumps [ws](https://github.com/websockets/ws) from 7.3.0 to 7.4.6. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@7.3.0...7.4.6) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Ensure page.url is defined before dereferncing it (#86) When a post has `permalink` set to false, though no output file is generated, the file is still processed with the `url` property set to false. Thus, the expression in base.njk testing the `url` property must ensure page.url is defined in advance. * Add automatic code analysis * Bump prismjs from 1.23.0 to 1.24.0 (#88) Bumps [prismjs](https://github.com/PrismJS/prism) from 1.23.0 to 1.24.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](PrismJS/prism@v1.23.0...v1.24.0) --- updated-dependencies: - dependency-name: prismjs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump path-parse from 1.0.6 to 1.0.7 (#93) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Patch odd height gifs (#95) Original issue: HackerspaceMumbai/eleventy-high-performance-blog#34 * Upgrade sharp because of https://twitter.com/zachleat/status/1428016570463408139 * npm audit fix * npm audit fix --force * Fix AVIF images due to https://twitter.com/zachleat/status/1428016570463408139 * No more node 10 support * Fix tiny gap in code snippets (#97) As done in Kimeiga/bahunya#8 * Depend on newer node due to sharp dependency * Bump ffmpeg-static from 4.2.7 to 4.4.0 (#100) * Preload font and switch to a single variable font (#103) Preloads fonts to ensure 100 score on LH. Also, it is the right compromise for simplicity. Switches to a variable font such that: - preloading is trivial because there is only a single file for all pages such that preloads don't depend on CSS matching. - and we save A LOT of bytes from not only downloading one slightly bigger fonts instead of 4-6 almost as large files. * Bump prismjs from 1.24.0 to 1.25.0 (#105) Bumps [prismjs](https://github.com/PrismJS/prism) from 1.24.0 to 1.25.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](PrismJS/prism@v1.24.0...v1.25.0) --- updated-dependencies: - dependency-name: prismjs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improve docs for how to modify the CSP (#110) * Delete .travis.yml (#112) Remove `.travis.yml` which isn't needed as changes are being deployed to Netlify * Basic ability of Drafting posts (#101) * drafting posts init. commit * Draft post test * Revert removing tests during build * Working solution which supports permalink: false, added test for draft posts set on the future * Got rid of permalink:false, replaced w. draft:true, deleted 7th post, fixed test to refer to the correct files * Fixed title for sixthpost, implemented dev mode detection * Prettier formatting for posts.11tydata.js * skip tests, on eleventy serve * prettier formatting for draft tests * clean posts/* files after build, added build-ci to avoid cleaning step on ci * DRY change for the build command * Added scheduled front matter section of all md files, use scheduled on filtering posts, when scheduled is not present in the md file, it is considered published * Use CSP header instead of meta tag (#115) * Use CSP header instead of meta tag * Replace custom headers with csp headers * Comment the use of middleware in BS configuration * Copy _headers to _site using sync mode * Update CSP description Replaced the reference to the base template as we now use the csp headers * Add csp policy for pages not found * Update plugin name * Ensure backward compatible with older browsers. * Restore previous policy * Add a strong csp policy for pages not found * Add test for CSP header * Fix bug in URL generation for _headers file * Make header CSP more robust * Avoid issues with blurred images and transparency. Correctly handle PNG source images (#121) - Removes the race condition where memory cached images may keep their blurred images in the background which shine through with transparent foreground images. - Fallback to PNG instead of JPEG if the input image is a PNG. Keeps AVIF and WEBP lossy compression as they do support transparency. Fixes #120 * npm audit fix --force * added first post, hidden sample ones * Bump markdown-it from 8.4.2 to 12.3.2 (#122) Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 8.4.2 to 12.3.2. - [Release notes](https://github.com/markdown-it/markdown-it/releases) - [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md) - [Commits](markdown-it/markdown-it@8.4.2...12.3.2) --- updated-dependencies: - dependency-name: markdown-it dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * added dark/light mode switch * fixed text * changed mode label * GoatCounter try * GoatCounter try 2 * GoatCounter try 3 * removed GA, updated index * journey post, minor edits * final edits * [EMPTY] Trigger build * added manual trigger to GHA * fixed GHA yml * Resources post (#4) * added resources post * final version * fix typo * Spark post (#5) * initial commit * formatting fixes * almost there * final version * fixes Co-authored-by: Mathias Bynens <mathias@qiwi.be> Co-authored-by: Zach Leatherman <zachleat@users.noreply.github.com> Co-authored-by: Zach Leatherman <zachleatherman@gmail.com> Co-authored-by: Kitt Hodsden <gh@kh47.com> Co-authored-by: Nick Novak <novaknt@umich.edu> Co-authored-by: dhoman <dhoman@huskers.unl.edu> Co-authored-by: Krzychu <krzychukula@gmail.com> Co-authored-by: Cassey Lottman <clottman@users.noreply.github.com> Co-authored-by: Ben Edwards <hello@benedfit.com> Co-authored-by: Steven <steven@ceriously.com> Co-authored-by: Benji Encalada Mora <benjifs@users.noreply.github.com> Co-authored-by: Damon Muma <damuma@gmail.com> Co-authored-by: Amandeep Singh <amandeepsingh.bajwa@gmail.com> Co-authored-by: fschoenfeldt <frederikschoenfeldt@gmail.com> Co-authored-by: Andrea Verlicchi <verlok@users.noreply.github.com> Co-authored-by: Will Boyd <will@codersblock.com> Co-authored-by: David A. Kennedy <me@davidakennedy.com> Co-authored-by: Malte Ubl <malteubl@google.com> Co-authored-by: Malte Ubl <malte.ubl@gmail.com> Co-authored-by: Malte Ubl <cramforce@users.noreply.github.com> Co-authored-by: Rob Dodson <robdodson@users.noreply.github.com> Co-authored-by: Augustine Correa <augcor@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrea Leardini <andrea@wikilear.it> Co-authored-by: Android Dev Notes <awesomedevnotes@gmail.com> Co-authored-by: Erik O'Leary <969938+onionhammer@users.noreply.github.com> Co-authored-by: Bao Nguyen <nlbao@users.noreply.github.com> Co-authored-by: Steve Dunn <steve@dunnhq.com> Co-authored-by: Nick Falcone <nicholas.e.falcone@gmail.com> Co-authored-by: nickFalcone <nfalcone@u.rochester.edu> Co-authored-by: Bram Gotink <bram@gotink.me> Co-authored-by: Peter Thaleikis <spekulatius@users.noreply.github.com> Co-authored-by: Lance Chen <cyen0312@gmail.com> Co-authored-by: Muhammad Mufid Utomo <70360519+mufidu@users.noreply.github.com> Co-authored-by: Pierre Gordon <16200219+pierlon@users.noreply.github.com> Co-authored-by: Saugat Acharya <mesaugat@gmail.com> Co-authored-by: Zoli Veres <zltnvrs@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.