|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {},
|
6 | 6 | "source": [
|
7 |
| - "# Year end release cleanup" |
| 7 | + "# Year-end release cleanup" |
8 | 8 | ]
|
9 | 9 | },
|
10 | 10 | {
|
11 | 11 | "cell_type": "markdown",
|
12 | 12 | "metadata": {},
|
13 | 13 | "source": [
|
14 |
| - "This notebook automatically moves a full year of releases into their own subdirectory under `~site/releases/` and collates the releases into their yearly listing page, including a preliminary tidy up of any links broken by moving these files. \n", |
| 14 | + "This notebook automatically collates a full year of releases into a yearly listing page under `~site/releases/` , including a preliminary tidy up of any links broken by moving these files. \n", |
15 | 15 | "\n",
|
16 |
| - "It's easiest to run this notebook at the start of the new year, when all the releases for the previous year are ready to be collated, thus requiring minimum adjustment from you.\n", |
| 16 | + "It's easiest to run this notebook at the start of the new year, when all the releases for the previous year are ready to be collected, thus requiring minimum adjustment from you.\n", |
17 | 17 | "\n",
|
18 |
| - "After running the notebook, you can locate the new yearly release subdirectory that was inserted into our `About > Releases` section for you to clean up further, along with a live preview of the site to get you started." |
| 18 | + "After running the notebook, you can review the new yearly release listing page that was inserted into our `About > Releases` section for you to clean up further, along with a live preview of the site to get you started." |
19 | 19 | ]
|
20 | 20 | },
|
21 | 21 | {
|
|
28 | 28 | " - [Import yearly cleanup script](#toc2_1_) \n",
|
29 | 29 | " - [Specify the year](#toc2_2_) \n",
|
30 | 30 | " - [Retrieve matching release folders](#toc2_3_) \n",
|
31 |
| - "- [Creating the yearly folder](#toc3_) \n", |
32 |
| - " - [Create the yearly folder](#toc3_1_) \n", |
33 |
| - " - [Move releases into yearly folder](#toc3_2_) \n", |
34 |
| - " - [Create yearly listing page](#toc3_3_) \n", |
35 |
| - " - [Edit the yearly listing page](#toc3_4_) \n", |
36 |
| - " - [Retrieve moved releases](#toc3_5_) \n", |
37 |
| - " - [Add moved releases to listing page](#toc3_6_) \n", |
| 31 | + "- [Rounding up the yearly releases](#toc3_) \n", |
| 32 | + " - [Retrieve the yearly folder](#toc3_1_) \n", |
| 33 | + " - [Create yearly listing page](#toc3_2_) \n", |
| 34 | + " - [Edit the yearly listing page](#toc3_3_) \n", |
| 35 | + " - [Retrieve yearly release pages](#toc3_4_) \n", |
| 36 | + " - [Add releases to yearly listing page](#toc3_5_) \n", |
38 | 37 | "- [Updating sidebar and links](#toc4_) \n",
|
39 | 38 | " - [Add yearly release folder to sidebar](#toc4_1_) \n",
|
40 |
| - " - [Move year end marker](#toc4_2_) \n", |
41 |
| - " - [Fix broken filepaths](#toc4_3_) \n", |
42 |
| - " - [Retrieve relative paths](#toc4_4_) \n", |
| 39 | + " - [Move year end marker](#toc4_2_) \n", |
43 | 40 | "- [Next steps](#toc5_) \n",
|
44 | 41 | " - [Show files to commit](#toc5_1_) \n",
|
45 | 42 | " - [Preview changes](#toc5_2_) \n",
|
|
95 | 92 | },
|
96 | 93 | {
|
97 | 94 | "cell_type": "code",
|
98 |
| - "execution_count": null, |
| 95 | + "execution_count": 1, |
99 | 96 | "metadata": {},
|
100 | 97 | "outputs": [],
|
101 | 98 | "source": [
|
|
143 | 140 | "metadata": {},
|
144 | 141 | "outputs": [],
|
145 | 142 | "source": [
|
146 |
| - "yc.get_yearly_releases(year)" |
| 143 | + "yc.get_yearly_releases(year);" |
147 | 144 | ]
|
148 | 145 | },
|
149 | 146 | {
|
|
152 | 149 | "source": [
|
153 | 150 | "<a id='toc3_'></a>\n",
|
154 | 151 | "\n",
|
155 |
| - "## Creating the yearly folder " |
| 152 | + "## Rounding up the yearly releases" |
156 | 153 | ]
|
157 | 154 | },
|
158 | 155 | {
|
|
161 | 158 | "source": [
|
162 | 159 | "<a id='toc3_1_'></a>\n",
|
163 | 160 | "\n",
|
164 |
| - "### Create the yearly folder \n", |
| 161 | + "### Retrieve the yearly folder \n", |
165 | 162 | "\n",
|
166 |
| - "The following cell creates a new subdirectory in `~site/releases/` based on your specified year." |
| 163 | + "The following cell locates the yearly subdirectory in `~site/releases/` based on your specified year so we can use the filepath in later functions." |
167 | 164 | ]
|
168 | 165 | },
|
169 | 166 | {
|
|
172 | 169 | "metadata": {},
|
173 | 170 | "outputs": [],
|
174 | 171 | "source": [
|
175 |
| - "yearly_path = yc.create_year_folder(year)" |
| 172 | + "yearly_path = yc.retrieve_year_folder(year)" |
176 | 173 | ]
|
177 | 174 | },
|
178 | 175 | {
|
|
181 | 178 | "source": [
|
182 | 179 | "<a id='toc3_2_'></a>\n",
|
183 | 180 | "\n",
|
184 |
| - "### Move releases into yearly folder \n", |
185 |
| - "\n", |
186 |
| - "Once we have the folder available, your matching release folders will get moved into this new yearly subdirectory." |
187 |
| - ] |
188 |
| - }, |
189 |
| - { |
190 |
| - "cell_type": "code", |
191 |
| - "execution_count": null, |
192 |
| - "metadata": {}, |
193 |
| - "outputs": [], |
194 |
| - "source": [ |
195 |
| - "yc.move_yearly_releases(yearly_path, yc.release_folders)" |
196 |
| - ] |
197 |
| - }, |
198 |
| - { |
199 |
| - "cell_type": "markdown", |
200 |
| - "metadata": {}, |
201 |
| - "source": [ |
202 |
| - "<a id='toc3_3_'></a>\n", |
203 |
| - "\n", |
204 | 181 | "### Create yearly listing page \n",
|
205 | 182 | "\n",
|
206 |
| - "This cell copies the template from `~internal/templates/yearly-releases.qmd` and slots it into the new yearly folder as `{year}-releases.qmd` so we can begin building the yearly listings." |
| 183 | + "This cell copies the template from `~internal/templates/yearly-releases.qmd` and slots it into the the yearly folder as `{year}-releases.qmd` so we can begin building the yearly listings.\n", |
| 184 | + "\n", |
| 185 | + "**It will also open up the newly created `{year}-releases.qmd` file for you so you don't have to go looking for it.**" |
207 | 186 | ]
|
208 | 187 | },
|
209 | 188 | {
|
|
219 | 198 | "cell_type": "markdown",
|
220 | 199 | "metadata": {},
|
221 | 200 | "source": [
|
222 |
| - "<a id='toc3_4_'></a>\n", |
| 201 | + "<a id='toc3_3_'></a>\n", |
223 | 202 | "\n",
|
224 | 203 | "### Edit the yearly listing page \n",
|
225 | 204 | "\n",
|
|
246 | 225 | "cell_type": "markdown",
|
247 | 226 | "metadata": {},
|
248 | 227 | "source": [
|
249 |
| - "<a id='toc3_5_'></a>\n", |
| 228 | + "<a id='toc3_4_'></a>\n", |
250 | 229 | "\n",
|
251 |
| - "### Retrieve moved releases \n", |
| 230 | + "### Retrieve yearly release pages\n", |
252 | 231 | "\n",
|
253 |
| - "This cell returns the `release-notes.qmd` filepaths for all the release folders we just moved into the yearly subdirectory." |
| 232 | + "This cell returns the `release-notes.qmd` filepaths for all the release folders in our matching yearly subdirectory." |
254 | 233 | ]
|
255 | 234 | },
|
256 | 235 | {
|
|
266 | 245 | "cell_type": "markdown",
|
267 | 246 | "metadata": {},
|
268 | 247 | "source": [
|
269 |
| - "<a id='toc3_6_'></a>\n", |
| 248 | + "<a id='toc3_5_'></a>\n", |
270 | 249 | "\n",
|
271 |
| - "### Add moved releases to listing page \n", |
| 250 | + "### Add releases to yearly listing page \n", |
272 | 251 | "\n",
|
273 |
| - "Next, we'll insert the moved release files into the listing for the yearly roundup page sorted by the release dates in descending order (newest first)." |
| 252 | + "Next, we'll insert that year's release pages into the listing for the yearly roundup page sorted by the release dates in descending order (newest first)." |
274 | 253 | ]
|
275 | 254 | },
|
276 | 255 | {
|
|
300 | 279 | "\n",
|
301 | 280 | "### Add yearly release folder to sidebar \n",
|
302 | 281 | "\n",
|
303 |
| - "Since we moved our releases for the specified year into their own subfolder, we'll need to update the sidebar in `_quarto.yml` to accomodate.\n", |
| 282 | + "Now that we've created the yearly listing page, we need to update the sidebar in `_quarto.yml` to accomodate.\n", |
304 | 283 | "\n",
|
305 |
| - "**This cell takes all the release filepaths we just moved into our yearly folder and shoves them into a `contents:` accordion menu with the new `{year}-.releases.qmd` listing page as the landing page.** \n" |
| 284 | + "**This cell takes all the release filepaths matching our year and shoves them into a `contents:` accordion menu with the new `{year}-.releases.qmd` listing page as the landing page.** \n" |
306 | 285 | ]
|
307 | 286 | },
|
308 | 287 | {
|
|
334 | 313 | "yc.move_year_marker(year)"
|
335 | 314 | ]
|
336 | 315 | },
|
337 |
| - { |
338 |
| - "cell_type": "markdown", |
339 |
| - "metadata": {}, |
340 |
| - "source": [ |
341 |
| - "<a id='toc4_3_'></a>\n", |
342 |
| - "\n", |
343 |
| - "### Fix broken filepaths \n", |
344 |
| - "\n", |
345 |
| - "This cell looks for absolute filepaths in `.qmd` and `.yml` files in `~site/` matching `releases/{year}-` and renames them `releases/{year}/{year}-` to accomodate for the releases we moved." |
346 |
| - ] |
347 |
| - }, |
348 |
| - { |
349 |
| - "cell_type": "code", |
350 |
| - "execution_count": null, |
351 |
| - "metadata": {}, |
352 |
| - "outputs": [], |
353 |
| - "source": [ |
354 |
| - "yc.update_paths(year)" |
355 |
| - ] |
356 |
| - }, |
357 |
| - { |
358 |
| - "cell_type": "markdown", |
359 |
| - "metadata": {}, |
360 |
| - "source": [ |
361 |
| - "<a id='toc4_4_'></a>\n", |
362 |
| - "\n", |
363 |
| - "### Retrieve relative paths \n", |
364 |
| - "\n", |
365 |
| - "This cell looks for relative paths (`../example.qmd`) in the `~site/releases/` folder that might need manual adjustment, such as in listings or any links that don't follow our proper `/root` convention but should. \n", |
366 |
| - "\n", |
367 |
| - "**You will ned to review these links and edit them if necessary to ensure that the filepaths are not broken after the move.**" |
368 |
| - ] |
369 |
| - }, |
370 |
| - { |
371 |
| - "cell_type": "code", |
372 |
| - "execution_count": null, |
373 |
| - "metadata": {}, |
374 |
| - "outputs": [], |
375 |
| - "source": [ |
376 |
| - "yc.search_links(yearly_path)" |
377 |
| - ] |
378 |
| - }, |
379 | 316 | {
|
380 | 317 | "cell_type": "markdown",
|
381 | 318 | "metadata": {},
|
|
449 | 386 | "**You may want to send a commit up to remote before you begin editing so you have a backup.**\n",
|
450 | 387 | "\n",
|
451 | 388 | "- [ ] Make sure that the new yearly accordion menu displays as expected in the sidebar under `About > Releases`.\n",
|
452 |
| - "- [ ] Check in `_quarto.yml` that the `# CURRENT-YEAR-END-MARKER` was moved to above your rounded up releases for your specified year.\n", |
453 |
| - "- [ ] Double-check the files edited by `Fix broken filepaths` to ensure that the new links resolve correctly\n", |
454 |
| - "- [ ] Resolve any relative links found in `Retrieve relative paths` that were broken by the move. \n", |
455 |
| - "- [ ] Resolve any other links that might have been broken by the move by checking using `quarto render`. \n", |
| 389 | + "- [ ] Check in `_quarto.yml` that the `# CURRENT-YEAR-END-MARKER` was moved to above your rounded up releases for your specified year. \n", |
456 | 390 | "- [ ] Review the summaries at the top of each release page to make sure they look good on the listing tiles.\n",
|
457 | 391 | "- [ ] Make sure any relevant files are committed to remote in preparation for your PR!"
|
458 | 392 | ]
|
|
0 commit comments