From add2f680e8924902f7ccd444c1affebf459ab353 Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Thu, 13 Apr 2017 17:10:29 -0700 Subject: [PATCH] Default highlight.js off, dockerfile > conf highlighting, pygments (#2757) * Default highlight.js off, dockerfile > conf highlighting, pygments * Address feedback, style changes, markdownify reductions * Getting rid of more markdownify * Fix for right-hand nav spacing --- _includes/docker_platform_matrix.md | 4 - _layouts/docs.html | 3 + _scss/_content.scss | 5 +- _scss/_navigation.scss | 3 +- compose/aspnet-mssql-compose.md | 22 ++- css/pygments/perldoc.css | 67 ++++++++ .../admin/configure/use-a-load-balancer.md | 48 ++---- docker-for-windows/troubleshoot.md | 6 +- engine/examples/mongodb.md | 16 +- engine/examples/postgresql_service.md | 2 +- engine/examples/running_redis_service.md | 2 +- engine/swarm/admin_guide.md | 2 +- .../eng-image/dockerfile_best-practices.md | 2 +- .../networking/work-with-networks.md | 2 +- landing.md | 152 ------------------ learn.md | 18 +-- opensource/project/test-and-docs.md | 2 +- swarm/scheduler/rescheduling.md | 4 +- test.md | 33 ++-- 19 files changed, 136 insertions(+), 257 deletions(-) create mode 100755 css/pygments/perldoc.css delete mode 100644 landing.md diff --git a/_includes/docker_platform_matrix.md b/_includes/docker_platform_matrix.md index c953f209f2..c5ddf2f384 100644 --- a/_includes/docker_platform_matrix.md +++ b/_includes/docker_platform_matrix.md @@ -1,6 +1,5 @@ {% capture green-check %}![yes](/engine/installation/images/green-check.svg){: style="height: 14px"}{% endcapture %} -{% capture matrix %} | Platform | Docker EE | Docker CE x86_64 | Docker CE ARM | | ---------------------------------------------------------------------------------------------------- | ----------------- | ----------------- | ----------------- | | [Ubuntu](/engine/installation/linux/ubuntu.md) | {{ green-check }} | {{ green-check }} | {{ green-check }} | @@ -16,6 +15,3 @@ | [Microsoft Azure](/docker-for-azure/) | {{ green-check }} | {{ green-check }} | | | [Amazon Web Services](/docker-for-aws/) | {{ green-check }} | {{ green-check }} | | {: style="width: 75%" } - -{% endcapture %} -{{ matrix | markdownify }} \ No newline at end of file diff --git a/_layouts/docs.html b/_layouts/docs.html index e9452d5ba4..47bc3272c0 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -63,6 +63,7 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor % + @@ -192,10 +193,12 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor % {% include footer.html %} + {% if page.highlightjs == true %} + {% endif %} diff --git a/_scss/_content.scss b/_scss/_content.scss index 36e48ca599..0008a53685 100755 --- a/_scss/_content.scss +++ b/_scss/_content.scss @@ -129,10 +129,9 @@ pre { font-size: 13px; line-height: 1.42857143; color: #333; - word-break: normal!important; - word-wrap: break-word; + word-break: normal!important; + word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; - overflow-x: scroll!important; } diff --git a/_scss/_navigation.scss b/_scss/_navigation.scss index d0195f4be5..28bf1975fe 100755 --- a/_scss/_navigation.scss +++ b/_scss/_navigation.scss @@ -172,7 +172,6 @@ margin: 0; padding: 0 60px 0 0; width: 300px; - line-height: 24px; li { padding: 2px 8px 2px 15px; float: left; @@ -180,7 +179,7 @@ a { display: block; font-size: 12px; - padding: 0 10px 0 10px; + padding: 5px; text-decoration: none; } } diff --git a/compose/aspnet-mssql-compose.md b/compose/aspnet-mssql-compose.md index fa4b9b74b1..ac6e1b4c70 100644 --- a/compose/aspnet-mssql-compose.md +++ b/compose/aspnet-mssql-compose.md @@ -1,5 +1,5 @@ --- -description: Create a Docker Compose application using ASP.NET Core and SQL Server on Linux in Docker. +description: Create a Docker Compose application using ASP.NET Core and SQL Server on Linux in Docker. keywords: dotnet, .NET, Core, example, ASP.NET Core, SQL Server, mssql title: "Quickstart: Compose and ASP.NET Core with SQL Server" --- @@ -27,7 +27,7 @@ configure this app to use our SQL Server database, and then create a This directory will be the context of your docker-compose project. For [Docker for Windows](https://docs.docker.com/docker-for-windows/#/shared-drives) and [Docker for Mac](https://docs.docker.com/docker-for-mac/#/file-sharing), you - have to set up file sharing for the volume that you need to map. + have to set up file sharing for the volume that you need to map. 1. Within your directory, use the `aspnetcore-build` Docker image to generate a sample web application within the container under the `/app` directory and @@ -37,12 +37,12 @@ configure this app to use our SQL Server database, and then create a $ docker run -v ${PWD}:/app --workdir /app microsoft/aspnetcore-build:lts dotnet new mvc --auth Individual ``` - > **Note**: If running in Docker for Windows, make sure to use Powershell + > **Note**: If running in Docker for Windows, make sure to use Powershell or specify the absolute path of your app directory. 1. Create a `Dockerfile` within your app directory and add the following content: - ```dockerfile + ```conf FROM microsoft/aspnetcore-build:lts COPY . /app WORKDIR /app @@ -88,20 +88,18 @@ configure this app to use our SQL Server database, and then create a 1. Create a `docker-compose.yml` file. Write the following in the file, and make sure to replace the password in the `SA_PASSWORD` environment variable under `db` below. This file will define the way the images will interact as - independent services. + independent services. > **Note**: The SQL Server container requires a secure password to startup: > Minimum length 8 characters, including uppercase and lowercase letters, > base 10 digits and/or non-alphanumeric symbols. - ```none - - version: '3' - + ```yaml + version: "3" services: web: build: . - ports: + ports: - "8000:80" depends_on: - db @@ -126,7 +124,7 @@ configure this app to use our SQL Server database, and then create a [...] public void ConfigureServices(IServiceCollection services) { - // Database connection string. + // Database connection string. // Make sure to update the Password value below from "your_password" to your actual password. var connection = @"Server=db;Database=master;User=sa;Password=your_password;"; @@ -147,7 +145,7 @@ configure this app to use our SQL Server database, and then create a } [...] ``` - + 1. Ready! You can now run the `docker-compose build` command. ```bash diff --git a/css/pygments/perldoc.css b/css/pygments/perldoc.css new file mode 100755 index 0000000000..c64e6bba6d --- /dev/null +++ b/css/pygments/perldoc.css @@ -0,0 +1,67 @@ +/* +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeeedd } */ +.highlight .c { color: #228B22 } /* Comment */ +.highlight .err { color: #a61717 } /* Error */ +.highlight .k { color: #8B008B } /* Keyword */ +.highlight .ch { color: #228B22 } /* Comment.Hashbang */ +.highlight .cm { color: #228B22 } /* Comment.Multiline */ +.highlight .cp { color: #1e889b } /* Comment.Preproc */ +.highlight .cpf { color: #228B22 } /* Comment.PreprocFile */ +.highlight .c1 { color: #228B22 } /* Comment.Single */ +.highlight .cs { color: #8B008B } /* Comment.Special */ +.highlight .gd { color: #aa0000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #000080 } /* Generic.Heading */ +.highlight .gi { color: #00aa00 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs {} /* Generic.Strong */ +.highlight .gu { color: #800080 } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { color: #8B008B } /* Keyword.Constant */ +.highlight .kd { color: #8B008B } /* Keyword.Declaration */ +.highlight .kn { color: #8B008B } /* Keyword.Namespace */ +.highlight .kp { color: #8B008B } /* Keyword.Pseudo */ +.highlight .kr { color: #8B008B } /* Keyword.Reserved */ +.highlight .kt { color: #00688B } /* Keyword.Type */ +.highlight .m { color: #B452CD } /* Literal.Number */ +.highlight .s { color: #CD5555 } /* Literal.String */ +.highlight .na { color: #658b00 } /* Name.Attribute */ +.highlight .nb { color: #658b00 } /* Name.Builtin */ +.highlight .nc { color: #008b45 } /* Name.Class */ +.highlight .no { color: #00688B } /* Name.Constant */ +.highlight .nd { color: #707a7c } /* Name.Decorator */ +.highlight .ne { color: #008b45 } /* Name.Exception */ +/*.highlight .nf { color: #008b45 } Name.Function */ +.highlight .nn { color: #008b45 } /* Name.Namespace */ +.highlight .nt { color: #8B008B } /* Name.Tag */ +.highlight .nv { color: #00688B } /* Name.Variable */ +.highlight .ow { color: #8B008B } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #B452CD } /* Literal.Number.Bin */ +.highlight .mf { color: #B452CD } /* Literal.Number.Float */ +.highlight .mh { color: #B452CD } /* Literal.Number.Hex */ +.highlight .mi { color: #B452CD } /* Literal.Number.Integer */ +.highlight .mo { color: #B452CD } /* Literal.Number.Oct */ +.highlight .sa { color: #CD5555 } /* Literal.String.Affix */ +.highlight .sb { color: #CD5555 } /* Literal.String.Backtick */ +.highlight .sc { color: #CD5555 } /* Literal.String.Char */ +.highlight .dl { color: #CD5555 } /* Literal.String.Delimiter */ +.highlight .sd { color: #CD5555 } /* Literal.String.Doc */ +.highlight .s2 { color: #CD5555 } /* Literal.String.Double */ +.highlight .se { color: #CD5555 } /* Literal.String.Escape */ +.highlight .sh { color: #1c7e71 } /* Literal.String.Heredoc */ +.highlight .si { color: #CD5555 } /* Literal.String.Interpol */ +.highlight .sx { color: #cb6c20 } /* Literal.String.Other */ +.highlight .sr { color: #1c7e71 } /* Literal.String.Regex */ +.highlight .s1 { color: #CD5555 } /* Literal.String.Single */ +.highlight .ss { color: #CD5555 } /* Literal.String.Symbol */ +.highlight .bp { color: #658b00 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #008b45 } /* Name.Function.Magic */ +.highlight .vc { color: #00688B } /* Name.Variable.Class */ +.highlight .vg { color: #00688B } /* Name.Variable.Global */ +.highlight .vi { color: #00688B } /* Name.Variable.Instance */ +.highlight .vm { color: #00688B } /* Name.Variable.Magic */ +.highlight .il { color: #B452CD } /* Literal.Number.Integer.Long */ diff --git a/datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md b/datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md index a6bac25e1e..a65e4bb6f4 100644 --- a/datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md +++ b/datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md @@ -70,7 +70,7 @@ queried, and it takes the form: "replica id": "2006-01-02T15:04:05Z07:00", "another replica id": "2006-01-02T15:04:05Z07:00" }, - // other fields + "(other fields go here)": "..." } ``` @@ -94,10 +94,8 @@ Use the following examples to configure your load balancer for DTR.
  • AWS LB
  • -
    - {% highlight nginx %} - - +
    +```conf user nginx; worker_processes 1; @@ -129,14 +127,10 @@ stream { proxy_pass dtr_80; } } - - - {% endhighlight %} +```
    -
    - {% highlight none %} - - +
    +```conf global log /dev/log local0 log /dev/log local1 notice @@ -180,14 +174,10 @@ backend dtr_upstream_servers_443 server node01 :443 weight 100 check check-ssl verify none server node02 :443 weight 100 check check-ssl verify none server node03 :443 weight 100 check check-ssl verify none - - - {% endhighlight %} +```
    -
    - {% highlight json %} - - +
    +```json { "Subnets": [ "subnet-XXXXXXXX", @@ -249,9 +239,7 @@ backend dtr_upstream_servers_443 "GroupName": "XXXXXXXXXXXX" } } - - - {% endhighlight %} +```
    @@ -263,9 +251,8 @@ You can deploy your load balancer using:
  • HAProxy
  • -
    - {% highlight none %} - +
    +```conf # Create the nginx.conf file, then # deploy the load balancer @@ -276,12 +263,10 @@ docker run --detach \ --publish 443:443 \ --volume ${PWD}/nginx.conf:/etc/nginx/nginx.conf:ro \ nginx:stable-alpine - - {% endhighlight %} +```
    -
    - {% highlight none %} - +
    +```conf # Create the haproxy.cfg file, then # deploy the load balancer @@ -293,8 +278,7 @@ docker run --detach \ --restart=unless-stopped \ --volume ${PWD}/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro \ haproxy:1.7-alpine haproxy -d -f /usr/local/etc/haproxy/haproxy.cfg - - {% endhighlight %} +```
    diff --git a/docker-for-windows/troubleshoot.md b/docker-for-windows/troubleshoot.md index ce93728c0a..221dcc6cec 100644 --- a/docker-for-windows/troubleshoot.md +++ b/docker-for-windows/troubleshoot.md @@ -262,11 +262,11 @@ Windows containers without Docker for Windows. However, if you install Docker this way, you cannot develop or run Linux containers. If you try to run a Linux container on the native Docker daemon, an error occurs: - ```no-highlight + ```none C:\Program Files\Docker\docker.exe: image operating system "linux" cannot be used on this platform. See 'C:\Program Files\Docker\docker.exe run --help'. - ``` + ``` ### Limitations of Windows containers for `localhost` and published ports @@ -284,7 +284,7 @@ So, in a scenario where you use Docker to pull an image and run a webserver with a command like this: ``` -docker run -d -p 80:80 --name webserver nginx +docker run -d -p 80:80 --name webserver nginx ``` Using `curl http://localhost`, or pointing your web browser at diff --git a/engine/examples/mongodb.md b/engine/examples/mongodb.md index a214ddfa9f..e3edf44cb2 100644 --- a/engine/examples/mongodb.md +++ b/engine/examples/mongodb.md @@ -34,7 +34,7 @@ $ nano Dockerfile Although optional, it is handy to have comments at the beginning of a `Dockerfile` explaining its purpose: -```dockerfile +```conf # Dockerizing MongoDB: Dockerfile for building MongoDB images # Based on ubuntu:latest, installs MongoDB following the instructions from: # http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ @@ -47,7 +47,7 @@ the *parent* of your *Dockerized MongoDB* image. We will build our image using the latest version of Ubuntu from the [Docker Hub Ubuntu](https://hub.docker.com/_/ubuntu/) repository. -```dockerfile +```conf # Format: FROM repository[:version] FROM ubuntu:latest ``` @@ -59,7 +59,7 @@ FROM ubuntu:latest We will begin with importing the MongoDB public GPG key. We will also create a MongoDB repository file for the package manager. -```dockerfile +```conf # Installation: # Import MongoDB public GPG key AND create a MongoDB list file RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 @@ -69,21 +69,21 @@ RUN echo "deb http://repo.mongodb.org/apt/ubuntu $(cat /etc/lsb-release | grep D After this initial preparation we can update our packages and install MongoDB. -```dockerfile +```conf # Update apt-get sources AND install MongoDB RUN apt-get update && apt-get install -y mongodb-org ``` > **Tip**: You can install a specific version of MongoDB by using a list of required packages with versions, e.g.: > -> ```dockerfile +> ```conf > RUN apt-get update && apt-get install -y mongodb-org=3.0.1 mongodb-org-server=3.0.1 mongodb-org-shell=3.0.1 mongodb-org-> mongos=3.0.1 mongodb-org-tools=3.0.1 ``` MongoDB requires a data directory. Let's create it as the final step of our installation instructions. -```dockerfile +```conf # Create the MongoDB data directory RUN mkdir -p /data/db ``` @@ -92,7 +92,7 @@ Lastly we set the `ENTRYPOINT` which will tell Docker to run `mongod` inside the containers launched from our MongoDB image. And for ports, we will use the `EXPOSE` instruction. -```dockerfile +```conf # Expose port 27017 from the container to the host EXPOSE 27017 @@ -110,7 +110,7 @@ With our `Dockerfile`, we can now build the MongoDB image using Docker. Unless experimenting, it is always a good practice to tag Docker images by passing the `--tag` option to `docker build` command. -```dockerfile +```conf # Format: docker build --tag/-t / . # Example: $ docker build --tag my/repo . diff --git a/engine/examples/postgresql_service.md b/engine/examples/postgresql_service.md index e864ef22c0..cb7b0b2c3d 100644 --- a/engine/examples/postgresql_service.md +++ b/engine/examples/postgresql_service.md @@ -20,7 +20,7 @@ This PostgreSQL setup is for development-only purposes. Refer to the PostgreSQL documentation to fine-tune these settings so that it is suitably secure. -```dockerfile +```conf # # example Dockerfile for https://docs.docker.com/examples/postgresql_service/ # diff --git a/engine/examples/running_redis_service.md b/engine/examples/running_redis_service.md index 473971fb95..836daead93 100644 --- a/engine/examples/running_redis_service.md +++ b/engine/examples/running_redis_service.md @@ -12,7 +12,7 @@ using a link. Firstly, we create a `Dockerfile` for our new Redis image. -```dockerfile +```conf FROM ubuntu:14.04 RUN apt-get update && apt-get install -y redis-server EXPOSE 6379 diff --git a/engine/swarm/admin_guide.md b/engine/swarm/admin_guide.md index e4a13569f7..a40eb27f52 100644 --- a/engine/swarm/admin_guide.md +++ b/engine/swarm/admin_guide.md @@ -338,7 +338,7 @@ If you lose the quorum of managers, you cannot administer the swarm. If you have lost the quorum and you attempt to perform any management operation on the swarm, an error occurs: -```no-highlight +```none Error response from daemon: rpc error: code = 4 desc = context deadline exceeded ``` diff --git a/engine/userguide/eng-image/dockerfile_best-practices.md b/engine/userguide/eng-image/dockerfile_best-practices.md index 79fd747a49..31ebdde1ae 100644 --- a/engine/userguide/eng-image/dockerfile_best-practices.md +++ b/engine/userguide/eng-image/dockerfile_best-practices.md @@ -163,7 +163,7 @@ are included inline. must be escaped. If your string contains inner quote characters (`"`), escape them as well. -```dockerfile +```conf # Set one or more individual labels LABEL com.example.version="0.0.1-beta" LABEL vendor="ACME Incorporated" diff --git a/engine/userguide/networking/work-with-networks.md b/engine/userguide/networking/work-with-networks.md index 1f0b494acc..786ef45659 100644 --- a/engine/userguide/networking/work-with-networks.md +++ b/engine/userguide/networking/work-with-networks.md @@ -997,7 +997,7 @@ multi-host network, the daemon cannot clean up stale connectivity endpoints. Such stale endpoints may cause an error if a new container is connected to that network with the same name as the stale endpoint: -```no-highlight +```none ERROR: Cannot start container bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e: container already connected to network multihost ``` diff --git a/landing.md b/landing.md deleted file mode 100644 index 6b238a150d..0000000000 --- a/landing.md +++ /dev/null @@ -1,152 +0,0 @@ ---- -description: Home page for Docker's documentation -keywords: Docker, documentation, manual, guide, reference, api -landing: true -title: Docker Documentation -notoc: true ---- - -Docker packages your app with its dependencies, freeing you from worrying about your -system configuration, and making your app more portable. - - - - - - - - - - -
    -{% capture basics %} -### Learn the basics of Docker - -The basic tutorial introduces Docker concepts, tools, and commands. The examples show you how to build, push, -and pull Docker images, and run them as containers. This -tutorial stops short of teaching you how to deploy applications. -{% endcapture %}{{ basics | markdownify }} - - -{% capture apps %} -### Define and deploy applications - -The define-and-deploy tutorial shows how to relate -containers to each other and define them as services in an application that is ready to deploy at scale in a -production environment. Highlights [Compose Version 3 new features](/engine/getstarted-voting-app/index.md#compose-version-3-features-and-compatibility) and swarm mode. -{% endcapture %}{{ apps | markdownify }} - -
    {% capture basics %}[Start the basic tutorial](/engine/getstarted/){: class="button primary-btn"}{% endcapture %}{{ basics | markdownify }} -{% capture apps %}[Start the application tutorial](/engine/getstarted-voting-app/){: class="button primary-btn"}{% endcapture %}{{ apps | markdownify }} -
    - -## Components -
    -

    Components

    -
    -
    -
    -
    -
    - Docker for Mac -
    -

    Docker for Mac

    -

    A native application using the macOS sandbox security model which delivers all Docker tools to your Mac.

    -
    -
    -
    -
    -
    - Docker for Mac -
    -

    Docker for Windows

    -

    A native Windows application which delivers all Docker tools to your Windows computer.

    -
    -
    -
    -
    -
    - Docker for Mac -
    -

    Docker for Linux

    -

    Install Docker on a computer which already has a Linux distribution installed.

    -
    -
    - -
    - -
    -
    - Docker Engine -
    -
    -

    Docker Engine

    -

    Create Docker images and run Docker containers. As of v1.12.0, Engine includes swarm mode container orchestration features.

    -
    -
    - -
    -
    - Docker Engine -
    -
    -

    Docker Cloud

    -

    A hosted service for building, testing, and deploying Docker images to your hosts.

    -
    -
    - -
    -
    - Docker Universal Control Plane -
    -
    -

    Docker Universal Control Plane

    -

    (UCP) Manage a cluster of on-premises Docker hosts as if they were a single machine.

    -
    -
    - -
    -
    - Docker Compose -
    -
    -

    Docker Compose

    -

    Define applications built using multiple containers.

    -
    -
    - -
    -
    - Docker Hub -
    -
    -

    Docker Hub

    -

    A hosted registry service for managing and building images.

    -
    -
    - -
    -
    - Docker Trusted Registry -
    -
    -

    Docker Trusted Registry

    -

    (DTR) stores and signs your images.

    -
    -
    - -
    -
    - Docker Machine -
    -
    -

    Docker Machine

    -

    Automate container provisioning on your network or in the cloud. Available for Windows, macOS, or Linux.

    -
    -
    - -
    - -
    -
    -
    diff --git a/learn.md b/learn.md index d0c9e1e402..ac24fa2eaf 100644 --- a/learn.md +++ b/learn.md @@ -9,37 +9,27 @@ Docker workflows. - - - -
    -{% capture basics %} + ## Learn the basics of Docker The basic tutorial introduces Docker concepts, tools, and commands. The examples show you how to build, push, and pull Docker images, and run them as containers. This tutorial stops short of teaching you how to deploy applications. -{% endcapture %}{{ basics | markdownify }} - -{% capture apps %} + ## Define and deploy applications The define-and-deploy tutorial shows how to relate containers to each other and define them as services in an application that is ready to deploy at scale in a production environment. Highlights Compose Version 3 new features and swarm mode. -{% endcapture %}{{ apps | markdownify }} -
    -{% capture basics %} + [Start the basic tutorial](/engine/getstarted/){: class="button primary-btn"} -{% endcapture %}{{ basics | markdownify }} -{% capture apps %} + [Start the application tutorial](/engine/getstarted-voting-app/){: class="button primary-btn"} -{% endcapture %}{{ apps | markdownify }}
    diff --git a/opensource/project/test-and-docs.md b/opensource/project/test-and-docs.md index ad06df7037..df63304cc2 100644 --- a/opensource/project/test-and-docs.md +++ b/opensource/project/test-and-docs.md @@ -95,7 +95,7 @@ hour. To run the test suite, do the following: value on the basis of your host performance. When they complete successfully, you see the output concludes with something like this: - ```no-highlight + ```none Ran 68 tests in 79.135s ``` diff --git a/swarm/scheduler/rescheduling.md b/swarm/scheduler/rescheduling.md index 57c8f583e1..35a4c41334 100644 --- a/swarm/scheduler/rescheduling.md +++ b/swarm/scheduler/rescheduling.md @@ -42,7 +42,7 @@ docker logs SWARM_MANAGER_CONTAINER_ID When a container is successfully rescheduled, it generates a message similar to the following: -```no-highlight +```none Rescheduled container 2536adb23 from node-1 to node-2 as 2362901cb213da321 Container 2536adb23 was running, starting container 2362901cb213da321 ``` @@ -50,7 +50,7 @@ Container 2536adb23 was running, starting container 2362901cb213da321 If for some reason, the new container fails to start on the new node, the log contains: -```no-highlight +```none Failed to start rescheduled container 2362901cb213da321 ``` diff --git a/test.md b/test.md index 7ea3781a9a..7f0103b70e 100644 --- a/test.md +++ b/test.md @@ -160,9 +160,8 @@ This is also the case if you need to use rowspans or colspans. Try to avoid setting styles directly on your tables! If you set the width on a ``, you only need to do it on the first one. If you have a ``, set it there. -> **Note**: If you need to have **markdown** in a **HTML** table, you need to -> capture the table and then filter it through `markdownify`. See [tabs](#tabs) -> for an example. Here, I avoid that by using HTML throughout. +> **Note**: If you need to have **markdown** in a **HTML** table, add +> `markdown="1"` to the HTML for the `` cells that contain the Markdown. @@ -242,31 +241,25 @@ Here are some tabs: You need to adjust the `id` and `data-target` values to match your use case. -If you have Markdown inside the content of the `
    `, you need to capture it, then -print it and run it through the `markdownify` Liquid filter. Here's a demo: +If you have Markdown inside the content of the `
    `, just add `markdown="1"` +as an attribute in the HTML for the `
    ` and Kramdown will render it.
    -
    -{% capture tab3-content %} +
    #### A Markdown header - list item 1 - list item 2 -{% endcapture %} -{{ tab3-content | markdownify }}
    -
    -{% capture tab4-content %} +
    #### Another Markdown header - list item 3 - list item 4 -{% endcapture %} -{{ tab4-content | markdownify }}
    @@ -472,7 +465,10 @@ end ### JSON -Sometimes this doesn't work right and you have to use `none`. +Warning: Syntax highlighting breaks easily for JSON if the code you present is +not a valid JSON document. Try running your snippet through [this +linter](http://jsonlint.com/) to make sure it's valid, and remember: there is no +syntax for comments in JSON! ```json "server": { @@ -511,9 +507,10 @@ command=/usr/sbin/sshd -D ### Dockerfile -Yes, we have our own highlighting in Rouge! +To enable syntax highlighting for Dockerfiles, use the `conf` lexer, for now. +In the future, native Dockerfile support is coming to Rouge. -```dockerfile +```conf # # example Dockerfile for https://docs.docker.com/examples/postgresql_service/ # @@ -548,9 +545,7 @@ CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main ### YAML -The `yaml` hint doesn't play nicely with Atom so we sometimes have to use `none`. - -```none +```yaml authorizedkeys: image: dockercloud/authorizedkeys deployment_strategy: every_node