If i understood you correctly, one way to achieve what you need is like this:
Create a template, example Library/Personal/Query/header.md
(you can place that file wherever you want, this is just my convention)
---
tags: template
---
* [[{{page}}|{{name}}]]
If you want to search for all files with that format, you can use the following regex to find them /\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/
Info on how to search for headers here: Objects
Then the query would be:
header select page,name where page =~ /\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/ and level = 1 render [[Library/Personal/Query/header]]
I’ll try to get what I’m looking for.
This does not have the lastModified date so it cannot sort.
I think I know how to get it.
Once I get it I will put the answer here.
Thank you very much.
```query
header select page,name where page =~ /\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/ and level = 1 order by lastModified desc render [[Library/Personal/Query/header]]
```
Sure it can be done better but this works.
If a page has no yaml title but has h1, use the value of h1 as title («titulo»).
This is de code
```template
{{#each @p in {page where name !=~ /^Library\// and name != 'index' and name != 'SETTINGS' and name != 'STYLES' order by lastModified desc limit 10}}}
{{#if @p.titulo}}
* [[{{@p.name}}|{{@p.titulo}}]]
{{else}}
{{{header where [email protected] and level = 1 limit 1 select page,name render[[Library/Personal/Templates/ligazon-h1]]}}}
{{/if}}
{{/each}}
```