A short app showing a few tailwind starter kit components in seed.
OTHER License
This is a rough imeplementation of the Tailwind Starter Kit in rust seed.
This repo is based on the Seed Quickstart With Webpack sample project, the readme of which is below:
I want to write fast, reliable and efficient web apps. Quickly. And I like Rust and documentation.
LIVE DEMO: quickstart-webpack.seed-rs.org
Main components:
.github/workflows/main.yml
and netlify.toml
). Linters are very strict.How to create your new app, modify it and deploy it - step by step guide.
I want to show you how to create, build and host your website for free, so we will need a public GitHub repository.
The simplest way how to do it is to click on the green button Use this template on the GitHub profile of this quickstart.
Clone your new repository to your local machine. I use GitKraken, but you are probably better developer than me - use your favorite terminal.
Make sure you have basic tools installed:
Platform-specific tools like ssl
and pkg-config
:
These tools are required by some commands:
$ wasm-pack -V
=> wasm-pack 0.8.1
$ cargo install --force wasm-pack
$ cargo make -V
=> cargo-make 0.22.1
$ cargo install --force cargo-make
$ cargo +nightly fmt -- -V
=> rustfmt 1.4.8-nightly (afb1ee1c 2019-09-08)
$ rustup toolchain install nightly
$ rustup component add rustfmt --toolchain nightly
crate
- $ cd crate
$ yarn
$ yarn start
- and then open localhost:8000 in a browser.Ctrl+c
).$ cargo make verify_only
- you shouldn't see any errors.LICENCE
, README.md
and /crate/Cargo.toml
as you wish and push changes into GitHub.$ yarn start
in terminal. I use bash
integrated into IDE (it's installed with Git on Windows).
crate
, but Cargo commands can be run only from crate
.192.168.1.5:8000
) on your phone.Note: You don't have to follow all steps below - reuse starter project code as you need.
/crate/src/page/partial/header.rs
in your IDE.header_visibility
.view
./crate/src/page/partial/footer.rs
in your IDE.view
./crate/src/page/not_found.rs
in your IDE.view
./crate/src/page/home.rs
in your IDE.view
./crate/src/page/about.rs
in your IDE.view
./crate/src/lib.rs
in your IDE.TITLE_SUFFIX
value.MAIL_TO_KAVIK
and MAIL_TO_HELLWEB
.view
./favicons
./entries/templates/favicons.hbs
in your IDE./entries/templates/loading_page.hbs
in your IDE./entries/templates/social_media.hbs
in your IDE./entries/index.hbs
in your IDE./static/fonts
./css/fonts.css
in your IDE./static/images
./static/Martin_Kavik_resume.pdf
./configs/tailwind.config.js
in your IDE.module.exports = {
theme: {},
variants: {},
plugins: []
};
/css/custom.css
in your IDE.How to format, lint and test your project.
And how to setup Github Actions with deploy into Netlify.
$ cargo make fmt
(it overwrites files) or only $ cargo make fmt_check
/crate/rustfmt.toml
/crate/Makefile.toml
- tasks fmt
and fmt_check
$ cargo make clippy
/crate/Makefile.toml
- task clippy
$ cargo make test_h firefox
for headless testing in Firefox.
/crate/Makefile.toml
crate/tests/test.rs
), see seed-rs-realworld for more examples.$ yarn build:prerender
$ serve:dist
$ cargo make verify
before push to make sure CI pipeline will accept your code.
/crate/Makefile.tom
- task verify
(similar task verify_only
is used in CI)./README.md
(Site detail > Settings
> General
> Status badges
).Settings
> General
> API ID)User settings
> Applications
> New access token
> Name it for instance GitHub
)/netlify.toml
to suit your needs. Netlify docs.Settings
and then on Secrets
.NETLIFY_SITE_ID
and set it's value to Site id.NETLIFY_ACCESS_TOKEN
and set it's value to Access token.Actions
in the side menu and make sure that Actions
are enabled./.github/workflows/main.yml
.
yarn build:prerender
with yarn build:release
if you don't want to prerender pages.Actions
to check that everything works.Settings
.NETLIFY_SITE_ID
and set it's value to Site id.NETLIFY_ACCESS_TOKEN
and set it's value to Access token.Current
and click Activate repository
./README.md
(Repository detail > Click on badge next to the rep. name > IMAGE URL
change to MARKDOWN
)/.travis.yml
.
yarn build:prerender
with yarn build:release
if you don't want to prerender pages.More options
> Requests
.Note: Please squash commits and rebase before creating PR. Thanks!