Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

related_content's mdn_url is different from the main doc #75

Closed
peterbe opened this issue Jul 25, 2019 · 4 comments
Closed

related_content's mdn_url is different from the main doc #75

peterbe opened this issue Jul 25, 2019 · 4 comments

Comments

@peterbe
Copy link
Contributor

peterbe commented Jul 25, 2019

Looking at packaged/html/reference/elements/abbr.json for example.

Looks like this:

{
   "related_content": [
    {
      "title": "Learn HTML",
      "content": [
        {
          "title": "Introduction to HTML",
          "content": [
            {
              "title": "Introduction to HTML",
              "mdn_url": "https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML"
            },
           ...

  "title": "<abbr>: The Abbreviation element",
  "mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Element/abbr",
  "interactive_example_url": "https://interactive-examples.mdn.mozilla.net/pages/tabbed/abbr.html",
  "browser_compatibility": {
    ...

Note the difference in mdn_urlvalues. Some are with en-US and some are not.

We've talked before about at least dropping the absolute part with the domain. No doubt. But should we go for the locale prefix? My inclination is to NOT have the locale in there. Some day, the abbr.json file will be called something like packaged/en-US/html/reference/elements/abbr.json (or packaged/sv-SE/html/reference/elements/abbr.json) so that piece of information will be implicit.

However, it could be that the lazy Swedes haven't translated every page yet so they might want to link to the en-US version in their side bars because it's better to point the English content than to not link at all. So for that reason it might be good to have the locale in there.

@peterbe
Copy link
Contributor Author

peterbe commented Jul 25, 2019

By the way, the current Stumptown-renderer does NOT have locales in the URLs like MDN does. If we're ever going to have a chance to migrate, I think we should stick with the MDN-like URLs and start using en-US in stumptown-renderer for now.

Based on that loud-thought I'm starting to think that the right thing to do is to always have the locale in the URIs. Always.

@peterbe
Copy link
Contributor Author

peterbe commented Jul 25, 2019

I think we should start encoding the locale sooner rather than later in the renderer prototype.
See mdn/yari#57

We can discuss the less useful "/docs/" URI segment some other day. :)

@wbamberg
Copy link

@peterbe , I think we can close this one now can't we?

@peterbe
Copy link
Contributor Author

peterbe commented Oct 24, 2019

Yup. I grepped and the only full URLs I see are in the __compat block. E.g.

          "__compat": {
            "mdn_url": "https://developer.mozilla.org/docs/Web/HTML/Element/ins",

I don't we're using that in stumptown-renderer are we now that we have the query?

@peterbe peterbe closed this as completed Oct 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants