mkdocs-plugins icon indicating copy to clipboard operation
mkdocs-plugins copied to clipboard

[timeline] Option to generate timeline from files in a folder

Open Andre601 opened this issue 1 year ago • 0 comments

It would be really cool if you could configure the timeline plugin to generate a timeline based on files in a folder. That way could you easily add more content (Maybe even with more formatting through markdown) without having to constantly extend the ::timeline:: ... ::/timeline:: placeholder.

Perhaps the plugin could use certain frontmatter and/or page values for the different options?

For example:

---
timeline:
  title: 'title' # If not present defaults to {{ page.title }}
  sub_title: 'Q1 2023' # Maybe use H1 header?
  icon: ':simple-github:' # Could default to Mkdocs-material's icon option?
---

# Page

Lorem Ipsum

would be equivalent to

::timeline::
[
  {
    "title": "title",
    "icon": ":simple-github:",
    "sub_title": "Q1 2023",
    "content": "Lorem Ipsum"
  }
]
::/timeline::

To define it, a folder option could be added:

::timeline:: folder=".profiles"

::/timeline::

This would search for a profiles folder relative to its own position...

Andre601 avatar Aug 30 '23 19:08 Andre601