Skip to content

Commit

Permalink
Enable heading-increment Markdown lint rule (mdn#35394)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena authored Aug 14, 2024
1 parent 64ac82b commit 8b4e6b7
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 20 deletions.
3 changes: 1 addition & 2 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

{
"default": true,
// Disabled, as some callouts include headings.
"heading-increment": false,
"heading-increment": true,
"ul-style": {
"style": "dash",
},
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/learn/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you are not sure about committing to learning web development in-depth and wa
> [!CALLOUT]
>
> #### Looking to become a front-end web developer?
> **Looking to become a front-end web developer?**
>
> If you want to become a front-end web developer and are not sure what to learn first, we'd suggest using the [MDN Curriculum](/en-US/curriculum/) to plan your learning. It provides a structured learning pathway covering the essential skills and practices for being a successful front-end developer, along with recommended learning resources.
>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/learn/performance/html/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ It is advisable to put the content into a single page. If you want to pull in ne
If you must use `<iframe>`s, then use them sparingly.

#### Lazy loading iframes
### Lazy loading iframes

In the same way as `<img>` elements, you can also use the `loading` attribute to instruct the browser to lazy-load `<iframe>` content that is initially offscreen, thereby improving performance:

Expand Down
22 changes: 11 additions & 11 deletions files/en-us/learn/server-side/django/deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ A full checklist of settings you might want to change is provided in [Deployment
python3 manage.py check --deploy
```

#### Gunicorn
### Gunicorn

[Gunicorn](https://gunicorn.org/) is a pure-Python HTTP server that is commonly used for serving Django WSGI applications.

Expand All @@ -181,7 +181,7 @@ Then install _Gunicorn_ locally on the command line using _pip_:
pip3 install gunicorn
```

#### Database configuration
### Database configuration

SQLite, the default Django database that you've been using for development, is a reasonable choice for small to medium websites.
Unfortunately it cannot be used on some popular hosting services, such as Heroku, because they don't provide persistent data storage in the application environment (a requirement of SQLite).
Expand All @@ -194,7 +194,7 @@ The database connection information will be supplied to Django using an environm
Rather than hard-coding this information into Django, we'll use the [dj-database-url](https://pypi.org/project/dj-database-url/) package to parse the `DATABASE_URL` environment variable and automatically convert it to Django's desired configuration format.
In addition to installing the _dj-database-url_ package we'll also need to install [psycopg2](https://www.psycopg.org/), as Django needs this to interact with Postgres databases.

##### dj-database-url
#### dj-database-url

_dj-database-url_ is used to extract the Django database configuration from an environment variable.

Expand All @@ -204,7 +204,7 @@ Install it locally so that it becomes part of our [requirements](#requirements)
pip3 install dj-database-url
```

##### settings.py
#### settings.py

Open **/locallibrary/settings.py** and copy the following configuration into the bottom of the file:

Expand All @@ -222,7 +222,7 @@ if 'DATABASE_URL' in os.environ:
Django will now use the database configuration in `DATABASE_URL` if the environment variable is set; otherwise it uses the default SQLite database.
The value `conn_max_age=500` makes the connection persistent, which is far more efficient than recreating the connection on every request cycle (this is optional and can be removed if needed).

##### psycopg2
#### psycopg2

<!-- Django 4.2 now supports Psycopg (3) : https://docs.djangoproject.com/en/5.0/releases/4.2/#psycopg-3-support
But didn't work on Railway!
Expand All @@ -240,7 +240,7 @@ Note that Django will use the SQLite database during development by default, unl
You can switch to Postgres completely and use the same hosted database for development and production by setting the same environment variable in your development environment (Railway makes it easy to use the same environment for production and development).
Alternatively you can also install and use a [self-hosted Postgres database](https://www.psycopg.org/docs/install.html) on your local computer.

#### Serving static files in production
### Serving static files in production

During development we use Django and the Django development web server to serve both our dynamic HTML and our static files (CSS, JavaScript, etc.).
This is inefficient for static files, because the requests have to pass through Django even though Django doesn't do anything with them.
Expand All @@ -267,7 +267,7 @@ python3 manage.py collectstatic
For this tutorial, _collectstatic_ can be run before the application is uploaded, copying all the static files in the application to the location specified in `STATIC_ROOT`.
`Whitenoise` then finds the files from the location defined by `STATIC_ROOT` (by default) and serves them at the base URL defined by `STATIC_URL`.

##### settings.py
#### settings.py

Open **/locallibrary/settings.py** and copy the following configuration into the bottom of the file.
The `BASE_DIR` should already have been defined in your file (the `STATIC_URL` may already have been defined within the file when it was created.
Expand All @@ -286,7 +286,7 @@ STATIC_URL = '/static/'

We'll actually do the file serving using a library called [WhiteNoise](https://pypi.org/project/whitenoise/), which we install and configure in the next section.

#### Whitenoise
### Whitenoise

There are many ways to serve static files in production (we saw the relevant Django settings in the previous sections).
The [WhiteNoise](https://pypi.org/project/whitenoise/) project provides one of the easiest methods for serving static assets directly from Gunicorn in production.
Expand All @@ -295,15 +295,15 @@ Check out [WhiteNoise](https://pypi.org/project/whitenoise/) documentation for a

The steps to set up _WhiteNoise_ to use with the project are [given here](https://whitenoise.readthedocs.io/en/stable/django.html) (and reproduced below):

##### Install whitenoise
#### Install whitenoise

Install whitenoise locally using the following command:

```bash
pip3 install whitenoise
```

##### settings.py
#### settings.py

To install _WhiteNoise_ into your Django application, open **/locallibrary/settings.py**, find the `MIDDLEWARE` setting and add the `WhiteNoiseMiddleware` near the top of the list, just below the `SecurityMiddleware`:

Expand Down Expand Up @@ -336,7 +336,7 @@ STORAGES = {

You don't need to do anything else to configure _WhiteNoise_ because it uses your project settings for `STATIC_ROOT` and `STATIC_URL` by default.

#### Requirements
### Requirements

The Python requirements of your web application should be stored in a file **requirements.txt** in the root of your repository.
Many hosting services will automatically install dependencies in this file (in others you have to do this yourself).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ setBindGroup(index, bindGroup, dynamicOffsets, dynamicOffsetsStart,
dynamicOffsetsLength)
```

#### Parameters
### Parameters

- `index`
- : The index to set the bind group at. This matches the `n` index value of the corresponding [`@group(n)`](https://gpuweb.github.io/gpuweb/wgsl/#attribute-group) attribute in the shader code ({{domxref("GPUShaderModule")}}) used in the related pipeline.
Expand Down
2 changes: 2 additions & 0 deletions files/en-us/web/css/align-content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ align-content: unset;

## Examples

### Effects of different align-content values

In this example, you can switch between three different {{cssxref("display")}} property values, including `flex`, `grid`, and `block`. You can also switch between the different values for `align-content`.

#### HTML
Expand Down
4 changes: 0 additions & 4 deletions files/en-us/web/html/element/abbr/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,13 @@ Spelling out the acronym or abbreviation in full the first time it is used on a

Only include a `title` if expanding the abbreviation or acronym in the text is not possible. Having a difference between the announced word or phrase and what is displayed on the screen, especially if it's technical jargon the reader may not be familiar with, can be jarring.

#### HTML

```html
<p>
JavaScript Object Notation (<abbr>JSON</abbr>) is a lightweight
data-interchange format.
</p>
```

#### Result

{{EmbedLiveSample("Accessibility_concerns")}}

This is especially helpful for people who are unfamiliar with the terminology or concepts discussed in the content, people who are new to the language, and people with cognitive concerns.
Expand Down
2 changes: 2 additions & 0 deletions files/en-us/web/html/element/caption/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ The following attributes are deprecated and should not be used. They are documen

See {{HTMLElement("table")}} for a complete table example introducing common standards and best practices.

### Table with caption

This example demonstrates a basic table that includes a caption describing the data presented.

Such a "title" is helpful for users who are quickly scanning the page, and it is especially beneficial for visually impaired users, allowing them to determine the table's relevance quickly without the need to have a screen reader read the contents of many cells just to find out what the table is about.
Expand Down
2 changes: 2 additions & 0 deletions files/en-us/web/html/element/tfoot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ The following attributes are deprecated and should not be used. They are documen

See {{HTMLElement("table")}} for a complete table example introducing common standards and best practices.

### Table with footer

This example demonstrates a table divided into a head section with column headers, a body section with the table's main data, and a foot section summarizing data of one column.

#### HTML
Expand Down

0 comments on commit 8b4e6b7

Please sign in to comment.