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

feat: use HonoX #262

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

goisaki
Copy link
Contributor

@goisaki goisaki commented Mar 6, 2024

Everyone wants Hono documents to be by Hono.
According to file-based routing by HonoX, it is possible.
It will be interesting to see if this can be an example of a project by HonoX & Hono.
(It should be noted that HonoX is not yet stable.)

I am ready to accept your PR, so please help me.

@goisaki
Copy link
Contributor Author

goisaki commented Mar 6, 2024

@yusukebe, what do you think about this idea?

@goisaki goisaki force-pushed the goisaki/feat/use-honox branch 2 times, most recently from 1a9efd0 to 763473f Compare March 6, 2024 09:37
feat: add configuration file

feat: add mock markdown

chore: add command

feat: add renderer & support mdx's title

fix: add forgotten commands
@yusukebe
Copy link
Member

yusukebe commented Mar 6, 2024

Related to honojs/honox#86

@yusukebe
Copy link
Member

yusukebe commented Mar 6, 2024

Hi @goisaki

This is an awesome challenge! I respect you for trying to do this!

Personally, I would prefer to continue using VitePress to lower maintenance costs, but I am eager to support this challenge.

Actually, VitePress very well and quickly transitions pages using the SPA approach. However, even serving HTML is fast enough if distributed from the edge, so this should not be a problem.

We want others' opinions, ideas, and help!

@goisaki
Copy link
Contributor Author

goisaki commented Mar 6, 2024

@yusukebe
I understand. Certainly vitepress would be best for maintenance costs. I will include SPA implementation in my roadmap and try to make it better than vitepress. If you are not negative about this PR I will continue to develop it. Thanks!

fix: add missed imports

fix: fix broken syntax highlighting in vscode

feat: add auto-generated title to front matter

feat: rename `.md` to `.mdx`

fix: fix routes
@goisaki
Copy link
Contributor Author

goisaki commented Mar 8, 2024

@yusukebe
I would like to reduce the number of filename and content changes in the current document.
(for other PR's that are going on right now).
I also want to avoid changing .md to .mdx for this reason.
However, HonoX has hard-coded extensions that are omitted in the path, and I don't know of any way to add new extensions here.
https://github.com/honojs/honox/blob/d200fdeddb8bad998c4440dc3975cc1d3f60cb96/src/utils/file.ts#L1-L10
I am considering creating a PR to add this functionality to HonoX, what do you think about this issue?
If this concern is unnecessary please let me know so.

@yusukebe
Copy link
Member

yusukebe commented Mar 9, 2024

I am considering creating a PR to add this functionality to HonoX, what do you think about this issue?

The reason why it is hard-coded is to prevent extensions other than the expected ones. But, allowing .md not only .mdx makes sense. If you can confirm that the *.md works well, you can create the PR to support .md!

@goisaki
Copy link
Contributor Author

goisaki commented Apr 8, 2024

Hmmm, I've tried locally, but I can't seem to find a simple, minimalist way to do it.
It is not impossible to do that, but it would add a lot of code that is far from the interest of this repository.
For example:

  • Syntax highlighting with {language name / copy button}
  • Dark mode support
  • (SPA)

Also, the addition of the sample project, which is the original purpose, has fortunately already been done in yusukebe/honox-examples (https://github.com/yusukebe/honox-examples/tree/main/projects/blog)

So I am beginning to think this PR is unnecessary.
Sorry for the disappointment.
(If there is one other brave challenger who is interested, I will do my best to support them.)
@yusukebe , can you forgive me?

@yusukebe
Copy link
Member

yusukebe commented Apr 9, 2024

@goisaki

No problem!! You are challenge is awesome.

  • Syntax highlighting with {language name / copy button}
  • Dark mode support
  • (SPA)

SPA may be difficult, but I feel it can be done for other things. Also, we can improve HonoX to do that. You may leave this PR if you like. Anyway, what you have done is not a waste. Thank you so much!

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.

None yet

2 participants