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

Sugar Stories Page and Authors added #618

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

MostlyKIGuess
Copy link

Fixes #571. Continuation of #613. Special thanks to @saumyashahi for the initial work on this feature!

Improvements Implemented:

  1. Dynamic Author Display

    • To display authors on any page, simply add the author: "Author Name" field.
      Author
  2. Fallback for Missing Author Information

    • Since not all _posts include author information, an initial check has been added.
    • If the author field is present, the name will be displayed. Otherwise, the layout will remain unchanged.
      Example:
      With Author
      vs
      Without Author
  3. Bug Fixes from Issue:#571 Added author name to blogs #613

    • Resolved the issue where clicking on certain links redirected users back to the "Sugar Stories" page instead of /press.
      Sugar Stories
  4. Navigation Enhancement

    • Added a direct "Sugar Stories" link in the navbar for easier access.

Further Instructions:

  1. New Stories Addition:New stories can be added by creating .md files in _post with the layout: story.

@pikurasa
Copy link
Contributor

The default name, for when we do not know the name of the author, should be "Sugar Community Member".

I did not write /stories/2016/05/15/The-connection-between-Sugar-Students-Teachers/, so using my name as author for that article is misleading.

The next step would be to add:

@MostlyKIGuess
Copy link
Author

The default name, for when we do not know the name of the author, should be "Sugar Community Member".

I did not write /stories/2016/05/15/The-connection-between-Sugar-Students-Teachers/, so using my name as author for that article is misleading.

The next step would be to add:

Would you happen to know who wrote that article?
And yes I will change the default behaviour.

As well as add the 2 articles as sugar stories .

@pikurasa
Copy link
Contributor

Would you happen to know who wrote that article?

You can see the author for both articles in the articles -- myself for the parent one, and James Simmons for the Sugar Activity one.

@MostlyKIGuess
Copy link
Author

@pikurasa I have added those stories, and everywhere we have authors made it default to Sugar Community Member as you said.

Copy link
Contributor

@quozl quozl left a comment

Choose a reason for hiding this comment

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

Trivial changes suggested.

@@ -18,6 +18,7 @@
<li class="listFont">
<a href="{{ post.url }}">{{ post.title }}</a>
<i style="display: block;">{{ post.date | date: "%b %-d %Y" }}</i>
<i class="display:block;" >By {{ page.author | default: "Sugar Community Member" }}</i>
Copy link
Contributor

Choose a reason for hiding this comment

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

Blank before tag close.

Copy link
Author

Choose a reason for hiding this comment

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

I don't understand, what exactly do I change here?

Copy link
Author

Choose a reason for hiding this comment

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

Did you mean regarding the space ber" }} and the space after double quos?. It shouldn't be a problem because it only takes the String

Copy link
Contributor

Choose a reason for hiding this comment

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

You changed <i style="display: block;"> to <<i class="display:block;" >, but my preference is <i class="display:block;">, which is shorter and more expected. When you trip your reviewer with oddness, they slow down, and if they slow down enough they say something.

Copy link
Author

Choose a reason for hiding this comment

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

I am sorry I still don't understand, it's still <i for me.

Copy link
Author

Choose a reason for hiding this comment

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

Oh I understood now, I will fix it and rebase

Copy link
Contributor

Choose a reason for hiding this comment

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

One of our monospace font training methods 30 years ago was to play Rogue or Moria. It taught the eye and brain to detect miniscule changes in text. An essential skill for programming.

Copy link
Author

Choose a reason for hiding this comment

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

Indeed, 🙂 I think I am having a hard time writing and testing spice and verilog code. I should adapt to the code and learn to write it as it was maintained before me.

@@ -31,6 +31,7 @@ <h2 class="text-center">PRESS RELEASE</h2>
<li class="listFont">
<a href="{{ post.url }}">{{ post.title }}</a>
<i style="display: block;">{{ post.date | date: "%b %-d %Y" }}</i>
<i class="display:block;" >By {{ post.author | default: "Sugar Community Member" }}</i>
Copy link
Contributor

Choose a reason for hiding this comment

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

Blank before tag close.

_layouts/story.html Outdated Show resolved Hide resolved
Copy link
Contributor

@pikurasa pikurasa left a comment

Choose a reason for hiding this comment

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

I'm asking for a few more changes before merging, but otherwise good progress.

Thanks!

@MostlyKIGuess MostlyKIGuess requested a review from pikurasa January 5, 2025 12:26
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.

Add author name to blogs
4 participants