#13 Guidelines: Use the Edit as HTML option on preformatted blocks
Merged 3 years ago by bcotton. Opened 3 years ago by glb.
glb/fedora-magazine edit_as_html  into  master

@@ -83,6 +83,7 @@ 

  ** Enter a meaningful keyword in the SEO box under your article. (Most articles shouldn’t use __Fedora__.)

  ** If the Snippet doesn’t give an effective introduction or summary in the sample search result, rewrite it.

  ** Don’t feel like you have to eliminate every warning. A “green” rating overall is the only goal.

+ . **Use the Edit as HTML option when pasting into preformatted blocks.** Current versions of WordPress are known to strip leading hash marks (#) and leading whitespace when content is pasted into preformatted blocks. Some non-alphanumeric characters may also get garbled (&, <, >, etc.). Using the __Edit as HTML__ option (listed under the vertical ellipsis) prior to pasting content into the block seems to workaround this problem. Be sure to paste your content between the <pre> tags and do not overwrite them. After pasting your content, switch back to visual mode by using the __Edit visually__ option to see a better representation of what the final result will look like to the reader.

  

  == Other hints

  

I wasn't able to verify these changes locally using the suggested ./build.sh && ./preview.sh commands, but I think it is a simple enough change that there shouldn't be any problems. I got the following error when attempting to run ./build.sh:

$ ./build.sh 

This build script is using Podman to run the build in an isolated environment.

Trying to pull docker.io/antora/antora...
  Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/86/8681f4d7cd2ec28e59d64281006e5fb1aed1ffb5c00d8367bda506dff4e7430a/data?verify=1595799434-xsfCkDIbBS5yzk8qNNHqFJO1VTI%3D": dial tcp: lookup production.cloudflare.docker.com: no such host
Error: unable to pull docker.io/antora/antora: Error parsing image configuration: Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/86/8681f4d7cd2ec28e59d64281006e5fb1aed1ffb5c00d8367bda506dff4e7430a/data?verify=1595799434-xsfCkDIbBS5yzk8qNNHqFJO1VTI%3D": dial tcp: lookup production.cloudflare.docker.com: no such host

This is a useful addition. Was able to verify it on my machine, though getting the docker image took multiple trials.

Might modify slightly to indicate that in the edit as HTML mode, some special characters should be entered using HTML equivalents, for example

"<" should be "&lt;"
">" should be "&gt;"

More guides can be found at https://dev.w3.org/html5/html-author/charref

Might it be worth adding a CI pipeline for this so that automatic builds occur once an update is proposed? This will mean that contributors do not need to download the repository to their computer?

Pull-Request has been merged by bcotton

3 years ago

Merged! For what it's worth, it's generally preferred to keep one sentence per line in antora to make git diffs more readable. But since we're apparently not following that practice in this file anyway, it doesn't matter.

If you're still having trouble with the build script, #fedora-docs on IRC or the docs mailing list is probably the best place to get help (although Adam probably knows the system best, so if you catch him elsewhere, he can help with that)

Metadata