🥇

rtWork

  • Config right sidebar

    Config right sidebar to show related and feature post

    1. In the config structure open file config.yaml.
    1
    2
    3
    
    config/
           ├── _default/
                  └── config.yaml <-- file config for project
    
    1. Find key widgets in key params

    2. Find key homepage in key widgets

    3. Change limit and show to config

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    
    params:
        widgets:
            homepage:
                - type: search
                  params:
                      limit: 5
                - type: categories
                  params:
                      limit: 5
                - type: related-apps
                  params:
                      limit: 5
                      show: ["post"]
                - type: related-post
                  params:
                      limit: 5
                      show: ["apps"]
                - type: related-blogs
                  params:
                      limit: 5
                      show: ["apps", "post", "example"]
                - type: related-example
                  params:
                      limit: 5
                      show: ["apps"]
                - type: feature-post
                  params:
                      limit: 10
                      show: ["apps", "post", "services", "blogs"]
                - type: tag-cloud
                  params:
                      limit: 10
    

    Explain:

    • type: 1 type is one component in the right sidebar.
    • limit: the maximum element to display in the right sidebar.
    • show: An array of pages to display this component.

    Note

    1. The name in the array show is the name of the folder that contains the post on the page.
    2. The default for component search, category, and tag cloud is to show all pages.

    Config right sidebar to create related post

    1. In the config structure open file config.yaml.
    1
    2
    3
    
    config/
           ├── _default/
                  └── config.yaml <-- file config for project
    
    1. Find key widgets in key params

    2. Find key homepage in key widgets

    3. Write config

    1
    2
    3
    4
    5
    6
    7
    
    params:
        widgets:
            homepage:
                - type: related-example
                  params:
                      limit: 5
                      show: ["apps", "post"]
    

    Explain:

    • type: 1 type is one component in the right sidebar.
    • limit: the maximum element to display in the right sidebar.
    • show: An array of pages to display this component.

    -> Related example presented on two pages is apps and home (post is folder containing article of homepage), with maximum is 5 articles.

    1. Create title related example in file en.yaml and vi.yaml
    • Open file en.yaml
    • Find key widget
    • Write config
    1
    2
    3
    4
    
    widget:
        relatedExample:
            title:
                other: Related Example
    
    1. Result

    image

    NOTE

    1. To configure related in right sidebar, following this format ‘related- + capitalise name of folder containing list of posts: name layout’
    1
    2
    3
    4
    
    - type: related-example
     params:
       limit: 5
       show: ["apps"]
    
    1. Main keys, such as widget and params, already exist; you simply need to discover and write configuration in them.
    RealTimeX