You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-24Lines changed: 23 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,18 +75,17 @@ I want to show you how to create, build and host your website for free, so we wi
75
75
76
76
## 3. Prepare your project for work
77
77
78
-
1. Open terminal in your project and go to directory `crate` - `$ cd crate`
78
+
1. Open terminal in your project
79
79
1. Install Webpack and other dependencies - `$ yarn`
80
80
1. Try to start dev-server - `$ yarn start` - and then open [localhost:8000](http://localhost:8000) in a browser.
81
81
1. Stop server (try `Ctrl+c`).
82
82
1. Try to lint your project - `$ cargo make verify_only` - you shouldn't see any errors.
83
-
1. Modify files like `LICENCE`, `README.md` and `/crate/Cargo.toml` as you wish and push changes into GitHub.
83
+
1. Modify files like `LICENCE`, `README.md` and `Cargo.toml` as you wish and push changes into GitHub.
84
84
85
85
## 4. Write your website
86
86
87
87
1. Open project in your favorite IDE. I use [IntelliJ](https://www.jetbrains.com/idea/download) or [VS Code](https://code.visualstudio.com/).
88
-
1. Run `$ yarn start` in terminal. I use `bash` integrated into IDE (it's installed with Git on Windows).
89
-
-_Note_: Yarn commands can be run from project root or from directory `crate`, but Cargo commands can be run **only from `crate`**.
88
+
1. Run `$ yarn start` in terminal.
90
89
1. Open [localhost:8000](http://localhost:8000) in a browser.
91
90
1. You can open it also in your mobile phone:
92
91
1. Make sure your dev-server aka computer is in the same network as your phone.
@@ -97,73 +96,73 @@ _Note_: You don't have to follow all steps below - reuse starter project code as
97
96
98
97
### Header
99
98
100
-
1. Open `/crate/src/page/partial/header.rs` in your IDE.
99
+
1. Open `src/page/partial/header.rs` in your IDE.
101
100
1. Delete function `header_visibility`.
102
101
1. Write a new body for function `view`.
103
102
104
103
### Footer
105
104
106
-
1. Open `/crate/src/page/partial/footer.rs` in your IDE.
105
+
1. Open `src/page/partial/footer.rs` in your IDE.
107
106
1. Write a new body for function `view`.
108
107
109
108
### 404
110
109
111
-
1. Open `/crate/src/page/not_found.rs` in your IDE.
110
+
1. Open `src/page/not_found.rs` in your IDE.
112
111
1. Write a new body for function `view`.
113
112
114
113
### Home page
115
114
116
-
1. Open `/crate/src/page/home.rs` in your IDE.
115
+
1. Open `src/page/home.rs` in your IDE.
117
116
1. Write a new body for function `view`.
118
117
119
118
### About page
120
119
121
-
1. Open `/crate/src/page/about.rs` in your IDE.
120
+
1. Open `src/page/about.rs` in your IDE.
122
121
1. Write a new body for function `view`.
123
122
124
123
### App core
125
124
126
-
1. Open `/crate/src/lib.rs` in your IDE.
125
+
1. Open `src/lib.rs` in your IDE.
127
126
1. Change `TITLE_SUFFIX` value.
128
127
1. Delete `MAIL_TO_KAVIK` and `MAIL_TO_HELLWEB`.
129
128
1. Write a new body for function `view`.
130
129
131
130
### Favicons
132
131
133
132
1. Delete or replace files in `/favicons`.
134
-
1. Open `/entries/templates/favicons.hbs` in your IDE.
133
+
1. Open `static/templates/favicons.hbs` in your IDE.
135
134
1. Delete content or update it.
136
135
-_Note_: Templates are written in [Handlebars](https://handlebarsjs.com/).
137
136
138
137
### Loading page
139
138
140
-
1. Open `/entries/templates/loading_page.hbs` in your IDE.
139
+
1. Open `static/templates/loading_page.hbs` in your IDE.
141
140
1. Delete content or update it.
142
141
143
142
### Social media & basic settings
144
143
145
-
1. Open `/entries/templates/social_media.hbs` in your IDE.
144
+
1. Open `static/templates/social_media.hbs` in your IDE.
146
145
1. Delete content or update it.
147
146
148
147
### Basic HTML
149
148
150
-
1. Open `/entries/index.hbs` in your IDE.
149
+
1. Open `static/index.hbs` in your IDE.
151
150
1. Update content.
152
151
153
152
### Fonts
154
153
155
-
1. Delete or replace files and directories in `/static/fonts`.
154
+
1. Delete or replace files and directories in `static/fonts`.
156
155
1. Open `/css/fonts.css` in your IDE.
157
156
1. Delete content or update it.
158
157
159
158
### Images & other files
160
159
161
-
1. Delete or replace files in `/static/images`.
162
-
1. Delete `/static/Martin_Kavik_resume.pdf`.
160
+
1. Delete or replace files in `static/images`.
161
+
1. Delete `static/Martin_Kavik_resume.pdf`.
163
162
164
163
### TailwindCSS
165
164
166
-
1. Open `/configs/tailwind.config.js` in your IDE.
165
+
1. Open `tailwind.config.js` in your IDE.
167
166
1. Update content or replace it with the default one:
168
167
169
168
```js
@@ -189,25 +188,25 @@ And how to setup Github Actions with deploy into Netlify.
189
188
190
189
1. Format: `$ cargo make fmt` (it overwrites files) or only `$ cargo make fmt_check`
191
190
1. You can modify format settings in:
192
-
-`/crate/rustfmt.toml`
193
-
-`/crate/Makefile.toml` - tasks `fmt` and `fmt_check`
191
+
-`rustfmt.toml`
192
+
-`Makefile.toml` - tasks `fmt` and `fmt_check`
194
193
1. Lint: `$ cargo make clippy`
195
194
1. You can modify linter settings in:
196
-
-`/crate/Makefile.toml` - task `clippy`
195
+
-`Makefile.toml` - task `clippy`
197
196
198
197
### Testing
199
198
200
199
1. Run `$ cargo make test_h firefox` for headless testing in Firefox.
201
-
- There are more similar commands - see `/crate/Makefile.toml`
202
-
-_Note_: There is only one test in this project (`crate/tests/test.rs`), see [seed-rs-realworld](https://github.com/seed-rs/seed-rs-realworld) for more examples.
200
+
- There are more similar commands - see `Makefile.toml`
201
+
-_Note_: There is only one test in this project (`tests/test.rs`), see [seed-rs-realworld](https://github.com/seed-rs/seed-rs-realworld) for more examples.
203
202
1. If you want to test prerendered website:
204
203
1.`$ yarn build:prerender`
205
204
1.`$ yarn serve:dist`
206
205
1. Open [localhost:8000](http://localhost:8000) in a browser.
207
206
1._Tip_: Always test it also in production environment because e.g. routing is a little bit different among servers.
208
207
1.**Always run `$ cargo make verify`** before push to make sure CI pipeline will accept your code.
209
208
- It'll format your code, lint it and start headless tests in Firefox.
210
-
- You can change its behaviour in `/crate/Makefile.tom` - task `verify` (similar task `verify_only` is used in CI).
209
+
- You can change its behaviour in `Makefile.tom` - task `verify` (similar task `verify_only` is used in CI).
0 commit comments