# June 18, 2019
# Trying to figure out route building in Nuxt
- https://nuxtjs.org/api/configuration-generate/#speeding-up-dynamic-route-generation-with-code-payload-code-
- https://www.raymondcamden.com/2019/03/12/an-example-of-nuxtjs-with-a-custom-generator
- Extremely useful blog from Nebulab (opens new window)
- Nothing breaking, but can't seem to get static stuff render
- static stuff rendering, sitemap working
- but, payload doesn't really work for me, it passes data to the static routes, not to the listing of routes. So probably will skip using payload
# Made new prismic account with devops email
# Working on Netlify headers for APIs and to be able to pull fonts from UI kit
- had to edit the UI Kit gulp file to copy
_headers
todist
- switched to toml file. This finally worked.
[[headers]]
for = "*/*.woff"
[headers.values]
Access-Control-Allow-Origin = "*"
Content-Type = "font/woff"
[[headers]]
for = "*/*.woff2"
[headers.values]
Access-Control-Allow-Origin = "*"
Content-Type = "font/woff2"
[[headers]]
for = "*/*.ttf"
[headers.values]
Access-Control-Allow-Origin = "*"
Content-Type = "font/ttf"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Spun H up on TAP
# Estimated some Ucommerce, totally guessing
# Estimated some SBX animation stuff
# Watching Jamstack videos
# Starting some more CMS stuff and putting in JIRA
# Started more Prismic cms + nuxt work
- Got srcset working with prismic thumbnails
- upload the retina image, let it make a thumbnail of the non-retina and let the non-retina be "main"
<li v-for="(brand, index) in brands" :key="index">
<img
:srcset="brand.brand_image.url + ', ' + brand.brand_image.retina.url + ' 2x'"
:src="brand.brand_image.url"
:alt="brand.brand_image.alt"
>
</li>
1
2
3
4
5
6
7
2
3
4
5
6
7
# Personal project, my bookmark crud, building an object from tags in an api
- feel like I've struggled with this before, and gave up. Found a good way o build an object and count duplicates using the find method.
response.data.records.map(t => {
t.fields.Tags.map(g => {
if (!this.state.tags.find(o => { return o.name === g })) {
this.state.tags.push({ name: g, count: 1 })
} else {
this.state.tags.find(o => { return o.name === g }).count++
}
})
})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9