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

New highlight.js website! Help us test it 😄 #3611

Open
1 of 2 tasks
allejo opened this issue Sep 8, 2022 · 25 comments
Open
1 of 2 tasks

New highlight.js website! Help us test it 😄 #3611

allejo opened this issue Sep 8, 2022 · 25 comments
Labels
big picture Policy or high level discussion help welcome Could use help from community

Comments

@allejo
Copy link
Member

allejo commented Sep 8, 2022

Hello everyone! I'm by no means someone you see hanging out in this repo often; I stop by whenever code reviews are needed or a second opinion is wanted. Something I've been working on for months now (on and off) is a new website for our beloved syntax highlighting library 🥳

Our new website is powered by Next.js and is generously hosted by Heroku Netlify (for now). We need your help testing the new website, giving us feedback, reporting bugs, etc.

I've tried my best to meet feature parity with the current website, reorganizing some pages, and adding a much-requested demo page!

Website: https://highlightjs.org/ (aka, https://hljs.netlify.app)
GitHub repository: https://github.com/highlightjs/highlightjs.org
Report issues here: https://github.com/highlightjs/highlightjs.org/issues

Ideally, we'd like to go live with the new website towards the end of September, early October.

Administrative Tasklist

  • Switch DNS for https://highlightjs.org/ to point to Heroku
  • Build Github Workflows for new highlight.js releases to trigger a new website build

/cc @highlightjs/core

@allejo allejo added help welcome Could use help from community big picture Policy or high level discussion labels Sep 8, 2022
@allejo allejo pinned this issue Sep 8, 2022
@taufik-nurrohman
Copy link
Member

FYI, the language pack generator feature is very useful. Wish there will be a public API that I could use to generate my own language set through my application. An API URL that simply return a plain text response that I could save as highlight.js for example.

@allejo
Copy link
Member Author

allejo commented Sep 8, 2022

FYI, the language pack generator feature is very useful. Wish there will be a public API that I could use to generate my own language set through my application. An API URL that simply return a plain text response that I could save as highlight.js for example.

Underneath the new /download page lives an undocumented (as of this moment) /api/download endpoint that accepts POST requests (watch your browser's Network tab) with a JSON body in the structure of,

{
  "api": 2,
  "languages": []
}

This API endpoint returns an attachment response with the bundled zip file. I'm open to considering adding an endpoint that returns just the JS and not the entire zip.

@joshgoebel
Copy link
Member

I'd suggest perhaps a format: [zip,javascript] choice perhaps?

@joshgoebel
Copy link
Member

Some indication that "Docs" and "GitHub" were going to jump you to another site might be nice... I always frown when I see links in "sitewide navigation" that link to entirely different sites without any warning. Maybe move them to right with a | inbetween with a diff color/shade?

@joshgoebel
Copy link
Member

Does VS Code use us directly or just in plugins? If we're not in the default install I think that's a little deceptive and we should remove them from the list and find another big site.

@isagalaev
Copy link
Member

This looks really nice :-) Glad you kept the color scheme!

@joshgoebel
Copy link
Member

joshgoebel commented Sep 8, 2022

This looks really nice

Yes, it looks amazing.

I totally should have led with that before jumping into my [overall] minor nitpicks... I'd be fine launching it just as soon as we hook up the Github actions to deal with new releases... and of course we can continue to improve post-launch as well... or I'm also ok with the plan to test a bit longer (or wait for more feedback), then launch.

@allejo Were you planning to help setup the GH actions also? I think some of the work we've already done with auto-publishing the cdn-release gem might be relevant? I imagine we're talking two parts:

  • GH action here pushes to Heroku on now commits, etc
  • GH release on main repo updates this repo's "source" files? (or bumps a version or something)

I haven't looked too deeply into the programming here yet.

@allejo
Copy link
Member Author

allejo commented Sep 9, 2022

Does VS Code use us directly or just in plugins? If we're not in the default install I think that's a little deceptive and we should remove them from the list and find another big site.

That's true 🤔 As far as I know, VSC uses hljs for syntax highlighting of markdown code blocks in previews. I'd welcome any other websites/services that use us to replace VSC!

Were you planning to help setup the GH actions also? I think some of the work we've already done with auto-publishing the cdn-release gem might be relevant?

Yes! I'll be looking into the GitHub actions for syncing releases. I think there will definitely be shared logic between these actions

  • GH action here pushes to Heroku on now commits, etc

Heroku provides a GitHub app that syncs stuff for us, this is already taken care of 🥳

  • GH release on main repo updates this repo's "source" files? (or bumps a version or something)

Correct, it'd bump the package.json file in the website's repo to the latest release and rebuild everything from there.

@joshgoebel
Copy link
Member

https://github.com/highlightjs/highlight.js/blob/main/.github/workflows/release.yml#L82

This is where the relevant part starts...

@ghost
Copy link

ghost commented Sep 18, 2022

Hi all. great website :)

@Hirse
Copy link
Contributor

Hirse commented Oct 18, 2022

As someone who's in the past contributed to the (old? current?) website, the new one is looking nice!

