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

Foss home page #1058

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

Conversation

SouthKoreaLN
Copy link
Contributor

@SouthKoreaLN SouthKoreaLN commented Apr 12, 2024

Description

  • Navigation bar
  • Parse info from awards.csv for awards tab
  • Convert README.md to html
  • Populate docs tab
  • Make everything look nicer
  • Make sure I don't use any non-standard packages or break SN conventions

Screenshots

Screenshot 2024-04-12 at 11 23 37 PM Screenshot 2024-04-12 at 11 23 26 PM

Additional Context

Really just getting familiar with all of this.
This closes #1056

Checklist

  • Are your changes backwards compatible?
  • Did you QA this? Could we deploy this straight to production?
  • For frontend changes: Tested on mobile?

Summary by CodeRabbit

  • New Features
    • Introduced a new webpage for the FOSS project featuring sections for README, Docs, and Awards.
    • Added dynamic content loading for Markdown files and CSV data parsing for the Awards section.
    • Implemented section switching functionality on the webpage.

@SouthKoreaLN
Copy link
Contributor Author

SouthKoreaLN commented Apr 12, 2024

This relates to #1056 and is far from being finished.

@huumn
Copy link
Member

huumn commented Apr 12, 2024

Looking great so far!

@SouthKoreaLN
Copy link
Contributor Author

Screenshot 2024-04-13 at 8 56 54 PM

@SouthKoreaLN
Copy link
Contributor Author

Parsing logic should be pretty much ok now. I'll play around with CSS next time to make things look nice. Probably should try to make it look a bit like the header of stacker.news...

@SouthKoreaLN
Copy link
Contributor Author

Screenshot 2024-04-14 at 6 56 57 AM Screenshot 2024-04-14 at 6 57 18 AM Screenshot 2024-04-14 at 6 57 27 AM

@SouthKoreaLN SouthKoreaLN marked this pull request as ready for review April 14, 2024 13:09
Copy link
Contributor

coderabbitai bot commented Apr 14, 2024

Walkthrough

The update enhances the FOSS project with a revamped index.html webpage featuring sections for README, Docs, and Awards. This enriches user experience and transparency, allowing for dynamic section switching and efficient handling of various content types like Markdown and CSV data.

Changes

File Change Summary
index.html Updated webpage for the FOSS project with sections for README, Docs, and Awards. Implemented JavaScript for content management and dynamic section switching.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

index.html Outdated Show resolved Hide resolved
@SouthKoreaLN
Copy link
Contributor Author

I've put this as ready for review, as I am not fully sure if this is what you had in mind. Let me know if this is not the proper way to get feedback, for instance, if it is better to discuss this at the issue level rather than here with a PR for review.

I can make additional changes as required, just let me know :)
You can also say you don't like it and not use it at all, no worries.

Depending on your feedback, I can eventually also proceed with uploading it to github pages (I did create the project already for that, but have kept it empty for now).

SouthKoreaLN and others added 2 commits April 14, 2024 22:25
I tested, these coderabbit suggestions, don't break anything.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@SouthKoreaLN
Copy link
Contributor Author

SouthKoreaLN commented Apr 14, 2024

Last update properly takes care of code blocks when converting markdown to html.

Screenshot 2024-04-14 at 10 45 10 PM

@huumn
Copy link
Member

huumn commented Apr 14, 2024

How are you previewing this while developing it? It doesn't load the files for me when I open the file in the browser.

I think it might be worth fetching the files from github regardless, but I don't know.

@SouthKoreaLN
Copy link
Contributor Author

SouthKoreaLN commented Apr 14, 2024

How are you previewing this while developing it? It doesn't load the files for me when I open the file in the browser.

I think it might be worth fetching the files from github regardless, but I don't know.

python -m http.server and then I just visualize it with http://localhost:8000/index.html.
I did that as my browser seemed to be blocking the CVS file from being loaded and forgot about this as I didn't close the server since on my laptop.
Let me think how to resolve this in a more flexible way.

@huumn
Copy link
Member

huumn commented Apr 15, 2024

I've put this as ready for review, as I am not fully sure if this is what you had in mind. Let me know if this is not the proper way to get feedback, for instance, if it is better to discuss this at the issue level rather than here with a PR for review.

I'd say either in the issue or mentioning me with a question while this is in draft is probably the best "I'm not sure" move.

I'm going to pop this into draft and monitor it in case you have any questions.

@huumn huumn marked this pull request as draft April 15, 2024 19:53
@SouthKoreaLN
Copy link
Contributor Author

SouthKoreaLN commented Apr 18, 2024

@huumn

Caught up with my job until an hour ago.

I've replaced the FETCH calls with direct readings (using iframe) of the HTML files generated from the Markdown files. That way, you can open the index.html file in your browser and have a first look at it. I did NOT convert the awards.csv file to HTML though, as this requires more logic, and that is probably not worth it just for development purposes (also, see next reason).

Indeed, my suggestion, in case you're ok with what you see in this browser viewable HTML version, is that I create a new PR, but for the project associated with Github pages where I push the fetch-version of the file. As it will be hosted on Github, there won't be such "FETCH" restrictions, and we can include the README.md, docs/*md and awards.csv file there and fetch them on the fly. If it were only for the md files, it would probably make sense to make stand-alone HTML versions and use something like iframe to load them (like I did here). However, because of the awards.csv file that will be modified much more often, I presume, it'll be easier for you guys to just copy the csv file to that project and update it there.

What do you think?

Copy link

gitguardian bot commented Apr 18, 2024

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- Generic Private Key 31aad62 docker/cln/client-key.pem View secret
- Generic Private Key 31aad62 docker/cln/server-key.pem View secret
- Generic Private Key 31aad62 docker/cln/ca-key.pem View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@SouthKoreaLN
Copy link
Contributor Author

SouthKoreaLN commented Apr 18, 2024

Seems like the GitGuardian Security Checks warning got triggered when I asked here to update my branch with the most recent changes from master. Not sure what those specific secrets entail...

@huumn
Copy link
Member

huumn commented Apr 18, 2024

What do you think?

My only "concern" is that I might not want to host sndev.team on github. If we can't fetch them from github due to CORs, then it might be worth "building" them into a static page.

The simplest way to do this might be to create a script in scripts that when run, copies all the markdown file and the csv file into your index.html file.

If making the build script is too big of a lift, feel free to proceed with the github pages version, and I'll open up another issue for the "build" phase.

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.

make a homepage for the foss side of sn (sndev.team)
2 participants