Example of Markdown for the custom home page

Hi,
Is it possible to share some examples of Markdown syntax to personnalize the custom home page ?

I don’t really know Markdown, and even with the doc, I don’t manage to reproduce the style I can see for example on Framatube.

Someone could share his work ? Thanks, Eric. (I’m on Peertube v4.0.0)

@EricG, Here is an example of Markdown. The entire page is in markdown. https://raw.githubusercontent.com/Chocobozzz/PeerTube/develop/README.md

The display of this will be as shown here:

1 « J'aime »

Hi @newbedeveloper, thanks for the tip, I didn’t know that the github presentation was written in Markdown.

But it seems to be some differences between the Markdown supported on github and the one on Peertube.
See here : https://tube.reseau-canope.fr/home
I’ve copied/pasted the raw code of the github page in the homepage of Peertube ; you will see that things are displayed differently.
For example :

  • image are larger by default
  • images are not resizing with the browser window
  • text doesn’t follow the border of images on multiple lines
  • align=« center » are not working
  • etc.

Is there a way to correct that, or the Markdown supported by Peertube is more limited ?

Thanks.

Hi EricG,

Here you can see the code of my custom home page.
You can see the display here.

I don’t use all the features, but the basics are there :wink:

I hope this will be useful to you.

2 « J'aime »

Hi rnek0, I’ve looked at your code and page, thanks.
I’ve managed to do something that will be enough for me at this time.
Thanks for your help.
Eric

1 « J'aime »

Thanks a lot for your question, I am writing down which I am facing -

This doesn’t seem possible since the custom home page is a simple markdown document, which doesn’t go through any of the LookML background parsing + content creation that lets you use cool things like user attributes.

You could definitely whip up a “Custom Home Page” dashboard with some fancy HTML that could leverage user attributes and still look like a home page, but at the end of the day it would still be a Dashboard, not a document. If you want to go down that route, I can provide some pointers on relevant HTML!

I wasn’t able to find good documentation on this, so thought I’d make a post here in case anyone is trying to do something similar.
You can create a navigation sidebar for Markdown documents using this format at the top of each Markdown document:

title: Help Center
navigation:

  • section: Help Center
  • document: overview_doc
    label: Overview
  • document: data_sources_doc
    label: Data Sources
  • document: data_definitions_doc
    label: Data Definitions
  • document: faq_doc

Here’s the POC solution I came up with to create a different home page based on user attribute values. Basically also follow this on my best HRMS software in Kolkata and related things. It’s intended as a skeleton that I’ll fill in later as we decide how the two different home pages will look.

I created a new view _test_home_page that has a single field:

measure: _html {

    sql: 1 ;;

    html: <div>

            {% if _user_attributes['foo'] == 'bar' %}

              bar

            {% elsif _user_attributes['foo'] != 'bar' %}

              not bar!

            {% endif %}

          </div>;;

  }

Then I just present this field in a single-value dashboard tile, enlarged to fill the entire screen. From brief testing, it appears that I can use the usual HTML tags, presumably all the ones listed [here]. I’ve tested it on our instance and it works, showing “bar” for users with user attribute foo set to bar, and “not bar!” otherwise.

Hope this thing will help you properly.