Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Efficient Template: Instead of Individual files for each Ayah, Put the Ayat Surah wise ... (and other stuff in description) #7

Open
AfzGit opened this issue Jun 9, 2024 · 8 comments

Comments

@AfzGit
Copy link

AfzGit commented Jun 9, 2024

As-Salam Walaikum. Instead of having each Ayah in a seperate file, it will be better if it is grouped Surah wise.

These are some cons to the current approach:

  • Obsidian starts lagging if there are too many similar notes (like "1.md" * 114)
  • does not take into account different names of the Same Surahs (like "Iklas" and "Ahad")
  • both files and tags take some processing power and lag the whole vault up a bit.
  • refering to the previous and next Ayah takes longer
  • searching by surah number is missing

i would like to present the following solution to this problem:

image

  • we can search the Surah by number
  • we can view prev and next Ayahs easily
  • we can embed easier:

image

  • Alias support can also be added to support different names for the same Surah

image

Let me know what you think about it. BarakAllahu Feek.

@AmmarCodes
Copy link
Owner

Waalaykom assalam 👋

Great suggestion!

With that implemented one could even put the whole folder inside their vault instead of having a separate vault (with the current implementation separate vault makes sense given the amount of files).

I'll work on that soon inshaAlla.

JazakaAllah khaira 👍

@AfzGit
Copy link
Author

AfzGit commented Jun 14, 2024

InshaAllah. Ameen wa iyyak. May Allah make it easy and accept it from you.

@AmmarCodes
Copy link
Owner

@AfzGit I'm testing this out with footnotes instead of heading, it seems cleaner when embedded. Also the auto complete will work as expected when starting to type ![[^

Here's a comparision:

footnote heading
image image

Which one you think is better?

@AfzGit
Copy link
Author

AfzGit commented Jun 14, 2024

Using headers would be better:

  • Using headers is essential as translations, transliterations and custom notes can be later added more easily.
  • Currently footnotes break upon using new lines.
  • The formatting of footnotes is also very strict, you will need to stick to the specified format by obsidian or else it will not work
  • Managing a long list of footnotes is also harder than using heading.
  • header generally provide more flexibility and are also well understood by others
  • Plus, there is a way to get cleaner embeds below:

Clean Embeds

You can get embed without the heading using this snippet:

no-embed-header.css

.no-head .markdown-embed h1,
.no-head .markdown-embed h2,
.no-head .markdown-embed h3,
.no-head .markdown-embed h4,
.no-head .markdown-embed h5,
.no-head .markdown-embed h6 {
    display: none;
}

Place the above in your obsidian snippets folder, enable it in Appearance setting, then add this to each Surah's Yaml Header

---
cssclasses:
  - no-head
---
  • Before: image

  • After: image

A big pro to this approach would be that the one who wants header can have them by not including the no-head in cssclasses of their surah's

if you want to apply it on the whole vault without using the cssclasses yaml header you could also instead use this snippet:

no-embed-header-all.css

.markdown-embed h1,
.markdown-embed h2,
.markdown-embed h3,
.markdown-embed h4,
.markdown-embed h5,
.markdown-embed h6 {
    display: none;
}

@AmmarCodes
Copy link
Owner

Would you be able to test this vault and give me your feedback?

We need to add extra instruction how to properly embed an Ayah once we're done, but for now you know how it do it 😄

Quran.zip

@AfzGit
Copy link
Author

AfzGit commented Jun 14, 2024

Looks good! Although not numbering the Surah makes file navigation confusing. I would suggest numbering the Surah filenames which has the added benefit of searching via surah number.

Pros:

  • The different ways to pronounce the surah make it so that using [[ is not reliable enough. Adding surah number adds a layer of reliability.
  • Looks well organized in the file explorer of obsidian
  • Faster searching

Sample:
image

@AmmarCodes
Copy link
Owner

@AfzGit JazakaAllah khaira!

Would you check it now?
Quran.zip

@AfzGit
Copy link
Author

AfzGit commented Jun 14, 2024

@AmmarCodes Looks almost perfect. Aliases still serve no purpose. Here are aliases that have some purpose

image

This is an example where i:

  1. Used the English name of the Surah
  2. Wrote the surah name pronounced in a different way
  3. wrote surah number + arabic name
  4. wrote surah number in arabic + arabic name

this is just an example. It does not have to exactly be like this. Maybe you can fetch aliases from Here:

image

using the above data you can also add ayah YAML header

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants