Code Monkey home page Code Monkey logo

stumptown-content's Introduction

stumptown-content

Build Status

Overview

This project aims to change the way we create and represent MDN's documentation. The idea is to maintain our documentation in GitHub, and to explicitly represent (and lint for) structure for the reference documentation, rather than just treating pages as unstructured blobs of HTML.

In this model, people write documentation in a mixture of Markdown (for prose) and YAML (for data). There are rules about what a writer can and must include in the documentation for a given item, and the repository will enforce these rules in CI tests. For example, we might require that the documentation for every CSS property must include browser compatibility data. The "writers' guide to stumptown" document provides an informal overview of how documentation is written and maintained.

This repository also includes scripts that convert this documentation as-authored into a single JSON object for each item.

The most important consumer of this JSON would be the MDN website itself. The stumptown-renderer repository is a prototype implementation of a new version of MDN powered by stumptown-content.

But it's our intention to make the JSON available to other consumers too. Providing the content as structured JSON means that a consumer can reliably access particular pieces of the content. For example:

  • names and short descriptions for all the CSS properties
  • sets of executable examples
  • the specifications that define a particular item
  • the list of methods defined for a JavaScript object

Please note that at the moment we're still at an early and quite experimental stage.

Installation

First fork then clone the repo on your machine.

cd stumptown-content
npm install

Development

Linting content

Before building, run checks on the content first. To lint content, run:

npm run lint-md

Alternatively, to partially lint content, add arguments for one or more paths to the content to be linted. For example:

npm run lint-md content/html/reference/elements/abbr

Building content

Stumptown builds the content into JSON files (located under /packaged). In order to build all of the files, use:

npm run build-json <section>

For instance, if you want to build the HTML section documents, type:

npm run build-json html

Validating content

npm test

Refresh your fork

Before sending a new pull request, please refresh your fork and clone.

Public domain dedication

The project code is dedicated to the public domain (CC0 1.0). MDN prose content, found in the content/ directory, is by Mozilla Contributors and is licensed under CC-BY-SA 2.5. See content/LICENSE.md for details.

stumptown-content's People

Contributors

ddbeck avatar dependabot-preview[bot] avatar dependabot[bot] avatar elchi3 avatar escattone avatar joedarc avatar mozilla-github-standards avatar peterbe avatar queengooborg avatar sphinxknight avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.