kmolz.blogg.se

How to use code blocks
How to use code blocks










how to use code blocks

days 365 –newkey rsa:2048 –keyout privateKey.key –out If you want to use them to create a self-signed certificate, you’d run something like:ĭocker run –v $PWD:/work –it nginx openssl req –x509 –sha256 –nodes “You’ll now see that the working directory on the host contains the files privateKey.key and CSR.csr. To format code longer than a single line, we recommend creating a code block rather than a snippet, as this allows for easy formatting and syntax recognition. Hit “Code Snippet,” and your code format will change to this:Ĭongrats! You just formatted your code snippet! To format this single line of code, click on the “” icon in the menu bar of the article editor.Ī dropdown menu will appear. Shoot! You’d like your command to be formatted differently than the rest of your text so it stands out.

how to use code blocks how to use code blocks

Perhaps you want to insert a docker command into your article. Let’s go over how to add a code snippet and a code block to your post. Sometimes just talking about your code isn’t going to cut it you need to show, rather than tell.īecause DZone’s readers prefer highly technical and detailed content, even down to the level of code itself, we’ve made it easy to include code in your articles.












How to use code blocks