templ icon indicating copy to clipboard operation
templ copied to clipboard

docs: Rebuilding the Docs

Open livghit opened this issue 1 year ago • 14 comments

Hi 🌊 🐙 ! Hope you are doing well ! First I wanted to thank you for this cool powerful Templating language !!

I think it would be very cool if we would be transferring the docs to use Templ itself to show the power of it :) ! I would be ready to help with that !

Have a nice weekend !

livghit avatar Sep 15 '23 17:09 livghit

With this , I would also try and create an easy to implement Components library where people could plug into the project and use it .

livghit avatar Sep 16 '23 08:09 livghit

This is actually something we've thought about. A documentation engine powered by templ would be a great way to dog-food our own project!

It was on the roadmap once a few bigger issues are ironed out, but don't let that stop you! Happy to support any code being put towards the templ docs.

I think templ is a gread tool to support a component library, you can distribute it as a go mod, and import it as you would any other go dependency.

joerdav avatar Sep 18 '23 08:09 joerdav

can anyone still working on it

PentesterPriyanshu avatar Oct 23 '23 15:10 PentesterPriyanshu

At the moment I do not really have the resources for this . Altho I do not want to give it up because I really enjoy the project. I will try to make me some more time and start to work more intensively towards it 🐙

livghit avatar Oct 23 '23 19:10 livghit

I played with templ a bit today and built a simple static site generator and rendered the templ docs.

Happy to fix the remaining bugs and integrate it if you are interested.

Anyway templ is a great tool, thanks for building it!

cugu avatar Oct 29 '23 00:10 cugu

Is this completed? Doesn't feel like it, since templ still uses Docusaurus. :)

a-h avatar Dec 20 '23 23:12 a-h

Sorry ... I did not close this issue on purpose ....

livghit avatar Dec 23 '23 01:12 livghit

@a-h how about @cugu implementation it looks great to me ?

livghit avatar Dec 26 '23 10:12 livghit

It does look very good, however I think at the moment there may be some rough edges still that @cugu is ironing out. There is a build for the templ docs using templum that shows a couple of them:

https://cugu.github.io/templum-example/

joerdav avatar Jan 03 '24 14:01 joerdav

I moved to another syntax highlighter as there was not much drive for adopting templum here recently. I changed that back, so that https://cugu.github.io/templum-example/index.html should now be correct (just outdated).

If there is further interest in using templum I am happy to iron out issues, but I don't plan include as many features as Docusaurus, hugo or similar. It should stay a rather simple templ project. We could also move it to https://github.com/templ-go, if you like.

cugu avatar Jan 05 '24 14:01 cugu

I think the only step left is to migrate now. The syntax highlighting was the only issue really that I saw

joerdav avatar Jan 05 '24 14:01 joerdav

Great, I'll create a PR.

Would you prefer to move it to https://github.com/templ-go, include the whole project here, or keep it where is?

cugu avatar Jan 05 '24 14:01 cugu

What's the plan? Create a general static documentation generation project that templ uses, or create the templ docs?

If it's the first, then I'd say make the docs generator on your own GitHub user name, because I think that templ's job is to be a good way to make HTML, and it's out of scope for templ to equal Hugo or Docusaurus.

Templ can promote it, and the docs site can link to it, but you'd have a maintenance job on your hands if it gets popular. 😀

If it's the 2nd, then docs live within the code, so the two are together. In which case a PR is great. Id like to run side by side for a while to reduce risk. For example, you see the new site, but there's a choice to use the old Docusaurus version so that issues with the new one don't stop anyone from finding the info they need.

I'm not sure how we'd do this at the moment. The docs are currently GitHub pages, but I can redirect the domain to a Fargate container or similar if we need to use CPU for that.

a-h avatar Jan 05 '24 16:01 a-h

I opted for plan 2 and started https://github.com/a-h/templ/pull/401.

You can see the generated docs at: https://cugu.github.io/templ/new/

The docusaurus docs can live in parallel on the same GitHub pages, as long as no directory or page is named new in the docs.

cugu avatar Jan 06 '24 23:01 cugu