Skip to content

[Docs] migrate sphinx theme to shibuya#27035

Open
hwhsu1231 wants to merge 1 commit into
emscripten-core:mainfrom
hwhsu1231-fork:shibuya-theme
Open

[Docs] migrate sphinx theme to shibuya#27035
hwhsu1231 wants to merge 1 commit into
emscripten-core:mainfrom
hwhsu1231-fork:shibuya-theme

Conversation

@hwhsu1231
Copy link
Copy Markdown
Contributor

@hwhsu1231 hwhsu1231 commented May 30, 2026

  • Remove emscripten_sphinx_rtd_theme
  • Pin sphinx-design==0.6.1, shibuya==2026.5.19
  • Refactor home page with sphinx-design
  • Internationalize strings in conf.py file
  • Add edit this page to sidebar
  • Use :layout: landing for front page

Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for working on this.

I wonder if we can get a preview of what this looks like so we can take a look before landing this.

Comment thread .gitignore Outdated
@hwhsu1231
Copy link
Copy Markdown
Contributor Author

I wonder if we can get a preview of what this looks like so we can take a look before landing this.

I believe this Pull request previews is what you're looking for.

@sbc100
Copy link
Copy Markdown
Collaborator

sbc100 commented May 31, 2026

I wonder if we can get a preview of what this looks like so we can take a look before landing this.

I believe this Pull request previews is what you're looking for.

Is that easy to setup? IIUC we don't currently use readthedocs.com at all today.

@hwhsu1231
Copy link
Copy Markdown
Contributor Author

Not sure because I haven't tried it yet.

@sbc100
Copy link
Copy Markdown
Collaborator

sbc100 commented May 31, 2026

I can try downloading this patch and take a look locally.

@hwhsu1231
Copy link
Copy Markdown
Contributor Author

I wonder why these two checks failed after I removed the changes on .gitignore:

Screenshot_20260531_114331

@sbc100
Copy link
Copy Markdown
Collaborator

sbc100 commented Jun 1, 2026

Just a flaky test sadly. Re-running.

@hwhsu1231
Copy link
Copy Markdown
Contributor Author

hwhsu1231 commented Jun 1, 2026

@sbc100

I just added the following new configuration for showing "Edit this page" on the sidebar:

html_context = {
    # Edit this page
    "source_type": "github",
    "source_user": "emscripten-core",
    "source_repo": "emscripten",
    "source_version": "main",
    "source_docs_path": "/site/source/",
}

Preview:

Screenshot_20260601_144335

@sbc100
Copy link
Copy Markdown
Collaborator

sbc100 commented Jun 1, 2026

Nice! Thanks again for working on this.

@sbc100
Copy link
Copy Markdown
Collaborator

sbc100 commented Jun 1, 2026

site.zip

Uploaded a copy of the pre-built site.

There are a few things I'm not sure about still:

  1. The "notes" seems to jump out way to much.
  2. I think I prefered by previous "Fork my on github" ribbon over the new widget which shows stars a forks (seems a little busy)
  3. The prominant Discussion link should probably no be linking to github disucssions (which I don't think we want to be using these days). Maybe it should link the mailing list or discord?
  4. The front page doesn't looks a clean and clear. The notes there previously had to big button styling.
  5. I'm not sure we want the "open in chatGPT" etc dropdown on each page.

@sbc100 sbc100 mentioned this pull request Jun 1, 2026
@hwhsu1231
Copy link
Copy Markdown
Contributor Author

I'm not sure we want the "open in chatGPT" etc dropdown on each page.

Sure. We can disable it by:

html_theme_options = {
  "show_ai_links": False,
}

@hwhsu1231
Copy link
Copy Markdown
Contributor Author

The front page doesn't looks a clean and clear. The notes there previously had to big button styling.

Maybe we can specifically add :layout: landing to the top of the front page (/index.rst). This way, the front page will look a bit cleaner compared to the other pages.

Front Page:

Screenshot_20260602_022012

Other Pages:

Screenshot_20260602_022047

sbc100 added a commit to sbc100/emscripten that referenced this pull request Jun 1, 2026
This is the latest v7 release.

Split out from emscripten-core#27035
sbc100 added a commit that referenced this pull request Jun 1, 2026
This is the latest v7 release.

Split out from #27035
@sbc100
Copy link
Copy Markdown
Collaborator

sbc100 commented Jun 1, 2026

I landed on the version bump separately BTW: #27042

@kripken
Copy link
Copy Markdown
Member

kripken commented Jun 1, 2026

Looks nice!

One note, maybe we can use the light theme by default? That would be less of a change compared to before, which makes it more familiar for users.

@hwhsu1231
Copy link
Copy Markdown
Contributor Author

hwhsu1231 commented Jun 2, 2026

@kripken

One note, maybe we can use the light theme by default? That would be less of a change compared to before, which makes it more familiar for users.

That shouldn't be a problem because the default theme is "auto". Therefore, it will display light/dark themes based on the theme users are using.

@hwhsu1231
Copy link
Copy Markdown
Contributor Author

@sbc100

The prominant Discussion link should probably no be linking to github disucssions (which I don't think we want to be using these days). Maybe it should link the mailing list or discord?

Just my personal opinion: I feel that keeping a forum-style discussion board that supports Markdown syntax is required.

As for the Discord link, I suggest we could use the discord_url theme option to display it:

html_theme_options = {
  "discord_url": "https://discord.gg/53u3EKq",
}

@hwhsu1231
Copy link
Copy Markdown
Contributor Author

@sbc100

The "notes" seems to jump out way to much.

If you're talking about the two "notes" in the front page, maybe we can refactor them with .. admonition::?

Code:

.. admonition:: Interested to learn more?

  Read our :doc:`About page <docs/introducing_emscripten/about_emscripten>`!

.. admonition:: Ready to get started?

  :doc:`Download and install the SDK <docs/getting_started/downloads>` and then proceed to the :doc:`Tutorial <docs/getting_started/Tutorial>`!

Preview:

圖片

- Remove `emscripten_sphinx_rtd_theme`
- Pin `sphinx-design==0.6.1`, `shibuya==2026.5.19`
- Refactor home page with `sphinx-design`
- Internationalize strings in `conf.py` file
- Add edit this page to sidebar
- Use `:layout: landing` for front page
@hwhsu1231
Copy link
Copy Markdown
Contributor Author

By the way, in my latest force-push (re-push), I also made this additional change to the front page:

.. rst-class:: lead

  Emscripten is a complete compiler toolchain to WebAssembly, using LLVM, with a special focus on speed, size, and the Web platform.

.. container:: buttons

  :doc:`Docs <docs/index>`
  `GitHub <https://github.com/emscripten-core/emscripten>`_

This was mainly inspired by the front page design of the Shibuya documentation:

Screenshot_20260602_151846

Copy link
Copy Markdown
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Looks great to me!

@sbc100 , any more thoughts?

@sbc100
Copy link
Copy Markdown
Collaborator

sbc100 commented Jun 2, 2026

I'd like to another interactive look first. I'll upload the zip file when I do.

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.

3 participants