To write docs, use guard
and rails
as a server.
bundle exec guard
rails s
To work on CSS and new features, you need to run the "development mode" where Tailwind constantly recompiles its CSS file, etc.
Run with
$ foreman start -f Procfile.dev
Note that in this mode, only "real" controller actions work, URLs like /2.1/docs
won't show up formatted.
Browse to
https://localhost:3000/docs
https://localhost:3000/landing
https://localhost:3000/pro
If styles don't show up, run
$ rails assets:clobber
The asset "tailwind.css" is not present in the asset pipeline. (Sprockets::Rails::Helper::AssetNotFound)
Run
rails tailwindcss:build
$ rails site:deploy
Will update dist/
and push everything to main
.
Check crawls, relaunch crawler
https://crawler.algolia.com/admin/crawlers/870e3bcd-5879-4bfd-9d57-8241620b249b/overview
Edit
https://crawler.algolia.com/admin/crawlers/870e3bcd-5879-4bfd-9d57-8241620b249b/configuration/edit
- Use Tailwind CSS utility classes as much as possible.
- Avoid using custom CSS classes as much as possible in
.css
files. - Avoid usage of
@apply
directive. More details here - Check if can extract out repetative HTML into separate components/methods instead of using
@apply
directive.
bin/importmap pin jquery --download
will copy the library to vendor/javascript/jquery.js
GH pages: ONLY docs/ is published under mia.trb.to
RAILS_ENV=production rails assets:precompile RAILS_ENV=production be guard rm -r docs/* cp -R public/2.1/ docs/ && cp -R public/assets docs/ touch docs/index.html
We could remove public/2.1 and public/assets from git control since it's copied to dist/.