Reputation: 183
I'm new to Visual Studio Code. On my projects, I use GitLab project pages to document project process and code.
What is the best way to publish on GitLab pages from the same workspace?
Upvotes: 0
Views: 2791
Reputation: 6732
Since I guess we're talking about the Wiki section in GitLab, each Wiki has its own Git repository and therefore should be treated as an individual project, which is, at least regarding the version control, detached from your main project.
This is actually stated in the documentation:
Wikis are based on Git repositories, so you can clone them locally and edit them like you would do with every other Git repository. To clone a wiki repository locally, select Clone repository from the right-hand sidebar of any wiki page, and follow the on-screen instructions.
Files you add to your wiki locally must use one of the following supported extensions, depending on the markup language you wish to use. Files with unsupported extensions don’t display when pushed to GitLab:
Markdown extensions: .mdown, .mkd, .mkdn, .md, .markdown. AsciiDoc extensions: .adoc, .ad, .asciidoc. Other markup extensions: .textile, .rdoc, .org, .creole, .wiki, .mediawiki, .rst.
About editing in Visual Studio Code, take a look at the documentation of the Markdown language.
When you've edited your page, simply commit
and push
your change.
For documentation within your main project (e.g., the readme.md
file) simply modify them and also commit
and push
them. By the way: explanations of source code usually don't belong in the Wiki, but rather in the source code directly in the language's appropriate form (e.g., Javadoc-style comments in Java).
Upvotes: 3