twig.js
twig.js copied to clipboard
Write docs using vitepress
See#730
Because my native language is not English, I basically just copied the documents from the wiki, so Chinese translation is a pending task. If you feel that some adjustments need to be made, you can modify the content in the en folder,and then I will do Chinese translation based on the latest content
Reference to the content of file deploy.yml:https://vitepress.dev/guide/deploy#github-pages
So, if you want to continue using GitHub pages for deployment, you just need to change branches: [write-docs-using-vitepress] to branches: [master]
Don't forget
If you have any questions, feel free to continue asking me
Can you take some time to review it? Can't wait to show people new beautiful documents Here are some guidelines:
Three script commands have been added to the packagis.json file
# It will start a service, just update the md file in the docs directory to see the effect
npm run docs:dev
npm run docs:preview
# This command can package documents into browser executable HTML static files
npm run docs:build
Therefore, I need you to take some time to make some modifications to the wording of the sentence, so that I can contribute a Chinese document based on the latest document content
Thanks for pushing this forwards. Will make maintianing the docs easier. Looks like we may need to update the GitHub Actions to run on a later version of Node?
There is another way, we can directly create a package.json file in the docs directory to manage document related dependencies separately This way, it won't damage any of the original code and testing related things
Since we primarily present information about Twig through documentation, I believe it is necessary to simplify the description section of the README.md file as they are redundant. A clean README.md can also look more comfortable
I think I will handle this part in the next few days
@ajiho hello! i just pushed some fixes to your fork. Please review https://github.com/ajiho/twig.js/pull/1
@RobLoach We can merge now
@ajiho can you include some screenshots of what it will look like when built?
@willrowe
You can also directly access this page
If you need to adjust the sidebar and top navigation, just modify the content of the en.mjs#L10 section, which corresponds to the directory structure of/docs/en/. Vitepress is very simple, you can check vitepress.dev or contact me directly
@RobLoach if this looks good to you, then I think it should be fine to merge.