exclude Beginners Guide

This commit is contained in:
taskylizard 2023-11-12 21:31:24 +05:30
parent 881c44627a
commit f19b1f941d
No known key found for this signature in database
GPG Key ID: 5CABA3D642DDC497
4 changed files with 8 additions and 26 deletions

View File

@ -36,7 +36,6 @@ def apply_to_all_md_files_in_current_dir():
with open(file, 'r', encoding='utf-8') as f: with open(file, 'r', encoding='utf-8') as f:
content = f.read() content = f.read()
if not content.startswith('---'): if not content.startswith('---'):
print("adding header to " + file)
with open(file, 'w', encoding='utf-8') as f2: with open(file, 'w', encoding='utf-8') as f2:
header = getHeaderForPage(file) header = getHeaderForPage(file)
f2.write(header+content) f2.write(header+content)

View File

@ -1,23 +0,0 @@
---
image: /static/banner4.png
icon: ":wave:"
---
# Welcome
![](/static/banner4.png)
**The Largest Collection of Free Stuff On The Internet!**
* Anyone can suggest [changes or corrections](https://rentry.org/fmhyedit) to the wiki. Please read our [Contribution Guide](https://rentry.co/Contrib-Guide) before trying to add or remove anything.
* If you're adding a new site, please [search](https://raw.githubusercontent.com/nbats/FMHYedit/main/single-page) first to make sure we don't already have it.
* Approved edits will be applied to this site and all [🔒 backups](https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/backups).
* You can send us stuff directly via [💬 Discord](https://redd.it/17f8msf).
* You can also checkout our subreddit, [r/FREEMEDIAHECKYEAH](https://www.reddit.com/r/FREEMEDIAHECKYEAH/) to know about any major updates to the wiki.
***
Emoji Legend:
* 🌐 - 3rd Party Indexes
* ↪️ - Storage Page Links
* ⭐ - Community Recommendations

View File

@ -17,6 +17,6 @@ defineProps<{ title: string; description?: string }>();
<div style="color: #c0caf5" tw="mt-2 text-4xl" v-html="description" /> <div style="color: #c0caf5" tw="mt-2 text-4xl" v-html="description" />
</div> </div>
</div> </div>
<div tw="shrink-0 h-4 w-full flex" style="background-color: #7bc5e4" /> <div tw="shrink-0 h-2 w-full flex" style="background-color: #c4b5fd" />
</div> </div>
</template> </template>

View File

@ -1,9 +1,15 @@
import type { MarkdownRenderer } from "vitepress"; import type { MarkdownRenderer } from "vitepress";
const excluded = ["Beginners Guide"];
export function toggleStarredPlugin(md: MarkdownRenderer) { export function toggleStarredPlugin(md: MarkdownRenderer) {
md.renderer.rules.list_item_open = (tokens, index, options, env, self) => { md.renderer.rules.list_item_open = (tokens, index, options, env, self) => {
const contentToken = tokens[index + 2]; const contentToken = tokens[index + 2];
if (contentToken && contentToken.content.startsWith("⭐")) { if (
!excluded.includes(env.frontmatter.title) &&
contentToken &&
contentToken.content.startsWith("⭐")
) {
return `<li class="starred">`; return `<li class="starred">`;
} }
return self.renderToken(tokens, index, options); return self.renderToken(tokens, index, options);