A few things I noticed:

  • different favicon, is that intentionally?
  • Links to Docs and GitHub not opening in new tab
  • Add link to npm?
  • Update default theme (or add new default-dark) to use on the website?
  • "News" -> "Releases"?
  • I like the design of the news, but it doesn't really match the rest of the page
  • Why is "Code Samples" such a tiny link in the bottom?

Happy to contribute for the above. 😄

@ghost
Copy link

ghost commented Oct 18, 2022

Hi all.

Please update the repository readme link.

before

after

@adsingh14
Copy link

Good to see this! I've noticed one bug,

  1. Visit https://highlightjs-web.herokuapp.com/download

  2. Type 'test'

  • It'll show blank box
  1. Again type 'html'. That blank box will stay there (stick with the header)

@AdamRaichu
Copy link
Contributor

As of right now, https://highlightjs-web.herokuapp.com is not working.

@allejo
Copy link
Member Author

allejo commented Jul 21, 2023

As of right now, https://highlightjs-web.herokuapp.com is not working.

Life really got in the way with my commitments, especially to this project... I will be working on the logistics of migrating the site over the next week or so 🤞

The website demo can now be found at: https://hljs.netlify.app

I would really appreciate any help testing and finding bugs!

@jf990
Copy link
Contributor

jf990 commented Jul 22, 2023

@allejo I did some ad-hoc testing and everything looks great to me, really nice work. The only issue I ran into was the download, even though I selected a small subset of languages, my download contained what looked like all languages.

@allejo
Copy link
Member Author

allejo commented Aug 2, 2023

Some indication that "Docs" and "GitHub" were going to jump you to another site might be nice... I always frown when I see links in "sitewide navigation" that link to entirely different sites without any warning. Maybe move them to right with a | inbetween with a diff color/shade?

Fixed in highlightjs/highlightjs.org@6e088db

The only issue I ran into was the download, even though I selected a small subset of languages, my download contained what looked like all languages.

Fixed in highlightjs/highlightjs.org@ebf0ac5

@allejo
Copy link
Member Author

allejo commented Aug 2, 2023

  • different favicon, is that intentionally?

not intentional! I always forget about favicons 🤦‍♂️ fixed in highlightjs/highlightjs.org@9e225ea

  • Links to Docs and GitHub not opening in new tab

fixed in highlightjs/highlightjs.org@93e1acb

  • Add link to npm?

Ahh good call! I'll update the Usage section with a bit more information from our README in a bit.

  • Update default theme (or add new default-dark) to use on the website?

Lemme loop @joshgoebel into this question. I think we have enough themes already so I don't think we want to add more. Are you talking about using another theme instead of the one I'm using right now?

  • "News" -> "Releases"?

I'm going to leave this as news, so that we can use that area of the site to post announcements (e.g. the news article about a new website)

  • I like the design of the news, but it doesn't really match the rest of the page

Now the Downloads page and the News page share the same blurred dark background! I hope this makes it have a more consistent feel

  • Why is "Code Samples" such a tiny link in the bottom?

Because I couldn't figure out a way to stuff it in the top nav bar without cluttering it... 😓 I'm open to design ideas!

@allejo
Copy link
Member Author

allejo commented Aug 2, 2023

After some quick DNS struggles, our new website is live! 🥳 🎉

Moving forward, please report any new bugs at the highlightjs/highlightjs.org repo.

@isagalaev
Copy link
Member

Congrats, folks!

@mdr1384
Copy link

mdr1384 commented Aug 15, 2023

The download page gives you a ZIP file with absolute paths in it... rendering it unusable on FreeBSD (since they have a really old unzip)...

$ /usr/bin/unzip -l highlight.zip | head
Archive:  highlight.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
    38854  08-10-23 22:10   /DIGESTS.md
     1514  08-10-23 22:10   /LICENSE
     1717  08-10-23 22:10   /README.md
        0  08-10-23 22:10   /es/
    76121  08-10-23 22:10   /es/core.js
    20322  08-10-23 22:10   /es/core.min.js
    76121  08-10-23 22:10   /es/highlight.js

$ unzip highlight.zip
Archive:  highlight.zip
unzip: skipping insecure entry '/DIGESTS.md'
unzip: skipping insecure entry '/LICENSE'
unzip: skipping insecure entry '/README.md'
unzip: skipping insecure entry '/es'
...

@allejo
Copy link
Member Author

allejo commented Aug 25, 2023

The download page gives you a ZIP file with absolute paths in it... rendering it unusable on FreeBSD (since they have a really old unzip)...

@mdr1384 thanks for your report! This was reported in #3835 and has been fixed in production 😄

@wil93
Copy link

wil93 commented Sep 12, 2023

FYI the demo page is currently detecting everything as Delphi

@allejo
Copy link
Member Author

allejo commented Sep 19, 2023

FYI the demo page is currently detecting everything as Delphi

Thank you for the report, this is being tracked over at highlightjs/highlightjs.org#7. It's a weird quirk with the way the final website is bundled for production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big picture Policy or high level discussion help welcome Could use help from community
Projects
None yet
Development

No branches or pull requests

11 participants