Skip to content

SFG Post Authoring FAQs

Simanta Sarma edited this page May 22, 2019 · 20 revisions

Frequently Asked Questions on Authoring SFG Blog Posts

IMPORTANT – READ THIS

While authoring blog posts, ensure you DON’T click the Publish button. Posts should only be published by the internal team after reviews. Although Wordpress will keep saving drafts of your post, you can, at any time, click on the Save Draft button to save a draft of the post.

Common Problems and FAQs

How to start a new blog post?

To start a new blog post:

  1. Log in to WordPress.
  2. On the left pane of the WordPress Admin Dashboard, click Posts->Add New. The Add New Post page appears where you can start writing your post.

What are the different types of code I can add to a blog post?

There are three types of code that you can use in SFG Blog Posts:

  • Inline Code: Inline Code are language keywords, class names, interface names, and method names that we use while writing content.
  • Block Code: Small piece of relevant code taken from the code file or the complete code of a file. For example, a dependency declaration of a pom.xml is a Block Code. Similarly, the complete pom.xml code is also a Block Code. The UI displays Block Code in a code display box with syntax highlight.
  • Output Snippet: Output of applications and tools. For example, console output on running a program, output on the IntelliJ Terminal, and so on. You typically use Output Snippets when you want to highlight a part of the Output instead of adding a screenshot of it. Note that unlike Block Code, Output Snippets are not syntax highlighted. .

How to add Inline Code in a blog post?

To add Inline Code to a blog post:

  1. In the Visual Editor, click the position you want to insert the Inline Code.
  2. Click on the Code Insert button on the upper right of the toolbar.
  3. Paste your snippet into the text-area.
  4. Select Java from the Language drop-down list.
  5. Select Inline-Code from the Mode drop-down list.
  6. Ensure that the Left-Align-Indentation checkbox is selected.
  7. Click OK.
  8. Click the formatted Inline Code in the Visual Editor, and then click the Code Settings button on the upper right of the toolbar.
  9. Ensure Git is selected from the Theme drop-down list.
  10. Click OK. The formatted Inline Code (that you can check by clicking Text (HTML)) should be in this format.
    <code class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="git">Im inline Code</code>
  11. Click the Preview button to ensure that the Inline Code is being displayed as expected.

How to add a Block Code to a blog post?

To add Block Code to a blog post:

  1. In the Visual Editor, click the position you want to insert the Block Code.
  2. Click on the Code Insert button on the upper right of the toolbar.
  3. Paste your code into the text-area.
  4. Select Java from the Language drop-down list.
  5. Select Block-Code from the Mode drop-down list.
  6. Ensure that the Left-Align-Indentation checkbox is selected.
  7. Click OK.
  8. Click the code box in the Visual Editor code display box, and then click the Code Settings button on the upper right of the toolbar.
  9. Ensure Git is selected from the Theme drop-down list.
  10. Click OK. The Block Code (that you can check by clicking Text (HTML)) should be in this format.
    <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="git">Im inline Code</pre>
  11. Click the Preview button to ensure that the Block Code is being displayed as expected.

How to add an Output Snippet to a blog post?

To add an Output Snippet to a blog post:

  1. In the Visual Editor, click the position you want to insert the Output Snippet.
  2. Click on the Code Insert button on the upper right of the toolbar.
  3. Paste your Output Snippet into the text-area.
  4. Select Java from the Language drop-down list.
  5. Select Block-Code from the Mode drop-down list.
  6. Ensure that the Left-Align-Indentation checkbox is selected.
  7. Click OK.
  8. Click the Output Snippet in the Visual Editor code display box, and then click the Code Settings button on the upper right of the toolbar.
  9. Ensure Git is selected from the Theme drop-down list.
  10. Unselect the Show Linenumbers check-box.
  11. Click OK. The Output Snippet (that you can check by clicking Text (HTML)) should be in this format.
    <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="git" data-enlighter-linenumbers="false">Im Output Snippet</pre>
  12. Click the Preview button to ensure that the Output Snippet is being displayed as expected.

How to add an image to a blog post?

To add an image to a blog post:

  1. Click on the Wordpress Editor window where you want to insert the image.
  2. Click the Add Media button.
  3. Click the Upload Files tab.
  4. Drag and drop the image file to add or click the Select Files button to select the file from your computer.
  5. Once the upload completes, add an alternate text for the image in the Alt Text text field.
  6. Add a description of the image in the Description text field.
  7. Click the Insert into post button.
  8. Click the Preview button to ensure that the image is being displayed as expected.

How to add links to external resources?

To add a link to an external resource:

  1. In the WordPress Editor, select the text that you want to convert to a hyperlink.
  2. Click the link button.
  3. Add the URL of the link resource in the URL text field.
  4. Select the Open link in a new tab checkbox.
  5. Click the Add Link button.
  6. Click the Preview button.
  7. On the page preview, click the hyperlink to ensure that the resource opens in a new tab on the browser.

How to select categories for a blog post?

In SFG WordPress, each post is associated with one or more categories. Categories are displayed below the post title when the post is published. There are predefined categories that you can find in the WordPress Editor. To select a category:

  1. Locate the Categories pane on the right side of the WordPress Editor.
  2. Select the categories you want to associate the post with.
  3. Click the Preview button.
  4. On the page preview, ensure that the selected category(s) are displayed below the post title.

I could not find relevant categories for my blog post.

If you do not find a relevant category for your post, you can add your category. To add a category:

  1. Locate the Categories pane on the right side of the WordPress Editor.
  2. Click the Add New Category link.
  3. Type the category name in the text field.
  4. Select the parent category from the Parent Category drop-down list.
  5. Click the Add New Category button.
  6. Select the category you added.
  7. Click the Preview button.
  8. On the page preview, ensure that the selected category(s) are displayed below the post title.

How to add tables to a blog post?

You can use the [table], [table_tr], [table_td] constructs to add a table to a blog post.
Example:

[table width="30%" column_widths="40%|30%|30%" border="1"]  
   [table_tr]  
    [table_td]Operation[/table_td]  
    [table_td]ArrayList[/table_td]  
    [table_td]LinkedList[/table_td]  
  [/table_tr]  
[/table]