atbcb / usab-uswds

Website for the United States Access Board, built on Federalist and USWDS.
https://www.access-board.gov
Other
5 stars 10 forks source link

Page title is broken #570

Closed RSD-accessboard closed 4 years ago

RSD-accessboard commented 4 years ago

The page title that shows up in the browser tab is broken. It has the same page title for all pages. This was working, not sure when it broke.

kengdoj commented 4 years ago

The Training & Webinars and News pages seem to have this problem. The others seem ok.

bruce-usab commented 4 years ago

Oops, we forgot to Ask Andrew about this today.

bruce-usab commented 4 years ago

Board Members page also does this. I will ping @apburnes

kengdoj commented 4 years ago

For the Training & Webinars and News pages, the page title should be Training & Webinars and News, respectively. Seems like these pages should use the same technique the page title is created on Research and Contact us/other pages that do not have the top blue banner or left sidenav. Is this correct?

bruce-usab commented 4 years ago

Yes @kengdoj on all points

bruce-usab commented 4 years ago

Looking at https://github.com/atbcb/usab-uswds/pull/378 before I ping Andrew.

RSD-accessboard commented 4 years ago

It’s possible there has been no page.title assigned. If the front matter variables not defined. I think we can figure this out without Andrew

kengdoj commented 4 years ago

Why do some pages have the blue banner and others don't?

RSD-accessboard commented 4 years ago

It depends on which layout they’re using. I created that blue banner for the layouts I made, and ended up looking so nice we started using them more and more across the site. We can change the _Layouts/page 2 also use the blue banner

kengdoj commented 4 years ago

I like the blue banner. I'd like to see it on all pages if that makes sense

bruce-usab commented 4 years ago

i agree the blue banner looks sharp the field populating the blue banner is not consistent though sometimes it is title, other times collection title, other times something else

wrt OP, i am not finding missing title attributes, but I will keep looking

bruce-usab commented 4 years ago

My working theory is that front matter in .html pages does not do anything. We have webinars/index.htm and news/index.html and the latter was built off the USWDS template, but it is only these two pages which seem to have the bad behavior.

I will test in a local build on my VM.

RSD-accessboard commented 4 years ago

Front matter does work in.html pages otherwise we wouldn’t be able to give them a layout.

Trainings and webinars and news are funny though because they are created with pagination. That could be something that is messing them up

bruce-usab commented 4 years ago

Good point about front matter giving html pages a layout.

Initial results from converting /news/index.html and /webinars/index.html to _pages/news.md and webinars.md

bruce-usab commented 4 years ago

Blah, just wasting time. News articles in News page are not generating on my local build.

kengdoj commented 4 years ago

PR #582 fixes the titles for the Board members, News main page, Training & Webinars main page.

Where are the webinar pages like https://beta.access-board.gov/2020/09/02/webinar-ability-center-of-greater-toledo/

and news pages like https://beta.access-board.gov/2020/09/02/webinar-national-park-service-regions-3-4-5-accessibility-workshop/?

bruce-usab commented 4 years ago

Nice! Just found this doc that paginator pages should not have a permalink: https://jekyllrb.com/docs/pagination/

All webinars, news, and training announcements are in _posts folder. This the Jeykll blog mechanic. There are some peculiarities, not the least of which is the file naming convention.

I am not excited to be adding JavaScript to pages, but nothing else I have tried worked. I will see if I cannot use @kengdoj technique to patch the layout that posts use.

bruce-usab commented 4 years ago

LOL, now home page title is title from blog post with oldest date. I will add the document.title={{page.title}} JavaScript in my branch to patch that.

Individual board member pages also need this patch.

RSD-accessboard commented 4 years ago

They are all under_posts\