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

docs(shortcodes): Add demo repository badge #7915

Merged
merged 17 commits into from
Feb 2, 2025

Conversation

niclasheinz
Copy link
Collaborator

Hi @squidfunk

There are some example repositories at https://github.com/mkdocs-material, but these are not listed in the documents. With the new badge, the example repositories can be linked in the documentation.

@squidfunk
Copy link
Owner

Thanks for the PR. Just to knit pick, I'm not really happy with "examplerepo". Also, where would we use it? Could you add suggestions in this PR, so we can learn whether we really want/need this?

@niclasheinz
Copy link
Collaborator Author

niclasheinz commented Jan 18, 2025

I've updated the PR. I thought it would be useful if the existing template repositories from github.com/mkdocs-material were linked in the documentation.

image

@kamilkrzyskow
Copy link
Collaborator

I think it's a good addition to the example, which links to downloadable zip archives.

Likewise to squidfunk I think that the name examplerepo together with Example repository could be improved 🤔.
How about demo and Demonstration, as the repositories could have their own rendered pages?

@niclasheinz
Copy link
Collaborator Author

How about demo and Demonstration, as the repositories could have their own rendered pages?

Good point. That's definitely a better formulation than the one I made.

@squidfunk
Copy link
Owner

+1 for Kamil's proposal!

@squidfunk
Copy link
Owner

@niclasheinz are you still wanting to progress on this PR? If so, it would be great if you could find the time to include the proposed changes by Kamil ☺️ Specifically:

Likewise to squidfunk I think that the name examplerepo together with Example repository could be improved 🤔.
How about demo and Demonstration, as the repositories could have their own rendered pages?

Thanks in advance!

@niclasheinz
Copy link
Collaborator Author

Hi @squidfunk

Thanks for reminding me, I forgot about it because I'm busy at the moment. I'll catch up in a few days.

@squidfunk
Copy link
Owner

No hurry! Just wanted to know whether there are any impediments. Take your time ☺️

@niclasheinz
Copy link
Collaborator Author

@squidfunk It's ready for review 😄

@kamilkrzyskow
Copy link
Collaborator

kamilkrzyskow commented Feb 1, 2025

I feel like the idea branched off into another direction.

The example code could've stayed and keep the Example naming as it refers to the https://github.com/mkdocs-material/examples repository, which hosts many different sub-example projects, and their .zip archive.

The demo would refer to standalone Demonstration repositories like the mike versioning repository, as it changes the "logic" of the repository, so it can't really be packaged into one the /examples repository sub-projects.

Either I'm making sense, or the separate demonstration and demo short codes bother me and I'm just blabbering 😅

@niclasheinz
Copy link
Collaborator Author

Thanks for your feedback!

I thought demonstration is better for a ‘live-demonstration’ where I can see what the result might look like. And the associated repository is the ‘demo’. That's why I originally chose ‘examplerepo’ as the name.

But yes, your view also makes sense.

What do you think @squidfunk?

@squidfunk
Copy link
Owner

Thanks for making the changes. However, I'm with Kamil here, so please keep the example as-is. An example is a show case of a specific feature. We can add the demo code for the blog, social card and versioning demo, which is more involved, as it includes several features, but we should really keep it simple. Just follow the style of the example code in the hook.

@niclasheinz
Copy link
Collaborator Author

Okay, I have adjusted it

@squidfunk
Copy link
Owner

Thanks again! We're almost there.

I just realized that you made all your changes in the material directory. This directory is actually generated and gets overwritten on each build, so you changes will be gone when you type npm run build:all. Please make the changes in the src folder and build the theme. For this, you need to go through the theme development process. If you're having trouble with the latter, you can just leave it as such and I will complete it for you in this case, no worries ☺️

@squidfunk
Copy link
Owner

Also please see Alex' excellent guide on how to create a PR on this repository.

@niclasheinz niclasheinz force-pushed the add-example-repo-badge branch from cc08cd7 to 647babb Compare February 2, 2025 07:24
@niclasheinz
Copy link
Collaborator Author

Thanks for the tip - reading will get me much further in life 😅

I'll keep my fingers crossed that it's right now.

@niclasheinz niclasheinz changed the title docs(shortcodes): Add example repository badge docs(shortcodes): Add demo repository badge Feb 2, 2025
@squidfunk
Copy link
Owner

No worries! I know it can be challenging at first. As you know from our last call, we're also working on making things much simpler in the near future ☺️ One last thing is missing: the search icon index is deleted, which is because pymdownx is not installed when you built it. Either remove the delete, or install pymdownx and do another rebuild.

@niclasheinz
Copy link
Collaborator Author

I have solved the problem

@squidfunk
Copy link
Owner

Perfect, LGTM! Merging through.

@squidfunk squidfunk merged commit 66f1fc6 into squidfunk:master Feb 2, 2025
4 checks passed
@niclasheinz niclasheinz deleted the add-example-repo-badge branch February 2, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants