Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linked data for tag/section pages #9249

Merged
merged 4 commits into from May 26, 2015
Merged

Linked data for tag/section pages #9249

merged 4 commits into from May 26, 2015

Conversation

johnduffell
Copy link
Member

I have added linked data to non curated tag and section pages. Basically shows the urls of all of the articles in that page. This will help google to know what that page offers of importance.
The pages themselves still need marking up to describe the content itself, also curated fronts need marking up similarly.

{
  "url": "/money/pensions",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 0,
      "url": "/world/2015/may/19/uk-pension-funds-cluster-bombs-yemen"
    },
    {
      "@type": "ListItem",
      "position": 1,
      "url": "/business/2015/may/19/is-this-deflation-or-negative-inflation-qa"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "url": "/money/2015/may/14/pensioner-bonds-nsi-braced-for-a-deluge-of-applicants"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "url": "/money/2015/may/14/money-talks-flight-compensation-phone-complaints-and-how-to-make-your-pension-cleaner"
    },
    {
      "@type": "ListItem",
      "position": 4,
      "url": "/money/2015/may/14/pensions-freedoms-poll-shows-strong-uptake"
    },
    {
      "@type": "ListItem",
      "position": 5,
      "url": "/commentisfree/2015/may/13/retirement-compulsory-blackpool-magistrates-70"
    },
    {
      "@type": "ListItem",
      "position": 6,
      "url": "/money/2015/may/09/how-get-pension-fund-divest-fossil-fuels"
    },
    {
      "@type": "ListItem",
      "position": 7,
      "url": "/money/2015/may/08/template-letter-pension-divest-fossil-fuels"
    },
    {
      "@type": "ListItem",
      "position": 8,
      "url": "/money/2015/may/07/money-talks-roaming-charges-victory-savings-deadline-and-homes-for-250000"
    },
    {
      "@type": "ListItem",
      "position": 9,
      "url": "/money/2015/may/07/i-failed-to-get-a-mortgage-because-of-my-pension-contributions"
    },
    {
      "@type": "ListItem",
      "position": 10,
      "url": "/money/2015/may/06/pensioner-bonds-nsi-warns-savers-to-apply-soon"
    },
    {
      "@type": "ListItem",
      "position": 11,
      "url": "/money/2015/apr/24/annuity-rates-all-time-low-pension-freedoms-introduced"
    },
    {
      "@type": "ListItem",
      "position": 12,
      "url": "/money/2015/apr/18/best-investments-for-retirement-financial-advisers"
    },
    {
      "@type": "ListItem",
      "position": 13,
      "url": "/money/2015/apr/18/what-party-manifestos-mean-for-you-tax-housing-pensions-pay"
    },
    {
      "@type": "ListItem",
      "position": 14,
      "url": "/politics/2015/apr/17/ros-altmann-to-become-tory-peer-conservatives-win-election"
    },
    {
      "@type": "ListItem",
      "position": 15,
      "url": "/money/2015/apr/15/tesco-pays-out-employee-family-pension-petition"
    },
    {
      "@type": "ListItem",
      "position": 16,
      "url": "/money/2015/apr/13/pension-freedoms-how-get-money"
    },
    {
      "@type": "ListItem",
      "position": 17,
      "url": "/money/2015/apr/11/pensions-guidance-worth-taking"
    },
    {
      "@type": "ListItem",
      "position": 18,
      "url": "/money/2015/apr/11/new-pension-rules-common-questions-emergency-tax"
    },
    {
      "@type": "ListItem",
      "position": 19,
      "url": "/environment/2015/apr/10/fossil-fuel-free-funds-out-performed-conventional-ones-analysis-shows"
    },
    {
      "@type": "ListItem",
      "position": 20,
      "url": "/news/datablog/2015/apr/09/limits-of-control-the-age-debate-behind-the-french-air-traffic-controller-strike"
    },
    {
      "@type": "ListItem",
      "position": 21,
      "url": "/uk-news/2015/apr/09/snp-fails-to-account-for-billions-in-welfare-and-pensions-pledges"
    },
    {
      "@type": "ListItem",
      "position": 22,
      "url": "/money/2015/apr/09/speedboats-holiday-homes-on-pensioners-shopping-lists"
    },
    {
      "@type": "ListItem",
      "position": 23,
      "url": "/money/2015/apr/06/pensions-revolution-off-to-a-quiet-start"
    },
    {
      "@type": "ListItem",
      "position": 24,
      "url": "/money/2015/apr/06/pension-shakeup-cashing-in-but-not-for-lamborghini"
    },
    {
      "@type": "ListItem",
      "position": 25,
      "url": "/money/2015/apr/06/pensions-minister-warns-against-savings-pot-spending-sprees"
    },
    {
      "@type": "ListItem",
      "position": 26,
      "url": "/money/2015/apr/05/pension-freedoms-pots-of-cash-spending"
    },
    {
      "@type": "ListItem",
      "position": 27,
      "url": "/business/2015/apr/05/uk-pensioners-ready-to-jump-queue-for-property-osborne-revolution"
    },
    {
      "@type": "ListItem",
      "position": 28,
      "url": "/money/2015/apr/05/few-pension-providers-contact-customers-reforms"
    },
    {
      "@type": "ListItem",
      "position": 29,
      "url": "/money/2015/apr/05/holiday-firms-target-pension-pots"
    },
    {
      "@type": "ListItem",
      "position": 30,
      "url": "/money/2015/apr/04/pensions-revolution-avoid-tax-bombshell"
    },
    {
      "@type": "ListItem",
      "position": 31,
      "url": "/money/2015/apr/04/pension-freedoms-retire-best-choice"
    },
    {
      "@type": "ListItem",
      "position": 32,
      "url": "/money/2015/apr/04/how-pensions-freedoms-affect-workers"
    },
    {
      "@type": "ListItem",
      "position": 33,
      "url": "/money/2015/apr/03/easter-personal-finance-pension-freedoms-maternity-child-trust-funds"
    },
    {
      "@type": "ListItem",
      "position": 34,
      "url": "/sustainable-business/2015/apr/02/ageing-retirement-workforce-discrimination"
    }
  ],
  "@type": "ItemList",
  "@context": "http://schema.org"
}

val data: JsValue = Json.parse(script.first().html())
val organisation = data.asInstanceOf[JsArray](0)
val appIndexer = data.asInstanceOf[JsArray](1)
val organisation: JsValue = Json.parse(script.first().html())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.first() sounds a bit flaky. Script order might change and the test will break.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it specifically looks for the Organization section, if we have more than one organisation then it's a bug, so the assertion on line 18 will fail

@piuccio
Copy link
Contributor

piuccio commented May 26, 2015

Sorry couldn't find anything describing why this could be useful. Do you have any documentation available?

I think that a simple list of links is redundant, as that's the only information that tag/section pages carry.

@piuccio
Copy link
Contributor

piuccio commented May 26, 2015

Looks fine, the only concern is page size. Is there a limit on the number of articles? Would be nice to have one

👍

@paperboyo
Copy link
Contributor

would shortened URLs defeat the purpose?

@johnduffell
Copy link
Member Author

@paperboyo Not sure I understand 100%. If it helps, the purpose here is to link together the world's graph of data, so they have to be the canonical url of whatever it is so google etc can understand it's the same as all the other links to the same content. We wouldn't officially be able to get away with a redirect although who's to say google don't have something to deal with that.
Does any of that answer your question?

@paperboyo
Copy link
Contributor

@johnduffell yes. thx!

@johnduffell johnduffell merged commit def6b4a into master May 26, 2015
@johnduffell johnduffell deleted the carousel-ld branch May 26, 2015 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants