Issue: Generate the content of the root ecosystem page #2197 #2466
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is what I tried doing to solve after researching from the web ->
Step 1: Created a data file
I created a new file called matrix-projects.yaml in the data directory. This file will contain the data for the Matrix projects and tools. I added the data manually, but it can also be fetched from an external source. The file contains categories, and within each category, there are projects with their names, descriptions, and URLs.
Step 2: Created a shortcode
I created a new file called matrix-projects.html in the layouts/shortcodes directory. This file contains the template for rendering the Matrix projects and tools. The shortcode uses the data from the matrix-projects.yaml file and loops through each category, displaying the category name, and then loops through each project, displaying the project name, description, and URL.
Step 3: Used the shortcode
I replaced the manual list in the Markdown file with the shortcode {{< matrix-projects >}}. This will render the Matrix projects and tools dynamically from the data file.
Created a data directory ->
Since the data directory is not present by default in the Matrix.org repository, I created a new directory named data in the root of the repository, alongside the content, layouts, and static directories. This is where I stored the matrix-projects.yaml file.
-> I am totally a beginner to this project having a large codebase so if I have produced a wrong solution with wrong approaches to the issue I apologize for that !!!