From f07617638c3c0f38ca8670dfd5a41ed1d0db50fb Mon Sep 17 00:00:00 2001 From: Okiki Ojo Date: Wed, 23 Mar 2022 20:51:19 +0000 Subject: [PATCH] docs: update seo --- README.md | 2 +- src/pug/about.pug | 23 ++++++++++++----------- src/pug/components/navbar.pug | 4 ++-- src/pug/index.pug | 12 ++++++++---- src/pug/layouts/layout.pug | 11 ++++++----- 5 files changed, 29 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index b7aa71c..37daa12 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ bundle - An online npm package bundle size checker | Product Hunt [![Open In Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/okikio/bundle/blob/main/README.md) -A small online tool for checking the gzipped and minified size of npm packages. +A small online tool for checking the minified gzip/brotli size of npm packages. I used [monaco-editor](https://github.com/microsoft/monaco-editor) for the code-editor, [esbuild](https://github.com/evanw/esbuild) and [rollup](https://github.com/rollup/rollup) as bundler and treeshaker respectively, [pako](https://github.com/nodeca/pako) as a js port of the zlib and gzip libraries, [pretty-bytes](https://github.com/sindresorhus/pretty-bytes) to convert the gzip size to human readable values, and [countapi-js](https://github.com/mlomb/countapi-js) to keep track of the number of page visits, in a private and secure way. diff --git a/src/pug/about.pug b/src/pug/about.pug index 3b1d280..a29ffc6 100644 --- a/src/pug/about.pug +++ b/src/pug/about.pug @@ -15,7 +15,7 @@ block content p strong bundle - | is a quick and easy way to bundle your projects, minify and see it's gzip size. It's an online tool similar to + | is a quick and easy way to bundle your projects, minify and see their gzip and brotli size. It's an online tool similar to a(href="https://bundlephobia.com" target="_blank" rel="noopener") bundlephobia | , but strong bundle @@ -28,13 +28,15 @@ block content a(href="https://github.com/microsoft/monaco-editor" target="_blank" rel="noopener") monaco-editor | for the code-editor, a(href="https://github.com/evanw/esbuild" target="_blank" rel="noopener") esbuild - | and - a(href="https://github.com/rollup/rollup" target="_blank" rel="noopener") rollup | as bundler and treeshaker respectively, - a(href="https://github.com/nodeca/pako" target="_blank" rel="noopener") pako - | as a js port of the zlib and gzip libraries, + a(href="https://github.com/hazae41/denoflate/tree/master" target="_blank" rel="noopener") denoflate + | as a wasm port of gzip, + a(href="https://github.com/denosaurs/deno_brotli/tree/master" target="_blank" rel="noopener") deno_brotli + | as a wasm port of brotli, + a(href="https://github.com/denosaurs/deno_lz4" target="_blank" rel="noopener") deno_lz4 + | as a wasm port of lz4, a(href="https://github.com/sindresorhus/pretty-bytes" target="_blank" rel="noopener") pretty-bytes - | to convert the gzip size to human readable values, and + | to convert the compressed size to human readable values, and a(href="https://github.com/mlomb/countapi-js" target="_blank" rel="noopener") countapi-js | to keep track of the number of page visits, in a private and secure way. br @@ -47,8 +49,11 @@ block content a(href="https://github.com/mizchi/uniroll" target="_blank" rel="noopener") uniroll | project. br + :markdown-it(linkify langPrefix='language-') + > Some of bundle.js.org's latest features were inspired by [egoist/play-esbuild](https://github.com/egoist/play-esbuild) and [hyrious/esbuild-repl](https://github.com/hyrious/esbuild-repl), check them out they each use esbuild in different ways. br - span= "The project isn't perfect, I am still working on an autocomplete, hover intellisence, better mobile support and the high memory usage of " + br + span= "The project isn't perfect, I am still working on an autocomplete, better mobile support and the high memory usage of " strong esbuild span= " and " strong monaco @@ -71,7 +76,3 @@ block content | You can join the discussion on a(href="https://github.com/okikio/bundle/discussions" target="_blank" rel="noopener") github discussions | . - - br - :markdown-it(linkify langPrefix='language-') - > Some of bundle.js.org's latest features were inspired by [egoist/play-esbuild](https://github.com/egoist/play-esbuild) and [hyrious/esbuild-repl](https://github.com/hyrious/esbuild-repl), check them out they each use esbuild in different ways. diff --git a/src/pug/components/navbar.pug b/src/pug/components/navbar.pug index 8e98cce..ad59ebd 100644 --- a/src/pug/components/navbar.pug +++ b/src/pug/components/navbar.pug @@ -7,14 +7,14 @@ mixin nav-list mixin twitter a.btn.btn-highlight(href="https://twitter.com/@okikio_dev" target="_blank" rel="noopener" aria-label="Twitter link") //- span.icon twitter - svg.icon(xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" viewBox="0 0 24 24") + svg.icon(xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" viewBox="0 0 24 24") path(d='M22.46 6c-.77.35-1.6.58-2.46.69c.88-.53 1.56-1.37 1.88-2.38c-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29c0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15c0 1.49.75 2.81 1.91 3.56c-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07a4.28 4.28 0 0 0 4 2.98a8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21C16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56c.84-.6 1.56-1.36 2.14-2.23Z' fill="currentColor" id='🎨-Color') block mixin github a.btn.btn-highlight(href="https://github.com/okikio/bundle" target="_blank" rel="noopener") span.desktop GitHub - svg.mobile.icon(xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" viewBox="0 0 24 24") + svg.mobile.icon(xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" viewBox="0 0 24 24") path(d='M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34-.46-1.16-1.11-1.47-1.11-1.47-.91-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.87 1.52 2.34 1.07 2.91.83.09-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.92 0-1.11.38-2 1.03-2.71-.1-.25-.45-1.29.1-2.64 0 0 .84-.27 2.75 1.02.79-.22 1.65-.33 2.5-.33.85 0 1.71.11 2.5.33 1.91-1.29 2.75-1.02 2.75-1.02.55 1.35.2 2.39.1 2.64.65.71 1.03 1.6 1.03 2.71 0 3.82-2.34 4.66-4.57 4.91.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2z' fill="currentColor" id='🎨-Color') block diff --git a/src/pug/index.pug b/src/pug/index.pug index c803f75..df9a2b2 100644 --- a/src/pug/index.pug +++ b/src/pug/index.pug @@ -123,8 +123,8 @@ block content br .container h2#usage Usage - blockquote When bundling packages that also export CSS and other external files, #[strong bundle.js.org] now checks the gzip size of these external files, even though it won't output any code. Keep this in mind this isn't a bug, however, if it causes confusion I am willing to change this behaviour. - blockquote Treeshaking is available, but since esbuild and rollup don't have direct access to each packages package.json, there might be slight package version conflicts. + blockquote When bundling packages that also export CSS and other external files, #[strong bundle.js.org] now checks the gzip/brotli size of these external files, even though it won't output any code. Keep this in mind this isn't a bug, however, if it causes confusion I am willing to change this behaviour. + blockquote Treeshaking is available, but not all CDNs support access to each packages package.json so there might be slight package version conflicts. The only verified CDN with access to the package.json is #[a(href="https://unpkg.com" target="_blank" rel="noopener") unpkg.com]. blockquote Check the console for error messages and warnings. p You can use custom protocols to specify which CDN the module should come from. @@ -141,7 +141,11 @@ block content //- br li unpkg:react -> #[a(href="https://unpkg.com/react" target="_blank" rel="noopener") https://unpkg.com/react] //- br - li jsdelivr:react -> #[a(href="https://cdn.jsdelivr.net/npm/react" target="_blank" rel="noopener") https://cdn.jsdelivr.net/npm/react] + li deno:react -> #[a(href="https://cdn.jsdelivr.net/npm/react" target="_blank" rel="noopener") https://cdn.jsdelivr.net/npm/react] + //- br + li jsdelivr:react -> #[a(href="https://cdn.jsdelivr.net/npm/react" target="_blank" rel="noopener") https://cdn.jsdelivr.net/npm/react] + //- br + li jsdelivr.gh:facebook/react/packages/react-dom/index.js -> #[a(href="https://cdn.jsdelivr.net/gh/facebook/react/packages/react-dom/index.js" target="_blank" rel="noopener") https://cdn.jsdelivr.net/gh/facebook/react/packages/react-dom/index.js] br p e.g. :markdown-it(linkify langPrefix='language-') @@ -229,7 +233,7 @@ block content li a(class="inline-flex" href="https://opencollective.com/bundle/organization/0/website") div(class="flex gap-2") - img(src="https://opencollective.com/bundle/organization/0/avatar.svg?avatarHeight=128" class="inline-block" width="24") + img(src="https://opencollective.com/bundle/organization/0/avatar.svg?avatarHeight=128" alt="Sheetjs Logo" class="inline-block" width="24") span @sheetjs li And more, etc... //- br diff --git a/src/pug/layouts/layout.pug b/src/pug/layouts/layout.pug index 5c2b0e1..69787f9 100644 --- a/src/pug/layouts/layout.pug +++ b/src/pug/layouts/layout.pug @@ -10,7 +10,7 @@ html.dark(lang="en") meta(http-equiv='X-UA-Compatible' content='IE=edge') meta(name='viewport' content='width=device-width, initial-scale=1') - meta(name='viewport' content='initial-scale=1, viewport-fit=cover') + //- meta(name='viewport' content='initial-scale=1, viewport-fit=cover') link(rel='apple-touch-icon', sizes='180x180', href='/favicon/apple-touch-icon.png') link(rel='icon', type='image/png', sizes='32x32', href='/favicon/favicon-32x32.png') @@ -53,9 +53,9 @@ html.dark(lang="en") let defaults = { url: "/", websiteURL: "https://bundle.js.org", - title: "bundle - a quick online bundler and compressed package size checker", - description: "bundle is a quick and easy way to bundle and minify your ts, js, jsx and npm projects all online. It also allows for checking the compressed gzip or brotli size of bundles. It is similar to bundlephobia but does all the work right on your browser and can treeshake multiple packages together from multiple CDNs.", - keywords: "bundle, rollup, esbuild, gzip, brotli, deno, bundler, bundlephobia, cdn, github, skypack, unpkg, compressed, jsx, online, size, package, minify, es2020, monaco-editor, typescript" + title: "bundle - an online bundler + a npm package size checker", + description: "A quick and easy way to bundle, minify, and compress (gzip and brotli) your ts, js, jsx and npm projects all online, with the bundle file size.", + keywords: "bundle, rollup, esbuild, gzip, npm, brotli, deno, bundler, treeshake, bundlephobia, cdn, github, skypack, unpkg, compressed, jsx, online bundler, size, package, minify, es2020, monaco-editor, typescript" }; block pageInfo @@ -90,8 +90,9 @@ html.dark(lang="en") main#main(data-wrapper) block styles - block seo + //- block seo +seo(page, defaults) + title= page?.title block preload -- knotmirror 0.0.1