diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml index 3f9704d355475fb..fee9351f939bf2f 100644 --- a/.github/workflows/markdown-lint.yml +++ b/.github/workflows/markdown-lint.yml @@ -7,6 +7,7 @@ on: paths: - .markdownlint-cli2.jsonc - .nvmrc + - .prettier* - package.json - yarn.lock - .github/workflows/markdown-lint.yml diff --git a/.github/workflows/pr-check_markdownlint.yml b/.github/workflows/pr-check_markdownlint.yml index ec21082e0b97b32..b1beaae2c76c048 100644 --- a/.github/workflows/pr-check_markdownlint.yml +++ b/.github/workflows/pr-check_markdownlint.yml @@ -45,3 +45,8 @@ jobs: yarn markdownlint-cli2 ${files_to_lint} echo "Linting front-matter" node scripts/front-matter_linter.js ${files_to_lint} + + - name: Prettier markdown files + run: | + files_to_lint="${{ env.DIFF_DOCUMENTS }}" + yarn prettier -c ${files_to_lint} diff --git a/.prettierignore b/.prettierignore index 6393e7dad90969e..922b3c1044f3abb 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,4 +10,3 @@ build/ /files/en-us/mozilla/add-ons/**/*.md /files/en-us/web/html/**/*.md /files/en-us/web/javascript/**/*.md -/files/en-us/web/web_components/**/*.md diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index a2080e7a65f85c7..711190614423dcb 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -3667,7 +3667,6 @@ /en-US/docs/HTML/Element/acronym-redirect-1 /en-US/docs/Web/HTML/Element/acronym /en-US/docs/HTML/Element/acronym2 /en-US/docs/Web/HTML/Element/acronym /en-US/docs/HTML/Element/address /en-US/docs/Web/HTML/Element/address -/en-US/docs/HTML/Element/applet /en-US/docs/Web/HTML/Element/applet /en-US/docs/HTML/Element/area /en-US/docs/Web/HTML/Element/area /en-US/docs/HTML/Element/area-redirect-1 /en-US/docs/Web/HTML/Element/area /en-US/docs/HTML/Element/article /en-US/docs/Web/HTML/Element/article @@ -3939,7 +3938,6 @@ /en-US/docs/HTML:Element:abbr /en-US/docs/Web/HTML/Element/abbr /en-US/docs/HTML:Element:acronym /en-US/docs/Web/HTML/Element/acronym /en-US/docs/HTML:Element:address /en-US/docs/Web/HTML/Element/address -/en-US/docs/HTML:Element:applet /en-US/docs/Web/HTML/Element/applet /en-US/docs/HTML:Element:area /en-US/docs/Web/HTML/Element/area /en-US/docs/HTML:Element:b /en-US/docs/Web/HTML/Element/b /en-US/docs/HTML:Element:base /en-US/docs/Web/HTML/Element/base @@ -11854,6 +11852,7 @@ /en-US/docs/Web/Guide/API/DOM/Events/Creating_and_triggering_events /en-US/docs/Web/Events/Creating_and_triggering_events /en-US/docs/Web/Guide/API/DOM/Events/Event_dispatching_example /en-US/docs/Web/Events/Creating_and_triggering_events /en-US/docs/Web/Guide/API/DOM/Events/Event_handlers /en-US/docs/Web/Events/Event_handlers +/en-US/docs/Web/Guide/API/DOM/Events/Mutation_events /en-US/docs/Web/API/MutationEvent /en-US/docs/Web/Guide/API/DOM/Events/Orientation_and_motion_data_explained /en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained /en-US/docs/Web/Guide/API/DOM/Events/Touch_events /en-US/docs/Web/API/Touch_events /en-US/docs/Web/Guide/API/DOM/Events/Touch_events_(Mozilla_experimental) /en-US/docs/Web/API/Touch_events @@ -12073,6 +12072,7 @@ /en-US/docs/Web/HTML/Forms_in_HTML /en-US/docs/Learn/Forms /en-US/docs/Web/HTML/Index /en-US/docs/Web/HTML /en-US/docs/Web/HTML/Inline_elemente /en-US/docs/Glossary/Inline-level_content +/en-US/docs/Web/HTML/Inline_elements /en-US/docs/Glossary/Inline-level_content /en-US/docs/Web/HTML/Inline_elmements /en-US/docs/Glossary/Inline-level_content /en-US/docs/Web/HTML/Introduction /en-US/docs/Learn/HTML/Introduction_to_HTML /en-US/docs/Web/HTML/Kinds_of_HTML_content /en-US/docs/Web/HTML/Content_categories diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index f23186d95301bfc..b48c52b12ee358e 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -94100,34 +94100,6 @@ "alecananian" ] }, - "Web/HTML/Element/applet": { - "modified": "2020-10-15T21:12:10.376Z", - "contributors": [ - "alattalatta", - "sideshowbarker", - "ddbeck", - "mfuji09", - "ExE-Boss", - "Sheppy", - "teoli", - "mfluehr", - "chrisdavidmills", - "erikadoyle", - "brunoais", - "kscarfone", - "ethertank", - "tregagnon", - "avsaro", - "cers", - "fscholz", - "osdm", - "Taken", - "Ptak82", - "Um4Sm1", - "Witia", - "PablO" - ] - }, "Web/HTML/Element/area": { "modified": "2020-11-09T11:29:48.831Z", "contributors": [ @@ -126782,10 +126754,6 @@ "Manuel_Strehl" ] }, - "Web/SVG/Element/discard": { - "modified": "2020-10-15T21:49:16.314Z", - "contributors": ["Tigt", "fscholz", "Sebastianz"] - }, "Web/SVG/Element/ellipse": { "modified": "2020-10-15T21:11:04.607Z", "contributors": [ diff --git a/files/en-us/glossary/block-level_content/index.md b/files/en-us/glossary/block-level_content/index.md index 77643b1d182e300..8cda2cfc4d54f9f 100644 --- a/files/en-us/glossary/block-level_content/index.md +++ b/files/en-us/glossary/block-level_content/index.md @@ -9,7 +9,7 @@ In CSS, content that participates in block layout is called **block-level conten In a block layout, boxes are laid out one after the other, vertically, beginning at the top of a containing block. Each box's left outer edge touches the left edge of the containing block.\ A block-level element always starts on a new line. In horizontal writing modes, like English or Arabic, it occupies the entire horizontal space of its parent element (container) and vertical space equal to the height of its contents, thereby creating a "block". -> **Note:** The above behaviour of block layout changes if the containing block's [`writing-mode`](/en-US/docs/Web/CSS/writing-mode) is set to value other than [the default value](/en-US/docs/Web/CSS/writing-mode#formal_definition). +> **Note:** The above behavior of block layout changes if the containing block's [`writing-mode`](/en-US/docs/Web/CSS/writing-mode) is set to value other than [the default value](/en-US/docs/Web/CSS/writing-mode#formal_definition). > **Note:** HTML (_HyperText Markup Language_) elements historically were categorized as either "block-level" elements or "inline" elements. As a presentational characteristic, this is now specified by CSS. diff --git a/files/en-us/glossary/endianness/index.md b/files/en-us/glossary/endianness/index.md index c8a715744c777f4..01139698d34ddb7 100644 --- a/files/en-us/glossary/endianness/index.md +++ b/files/en-us/glossary/endianness/index.md @@ -14,7 +14,7 @@ Examples with the number `0x12345678` (i.e. 305 419 896 in decimal): - _little-endian_: `0x78 0x56 0x34 0x12` - _big-endian_: `0x12 0x34 0x56 0x78` -- _mixed-endian_ (historic and very rare): `0x34 0x12 0x78 0x56`<- +- _mixed-endian_ (historic and very rare): `0x34 0x12 0x78 0x56` ## See also diff --git a/files/en-us/learn/getting_started_with_the_web/what_will_your_website_look_like/index.md b/files/en-us/learn/getting_started_with_the_web/what_will_your_website_look_like/index.md index 49dec5043a94518..4cfac3f6075bbc9 100644 --- a/files/en-us/learn/getting_started_with_the_web/what_will_your_website_look_like/index.md +++ b/files/en-us/learn/getting_started_with_the_web/what_will_your_website_look_like/index.md @@ -60,10 +60,15 @@ Note that most images on the web, including in Google Images, are copyrighted. T ### Font -To choose a font: +As with images, many fonts are protected by licenses, meaning you cannot freely use them in your site. [Google Fonts](https://developers.google.com/fonts) is a web service owned by Google that provides access to many fonts. -1. Go to [Google Fonts](https://fonts.google.com/) and find one you like. -2. Copy the lines of code Google gives you into your text editor to save for later. -3. For more details about using Google Fonts, see [this page](https://developers.google.com/fonts/docs/getting_started) +Once you have found a font, there are two main ways of using it: + +1. Add a reference in your code to load the font from Google's servers. +2. Download the font file to your own system, host the font yourself, and use your hosted copy in your website's code. + +> **Note:** Serving fonts hosted on Google Fonts may be incompatible with the European Union's data privacy regulation [GDPR](https://gdpr.eu/what-is-gdpr/) as the font service exposes the user's IP address. If this is a potential problem for you, choose the second option. + +Alternatively you can use [safe web fonts](https://web.mit.edu/jmorzins/www/fonts.html) such as Arial, Times New Roman, or Courier New. {{PreviousMenuNext("Learn/Getting_started_with_the_web/Installing_basic_software", "Learn/Getting_started_with_the_web/Dealing_with_files", "Learn/Getting_started_with_the_web")}} diff --git a/files/en-us/learn/html/tables/basics/index.md b/files/en-us/learn/html/tables/basics/index.md index 9ca887bcb710e14..0be332fd1f24233 100644 --- a/files/en-us/learn/html/tables/basics/index.md +++ b/files/en-us/learn/html/tables/basics/index.md @@ -203,7 +203,7 @@ td { } ``` -{{EmbedLiveSample("How_does_a_table_work", 100, 460)}} +{{EmbedLiveSample("How_does_a_table_work", 100, 560)}} When implemented correctly, HTML tables are handled well by accessibility tools such as screen readers, so a successful HTML table should enhance the experience of sighted and visually impaired users alike. @@ -526,7 +526,7 @@ Now it's time to have a go yourself. Below you can see the timetable of a languages teacher. On Friday she has a new class teaching Dutch all day, but she also teaches German for a few periods on Tuesday and Thursdays. She wants to highlight the columns containing the days she is teaching. -{{EmbedGHLiveSample("learning-area/html/tables/basic/timetable-fixed.html", '100%', 320)}} +{{EmbedGHLiveSample("learning-area/html/tables/basic/timetable-fixed.html", '100%', 350)}} Recreate the table by following the steps below. diff --git a/files/en-us/learn/javascript/building_blocks/functions/index.md b/files/en-us/learn/javascript/building_blocks/functions/index.md index 6a9466ead75b034..d75460fab98efb1 100644 --- a/files/en-us/learn/javascript/building_blocks/functions/index.md +++ b/files/en-us/learn/javascript/building_blocks/functions/index.md @@ -234,23 +234,15 @@ textBox.addEventListener("keydown", (event) => { }); ``` -If the function only has one line in the curly brackets, you omit the curly brackets: +If the function only takes one parameter, you can omit the brackets around the parameter: -```js -textBox.addEventListener("keydown", (event) => - console.log(`You pressed "${event.key}".`) -); -``` - -If the function only takes one parameter, you can also omit the brackets around the parameter: - -```js -textBox.addEventListener("keydown", (event) => - console.log(`You pressed "${event.key}".`) -); +```js-nolint +textBox.addEventListener("keydown", event => { + console.log(`You pressed "${event.key}".`); +}); ``` -Finally, if your function needs to return a value, and contains only one line, you can also omit the `return` statement. In the following example we're using the {{jsxref("Array.prototype.map()","map()")}} method of `Array` to double every value in the original array: +Finally, if your function contains only one line that's a `return` statement, you can also omit the braces and the `return` keyword, and implicitly return the expression. In the following example we're using the {{jsxref("Array.prototype.map()","map()")}} method of `Array` to double every value in the original array: ```js const originals = [1, 2, 3]; @@ -270,6 +262,16 @@ function doubleItem(item) { } ``` +You can use the same concise syntax to rewrite the `addEventListener` example. + +```js +textBox.addEventListener("keydown", (event) => + console.log(`You pressed "${event.key}".`) +); +``` + +In this case, the value of `console.log()`, which is `undefined`, is implicitly returned from the callback function. + We recommend that you use arrow functions, as they can make your code shorter and more readable. To learn more, see the [section on arrow functions in the JavaScript guide](/en-US/docs/Web/JavaScript/Guide/Functions#arrow_functions), and our [reference page on arrow functions](/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions). > **Note:** There are some subtle differences between arrow functions and normal functions. They're outside the scope of this introductory guide, and are unlikely to make a difference in the cases we've discussed here. To learn more, see the [arrow function reference documentation](/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions). diff --git a/files/en-us/learn/javascript/first_steps/strings/index.md b/files/en-us/learn/javascript/first_steps/strings/index.md index 5d9b577a6a49e2b..8fd94a249943470 100644 --- a/files/en-us/learn/javascript/first_steps/strings/index.md +++ b/files/en-us/learn/javascript/first_steps/strings/index.md @@ -106,7 +106,7 @@ const bigmouth = 'I\'ve got no right to take my place…'; console.log(bigmouth); ``` -This works fine. You can escape other characters in the same way, e.g. `\"`, and there are some special codes besides. See [Escape sequences](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) for more details. +This works fine. You can escape other characters in the same way, e.g. `\"`, and there are some special codes besides. See [Escape sequences](/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#escape_sequences) for more details. ## Concatenating strings diff --git a/files/en-us/learn/server-side/apache_configuration_htaccess/index.md b/files/en-us/learn/server-side/apache_configuration_htaccess/index.md index cd39f9705664472..0a28c07b56da01a 100644 --- a/files/en-us/learn/server-side/apache_configuration_htaccess/index.md +++ b/files/en-us/learn/server-side/apache_configuration_htaccess/index.md @@ -19,7 +19,7 @@ Most of the following blocks use the [IfModule](https://httpd.apache.org/docs/2. There are times when we need to tell users that a resource has moved, either temporarily or permanently. This is what we use `Redirect` and `RedirectMatch` for. -```apache +```apacheconf # Redirect to a URL on a different host Redirect "/service" "http://foo2.example.com/service" @@ -60,7 +60,7 @@ For security reasons, browsers restrict cross-origin HTTP requests initiated fro This directive will add the CORS header for all resources in the directory from any website. -```apache +```apacheconf Header set Access-Control-Allow-Origin "*" @@ -70,7 +70,7 @@ Unless you override the directive later in the configuration or in the configura One alternative is to explicitly state what domains have access to the content of your site. In the example below, we restrict access to a subdomain of our main site (example.com). This is more secure and, likely, what you intended to do. -```apache +```apacheconf Header set Access-Control-Allow-Origin "subdomain.example.com" @@ -82,7 +82,7 @@ As reported in the [Chromium Blog](https://blog.chromium.org/2011/07/using-cross To mitigate the possibility of these attacks, you should use the `crossorigin` attribute in the images you request and the code snippet below in your `.htaccess` to set the CORS header from the server. -```apache +```apacheconf @@ -95,7 +95,7 @@ To mitigate the possibility of these attacks, you should use the `crossorigin` a Google Chrome's [Google Fonts troubleshooting guide](https://developers.google.com/fonts/docs/troubleshooting) tells us that, while Google Fonts may send the CORS header with every response, some proxy servers may strip it before the browser can use it to render the font. -```apache +```apacheconf Header set Access-Control-Allow-Origin "*" @@ -111,7 +111,7 @@ The [Timing-Allow-Origin](/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin) resp If a resource isn't served with a `Timing-Allow-Origin` or if the header does not include the origin, after making the request some attributes of the `PerformanceResourceTiming` object will be set to zero. -```apache +```apacheconf Header set Timing-Allow-Origin: "*" @@ -125,7 +125,7 @@ The error pages are presented as URLs. These URLs can begin with a slash (/) for See the [ErrorDocument Directive](https://httpd.apache.org/docs/current/mod/core.html#errordocument) documentation on the HTTPD documentation site for more information. -```apache +```apacheconf ErrorDocument 500 /errors/500.html ErrorDocument 404 /errors/400.html ErrorDocument 401 https://example.com/subscription_info.html @@ -140,7 +140,7 @@ The effect of `MultiViews` is as follows: if the server receives a request for / The setting disables `MultiViews` for the directory this configuration applies to and prevents Apache from returning a 404 error as the result of a rewrite when the directory with the same name does not exist -```apache +```apacheconf Options -MultiViews ``` @@ -158,7 +158,7 @@ Associates media types with one or more extensions to make sure the resources wi Servers should use text/javascript for JavaScript resources as indicated in the [HTML specification](https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages) -```apache +```apacheconf # Data interchange AddType application/atom+xml atom @@ -224,7 +224,7 @@ Every piece of content on the web has a character set. Most, if not all, the con Use [AddDefaultCharset](https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset) to serve all resources labeled as `text/html` or `text/plain` with the `UTF-8` charset. -```apache +```apacheconf AddDefaultCharset utf-8 @@ -234,7 +234,7 @@ Use [AddDefaultCharset](https://httpd.apache.org/docs/current/mod/core.html#addd Serve the following file types with the `charset` parameter set to `UTF-8` using the [AddCharset](https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset) directive available in `mod_mime`. -```apache +```apacheconf AddCharset utf-8 .appcache \ .bbaw \ @@ -277,7 +277,7 @@ The required steps are: - See [Rackspace FAQ](https://web.archive.org/web/20151223141222/http://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-modrewrite-not-working-on-my-site) and the [HTTPD documentation](https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase) - Depending on how your server is set up, you may also need to use the [`RewriteOptions`](https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions) directive to enable some options for the rewrite engine -```apache +```apacheconf RewriteEngine On Options +FollowSymlinks @@ -291,7 +291,7 @@ The required steps are: These Rewrite rules will redirect from the `http://` insecure version to the `https://` secure version of the URL as described in the [Apache HTTPD wiki](https://cwiki.apache.org/confluence/display/httpd/RewriteHTTPToHTTPS). -```apache +```apacheconf RewriteEngine On RewriteCond %{HTTPS} !=on @@ -301,7 +301,7 @@ These Rewrite rules will redirect from the `http://` insecure version to the `ht If you're using cPanel AutoSSL or the Let's Encrypt webroot method to create your SSL certificates, it will fail to validate the certificate if validation requests are redirected to HTTPS. Turn on the condition(s) you need. -```apache +```apacheconf RewriteEngine On RewriteCond %{HTTPS} !=on @@ -322,7 +322,7 @@ Set `%{ENV:PROTO}` variable, to allow rewrites to redirect with the appropriate The rule assumes by default that both HTTP and HTTPS environments are available for redirection. -```apache +```apacheconf RewriteEngine On RewriteCond %{HTTPS} =on @@ -347,7 +347,7 @@ The rule assumes by default that both HTTP and HTTPS environments are available The following might not be a good idea if you use "real" subdomains for certain parts of your website. -```apache +```apacheconf RewriteEngine On RewriteCond %{HTTPS} =on @@ -374,7 +374,7 @@ While you could send the `X-Frame-Options` header for all of your website's page Nonetheless, you should ensure that you send the `X-Frame-Options` header for all pages that allow a user to make a state-changing operation (e.g., pages that contain one-click purchase links, checkout, or bank-transfer confirmation pages, pages that make permanent configuration changes, etc.). -```apache +```apacheconf Header always set X-Frame-Options "DENY" "expr=%{CONTENT_TYPE} =~ m#text/html#i" @@ -390,7 +390,7 @@ The example policy below: To make your CSP implementation easier, you can use an online [CSP header generator](https://report-uri.com/home/generate/). You should also use a [validator](https://csp-evaluator.withgoogle.com) to make sure your header does what you want it to do. -```apache +```apacheconf Content-Security-Policy "default-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests" "expr=%{CONTENT_TYPE} =~ m#text\/(html|javascript)|application\/pdf|xml#i" @@ -400,7 +400,7 @@ To make your CSP implementation easier, you can use an online [CSP header genera This directive will prevent access to directories that don't have an index file present in whatever format the server is configured to use, like `index.html`, or `index.php`. -```apache +```apacheconf Options -Indexes @@ -412,7 +412,7 @@ In Macintosh and Linux systems, files that begin with a period are hidden from v The `.well-known/` directory represents [the standard (RFC 5785)](https://datatracker.ietf.org/doc/html/rfc5785) path prefix for "well-known locations" (e.g.: `/.well-known/manifest.json`, `/.well-known/keybase.txt`), and therefore, access to its visible content should not be blocked. -```apache +```apacheconf RewriteEngine On RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC] @@ -428,7 +428,7 @@ Block access to backup and source files that may be left by some text editors an Update the `` regular expression in the following example to include any files that might end up on your production server and can expose sensitive information about your website. These files may include: configuration files or files that contain metadata about the project among others. -```apache +```apacheconf Require all denied @@ -444,7 +444,7 @@ The following header ensures that a browser only connects to your server via HTT Be aware that Strict Transport Security is not revokable, and you must ensure being able to serve the site over HTTPS for as long as you've specified in the `max-age` directive. If you don't have a valid TLS connection anymore (e.g. due to an expired TLS certificate) your visitors will see an error message even when attempting to connect over HTTP. -```apache +```apacheconf # Header always set Strict-Transport-Security "max-age=16070400; includeSubDomains" "expr=%{HTTPS} == 'on'" @@ -479,7 +479,7 @@ Be aware that Strict Transport Security is not revokable, and you must ensure be Some older browsers would try and guess the content type of a resource, even when it isn't properly set up on the server configuration. This reduces exposure to drive-by download attacks and cross-origin data leaks. -```apache +```apacheconf Header always set X-Content-Type-Options "nosniff" @@ -498,7 +498,7 @@ Use services like the ones below to check your Referrer Policy: - [securityheaders.com](https://securityheaders.com/) - [Mozilla Observatory](https://observatory.mozilla.org/) -```apache +```apacheconf Header always set Referrer-Policy "strict-origin-when-cross-origin" "expr=%{CONTENT_TYPE} =~ m#text\/(css|html|javascript)|application\/pdf|xml#i" @@ -512,7 +512,7 @@ Modern browsers now prevent TRACE requests made via JavaScript, however, other w If you have access to the main server configuration file, use the [`TraceEnable`](https://httpd.apache.org/docs/current/mod/core.html#traceenable) directive instead. -```apache +```apacheconf RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRACE [NC] @@ -526,7 +526,7 @@ Some frameworks like PHP and ASP.NET set an `X-Powered-By` header that contains This header doesn't provide any value, and in some cases, the information it provides can expose vulnerabilities -```apache +```apacheconf Header unset X-Powered-By Header always unset X-Powered-By @@ -543,7 +543,7 @@ expose_php = off; Prevent Apache from adding a trailing footer line containing information about the server to the server-generated documents (e.g.: error messages, directory listings, etc.). See [ServerSignature Directive](https://httpd.apache.org/docs/current/mod/core.html#serversignature) for more information on what the server signature provides and the [ServerTokens Directive](https://httpd.apache.org/docs/current/mod/core.html#servertokens) for information about configuring the information provided in the signature. -```apache +```apacheconf ServerSignature Off ``` @@ -551,7 +551,7 @@ ServerSignature Off Some proxies and security software mangle or strip the `Accept-Encoding` HTTP header. See [Pushing Beyond Gzipping](https://calendar.perfplanet.com/2010/pushing-beyond-gzipping/) for a more detailed explanation. -```apache +```apacheconf @@ -566,7 +566,7 @@ Some proxies and security software mangle or strip the `Accept-Encoding` HTTP he Compress all output labeled with one of the following media types using the [AddOutputFilterByType Directive](https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype). -```apache +```apacheconf AddOutputFilterByType DEFLATE "application/atom+xml" \ @@ -613,7 +613,7 @@ Compress all output labeled with one of the following media types using the [Add Map the following filename extensions to the specified encoding type using [AddEncoding](https://httpd.apache.org/docs/current/mod/mod_mime.html#addencoding) so Apache can serve the file types with the appropriate `Content-Encoding` response header (this will NOT make Apache compress them!). If these files types were served without an appropriate `Content-Encoding` response header, client applications (e.g.: browsers) wouldn't know that they first need to uncompress the response, and thus, wouldn't be able to understand the content. -```apache +```apacheconf AddEncoding gzip svgz @@ -625,7 +625,7 @@ Map the following filename extensions to the specified encoding type using [AddE Serve resources with a far-future expiration date using the [mod_expires](https://httpd.apache.org/docs/current/mod/mod_expires.html) module, and [Cache-Control](/en-US/docs/Web/HTTP/Headers/Cache-Control) and [Expires](/en-US/docs/Web/HTTP/Headers/Expires) headers. -```apache +```apacheconf ExpiresActive on ExpiresDefault "access plus 1 month" diff --git a/files/en-us/learn/server-side/django/authentication/index.md b/files/en-us/learn/server-side/django/authentication/index.md index d9afe17f4a2837f..7a2a59a698d2c11 100644 --- a/files/en-us/learn/server-side/django/authentication/index.md +++ b/files/en-us/learn/server-side/django/authentication/index.md @@ -608,7 +608,7 @@ The very last step is to add a link for this new page into the sidebar. We'll pu Open the base template (**/locallibrary/catalog/templates/base_generic.html**) and add the "My Borrowed" line to the sidebar in the position shown below. -```python +```django