stumptown-content icon indicating copy to clipboard operation
stumptown-content copied to clipboard

"Specifications" should be in the packaged JSON

Open peterbe opened this issue 4 years ago • 3 comments

The packaged JSON looks like this for example:

    {
      "type": "specifications",
      "value": [
        {
          "url": "https://html.spec.whatwg.org/multipage/forms.html#the-form-element",
          "title": "WHATWG HTML Living Standard"
        }
      ]
    },

And the renderer hardcodedly displays the <h2>Specifications</h2> prose here.

What we're doing with browser_compatibility and examples is that that word is hardcoded in stumptown-content instead. here. It produces this packaged JSON:

    {
      "type": "examples",
      "value": {
        "title": "Examples",
        "id": "examples",
        "examples": [
          {
            "description": {
              "width": 672,
              "height": 152,
              "content": ""
            },
            "sources": {
              "html": " ... snip ..."
            }
          }
        ]
      }
    },

peterbe avatar Oct 24 '19 16:10 peterbe

So between "Specifications", "Examples", "Attributes", and "Browser Compatibility" we have 2 hardcoded in renderer and 2 hardcoded in stumptown-content's scripts.

@wbamberg Would you agree that it's best to move these to the build-json scripts?

peterbe avatar Oct 24 '19 16:10 peterbe

@peterbe , I would like to resolve this but to be clear: I think it is a distraction from https://github.com/mdn/sprints/issues/2123 which is my main focus at the moment. As I've said before there are actually more places than this where strings are being inserted into the renderer output in the toolchain, and I'd like dealing with this to be its own thing.

wbamberg avatar Oct 24 '19 16:10 wbamberg

Sure thing! You do what you think is best in terms of the order. We don't have a process of labelling urgency but if we did this'd be way down :)

peterbe avatar Oct 24 '19 16:10 peterbe