How can I write documentation on GitLab pages from Visual Studio Code? - visual-studio-code

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?

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).

Related

Pushing Xamarin forms to Github

I'm trying to push my xamarin forms project to github .
I've tried the regular method following the github instruction & using command line but xamarin forms project usually are big in size so that it won't be pushed throw the CMD and it recommends the Git LFS instead.
however, I found that we can push the project to github
https://devlinduldulao.pro/how-to-use-git-and-github-in-xamarin-development/
using the GitHub Extension for Visual Studio and I have installed it but the second step is to add the solution to source control.
but I cannot find the latter option in my menu
so can anyone help me with this problem, all I need to do is to push my project to github if there any other option than the one I have provided in the article above please mention it.
thanks in advance.
If its trying to push a lot, then you are missing a .gitignore file. Put this in the root folder of your solution.
Here is a github list of useful gitignore files.
A good one to use for this purpose is VisualStudio.gitignore.
At minimum, have these lines in your .gitignore file:
[Bb]in/
[Oo]bj/
.vs/
bin and obj are the main folders containing results of building. These are re-creatable from source files, so should not be in repo.
.vs is where visual studio keeps all its user-specific files (such as .suo).
This question seems to be more a git problem than a Xamarin problem. Xamarin.Forms projects aren't bigger than other projects - but you have to ensure you excluded all the build output from the beginning (using a .gitignore-file for .NET projects) - otherwise you commit binaries and your nuget-feed.
Seeing this menu structure, it seems, you already are working with git (at least with a local repo without remote). So you should check your git repo settings and add github as remote: https://learn.microsoft.com/en-us/visualstudio/version-control/git-settings?view=vs-2022

Customize visual studio code landing page

When I open a project in visual studio code I get this screen:
I want to customize that screen on a per-project basis, so that I can do things like provide links to relevant documentation, describe the project architecture and otherwise communicate to anyone who is collaborating on the project - similar to a MOTD. I'm imagining a .md or .html file in the root directory of my project that is read by VSC as that would also allow my team to provide different landing screens per branch. Does such a thing exist?
I highly recommend using the Settings >> Workbench >> Startup Editor field and setting it to "readme". maintaining a README.md file in any project is a big advantage because most Source Control management sites such as github, gitlab, bitbucket, etc. present this same README on the project overview page.

Is there an overview of what can go into a .github "dot github" directory?

I keep finding piecemeal examples of things that can go into a .github directory on a GitHub repository.
I can see that it is used for GitHub actions and workflow and for Pull request and issue templates, but I can't see a page outlining what you can put in there with ideally some documentation. I also think I've seen a funding example too.
Basically every time I see something you can do there, I think "that's neat I should do that", but other than examples I can't see a way to discover new things other than by example.
Due to the fact that the directory is called .github it seems to defy Google and SO search as well.
On Github, folder .github is just a convention folder used to place Github related stuff inside it. Github handles some of these files even when you place it in root of your project (such as CONTRIBUTING.md, CODE_OF_CONDUCT.md etc). Because Github is constantly bringing in new features, these features are documented on their own, so there is no "all possible files in .github" page. Feel free to place anything that is related to Github specifically inside it.
Some of the most used files in .github folder:
CODE_OF_CONDUCT.md -> How to engage in community and how to behave yourself.
CONTRIBUTING.md -> How to contribute to repo (making pull request, setting development environment...)
LICENSE.md - A software license tells others what they can and can't do with your source code (You should place this at the root of your project since GitHub ignores it in .github folder. You can find this file while browsing other Git hosting services such as GitLab, Bitbucket etc.)
FUNDING.yml -> Supporting a project
ISSUE_TEMPLATE -> Folder that contains a templates of possible issues user can use to open issue (such as if issue is related to documentation, if it's a bug, if user wants new feature etc) P.S. Take a look at tensorflow ISSUE_TEMPLATE
PULL_REQUEST_TEMPLATE.md -> How to make a pull request to project
stale.yml -> Probot configuration to close stale issues. There are many other apps on Github Marketplace that place their configurations inside .github folder because they are related to GitHub specifically.
SECURITY.md -> How to responsibly report a security vulnerability in project
workflows -> Configuration folder containing yaml files for GitHub Actions
CODEOWNERS -> Pull request reviewer rules. More info here.
dependabot.yml -> Configuration options for dependency updates. More info here.
You don't have to create all these files immediately. If there are lot of bugs reported in your project, create ISSUE_TEMPLATE. If several people wants to support you, create FUNDING.yml . You will create more and more files when the need comes.
Github lists all of the files you can use in the documentation page titled Creating a default community health file and the workflows you can add to the .github directory are detailed in the Introduction to GitHub Actions documentation.

How to find releases on some project on Github

Following page page points to Github's page where pre-build binaries are contained. If I have not found first mentioned page first then I would have not an idea that such page (with pre-build binaries) exists on Github. Is it usual to put some pre-build binaries under releases on GitHub (I've seen it also other times e.g. with gns3)? Is there any link on project's Github page which will point me to releases (maybe I can add releases to corresponding URL but I guess there must be some link which points to it)
The "release" pages is available on any GitHub project. You can access it quickly using the link on top of project (between branches and contributors):
GitHub release page is computed from Git repository tags. The maintainer of the project is free to use it or not, but it's a common practice to transform a git tag into a release, attaching a description (changelog, release note, etc) and/or some files (pre-build packages, setups, DMGs, etc.)
GitHub team wrote a blog post a few years ago to explain this feature.

Source navigation is not showing when working with external/ remote git repository in visual studio online

Consider I have a git repository hosted in Bitbucket. I have added this reference using following way.
Serttings > Services > External Git
Now when I am going to create a build it is not showing source navigation. But when we use visual studio git it shows source navigation like following
But navigation is missing for external git
Is it known issue or I am missing any configuration that’s why it is not showing source navigation?
That is by design, you just can specify the file manually (relative path and Wildcards can be used, e.g. ConsoleApplication1/ConsoleApplication1.sln).
I submitted a user voice here that you could vote.