Closed rocco8773 closed 3 years ago
Built version shows up at https://179-105815475-gh.circle-artifacts.com/0/web/output/affiliates/index.html
That shortcode stuff looks really cool! What resources did you use to figure it out?
I discovered shortcodes in the Nikola documentation when @namurphy mentioned automating the meeting times in PR #79. I have to say though, THE DOCUMENTATION ON THIS IS ATROCIOUS!!!! The format used for shortcodes is either mako
or jinja2
, depending on the theme your using. bootstrap4
(our theme) is mako
. Additionally, if you want to make shortcodes that are importable by other shortecodes, then that file must be placed in the /web/templates/
folder. This took me hours to figure out from this terribly written sentence in the Nikola documentation...
For example, if you define a macro foo(x, y) in templates/shared_sc.tmpl, you can include shared_foo.tmpl in templates/special_post.tmpl and shortcodes/foo.tmpl and then call the ${shared_foo.foo(x, y)} macro.
All grumbling aside, this is a very nifty tool to have once you understand how it works.
Thought...we should make "Affiliated" and "Community" shields that could be copied from the website and added to other project's websites and/or package's README's.
Affiliated Shield: Community Shield:
Ok, I've added several styling changes to the the display...
The current build (at the time of this comment) can be found here.
@namurphy Can you please look over the PlasmaPy entry and give any comments on the text?
@Didou09 Can you look over the tofu
section and give any comments or approval?
Good for me @rocco8773 , nice page :+1: Question: how do I get the nice badge to put it on tofu's page too ? (same question for the community badge, which url do you recommend using ?)
@Didou09 Thank you!
Good question! I plan to put instructions on how to add a shield to your repo in a follow up PR, but for now you can add the the shield by doing the following...
README.md
[![PlamsaPy](paste link address)](https://www.plasmapy.org/affiliates/)
Note: The shield link will return a "page not found" until this PR is merged.
For the Community Shield, you'd copy this link address. Then you'd same markdown snippet as above to get .
I hope to make this process more efficient once I add the instruction to the website. I'll ping you when this happens.
This PR creates the "Affiliated Packages" page and defines the framework for adding community/affiliated packages in the future.
What it does?
/web/data/affiliated_pkgs.json
.Mako
style shortcodes (/web/shortcodes/
) and template (/web/templates/
) templates were created to automate the html generation of the list.Note: This PR should not be merged before we gather a few community packages. I'm assuming we'll have community packages after the APS followup meetings next week. I just wanted this ready for merge so we can advertise it at the followup meetings.
NEW
OLD