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

Various changes #601

Closed
wants to merge 3 commits into from
Closed

Various changes #601

wants to merge 3 commits into from

Conversation

Keats
Copy link
Contributor

@Keats Keats commented Mar 9, 2023

Some changes while looking at the repo after getzola/zola@cd90fd0

The biggest one is the change in the community building where it was using page for members for no discernable reasons. load_data is made for exactly that kind of use case. By creating pages, you end up with stuff like that https://bevyengine.org/community/donate/cart/ but Zola should warn on that.

You could skip 90% of the code by just storing the members in a single TOML file for each category as an array of tables though.

Note: some of my changes might need me to release Zola 0.17.2 before it works.


{{ members_macro::members_grid(members=members) }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ members_macro::members_grid(members=members) }}
{{ members_macro::members_grid(members=members | filter(attribute="sponsor")) }}

Only members with a sponsor link should be displayed here

Comment on lines +66 to +68
buckets[2].push(org_member);
} else {
buckets[3].push(org_member);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
buckets[2].push(org_member);
} else {
buckets[3].push(org_member);
buckets[3].push(org_member);
} else {
buckets[2].push(org_member);

Comment on lines +70 to +72
{% set members = load_data(path="org_members.json") %}

{{ members_macro::members_grid(members=members) }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% set members = load_data(path="org_members.json") %}
{{ members_macro::members_grid(members=members) }}
{% set members = load_data(path="org_members.json", required=false) %}
{% if members %}{{ members_macro::members_grid(members=members) }}{% endif %}

{% endif %}
</div>
{% endif %}
{% set members = load_data(path="org_members.json") %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% set members = load_data(path="org_members.json") %}
{% set members = load_data(path="org_members.json", required=false) %}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is required in practice though? This page will be empty if we don't generate the JSON files

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to build the full website yup, but for people who only want to work on part of it, like the book, they don't need it and we want to avoid the need for them to run the script

Members<a class="anchor-link" href="#org-members">#</a>
</h2>
{% else %}
{% set members = load_data(path="community_members.json") %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% set members = load_data(path="community_members.json") %}
{% set members = load_data(path="community_members.json", required=false) %}

{% endif %}

{{ members_macro::members_grid(members=members) }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ members_macro::members_grid(members=members) }}
{% if members %}{{ members_macro::members_grid(members=members) }}{% endif %}

Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very on board for this general direction. Thanks for putting this together!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This existed as an "actual page" because we want to be able to link to bevyengine.org/faq as a nice sharable / short link to the github discussions query

{% for subsection in section.subsections %}
{% set section = get_section(path=subsection) %}

<a class="anchor-target" id="{{ section.title | slugify }}"></a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sidebar links stop working with this change

@Keats
Copy link
Contributor Author

Keats commented Mar 16, 2023

I'll address all the comments next week, thanks for the comments!

@alice-i-cecile
Copy link
Member

Many of these changes have been incorporated elsewhere. Thanks!

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

Successfully merging this pull request may close these issues.

4 participants