-
Notifications
You must be signed in to change notification settings - Fork 77
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
Format <head> correctly #225
Comments
What's the limit of what is going to be supported in head? there are lots of meta tag, is bankai going to support them all? |
Also these require a ton of assets to be generated and served from an art perspective. |
@YerkoPalma v good question. I'm kinda feeling 👎 on supporting overly Apple-specific things. Given they'll be adding WebWorkers soon, it probably also means they'll get behind the manifest spec. For example the pinned safari icon is probably too much (ugh, egh, blegh). The |
@toddself yeah, for sure! Was thinking we do two things to make this less of a hassle:
|
@yoshuawuyts agree, but that tag was just an example 😃 Edit: head-it also could help |
@YerkoPalma woah, thanks for sharing! - that link is both super useful, and mad daunting. There's so much stuff ;_; |
Ohh, another cool one is dns-prefetching; allows warming up the cache for external requests. String matching on a JS bundle should get us a longgg wayyyy C: |
Oh, found out how to do sitemaps too! Useful for search engines. The way to do it is by creating a Sitemap: <sitemap_location> The sitemap URL requires a full text thingy; for example: Sitemap: http://www.example.org/sitemap.xml The coolest about this, is that you can include links to videos in sitemaps too; heaps of stuff we can do here! ✨ |
How would you know how to include routes in the sitemap? since bankai builds a single js file with a single html entry point you can't use files to figure out routes, and without knowing what router is being used there is no simple way to find defined routes. |
@YerkoPalma we already do SSR in the last version of bankai; this is done by looking at exports and fingerprinting the internals (e.g. figuring out if it's choo, we don't support anything else right now). From there it's only a matter of implementing the sitemap ✨. Would be cool if we could have an |
That sentence is key. I always though of bankai as a framework agnostic library. Anyway, if we can detect if it is a choo app, then bankai could automatically generate sitemap.xml, otherwise, allow users to enter an array of routes and make a sitemap.xml file |
@YerkoPalma it is! - It's nicely abstracted away, so people can add other frameworks too if they like. I just haven't put in the work, because, well I don't use anything else haha. PRs welcome tho! |
I have used bankai with other stacks and works nice. Just had troubles with custom file structures, but everything else just works |
This mostly means generating a ton of icons, and being smart about it. But from the looks of it we can do this from 3 required resources:
icon-512x512.png
formanifest.json
safari-icon.svg
forsafari-pinned-tab
(needs to be black/white square, see this tutorial).png
with dimensions of1500x1120
In addition we'll need the following values:
title
- used to describe the page in the browser's tabsdescription
- used to describe what the page is, in long form; used by search engines and the like. Can be derived frommanifest.json
themeColor
- used to change the color of the header on mobile. Can be derived frommanifest.json
twitterName
- name of the organization on twitter. Useful for shares.mainUrl
- the homepage for the siteReference
The text was updated successfully, but these errors were encountered: