I have set up a wiki in Azure DevOps and I want to set up a pipeline that takes the markdown files, transform them into HTML and publish them as a stand-alone static web site. When someone commits changes in the markdown files I want to build new static files to the site using a pipeline in Azure DevOps.
Gatsby is a platform that I'm somewhat familiar with, but the wiki consists of markdown files only + a file called "order" that determines the order of the documents in the wiki.
Does anyone have an idea as to how I should set this up?
You need this setup:
Expose your markdown files by an API. Azure should have some kind of serverless lambda function service. The query result should be an array or list of the files you need in the order you need them. It's best to let your Azure based API deal with the order file. Gatsby should only be concerned with building your site in the right order as supplied by your API.
Call your markdon API during the Gatsby build process. See the docs for how to fetch data at build time.
Create a template page for all your wiki pages. See the Gatsby tutorial part 7.
You need to create the wiki pages using the Gatsby node API. Use the createPages function.
PS: I'm interested in your decision what serverless lambda function service you would use because I am running into a similar use case. Feel free to comment how you solved the 1. of your setup.
Related
Working on a relatively new team in a much larger organization, and as a side project I am looking at our current documentation for opportunities to improve/standardize our best practices/standards. The ideal tool we would like to use, if up to the task, is Azure DevOps Wiki (this is AZDO Service, not Server) since it lines up with the rest of our PM functions. I was doing some digging, and I have not found much in the way of resources/templates/guides that can really get you going for Azure DevOps Wiki.
Beyond general documentation best practices, is there any helpful tricks/resources that we can use to make the most out of that particular tool? Or is there just a better tool we should consider? Looking for ideas! Any feedback is appreciated.
What I am looking for is a library of templates/resources that could
be used to help standardize documentation.
Official doesn't provided any template or resources for standard. There has been a feature request here:
Make it possible to create wiki page based on a template
You can upvote this feature request of Azure DevOps and share your ideas.
But since the DevOps wiki is designed based on Azure DevOps repository, you can clone the template you want to your wiki repository.
The repository url of your wiki should be:
https://dev.azure.com/<Organization Name>/<Project Name>/_git/<Project Name>.wiki
Use this command to clone the wiki repository:
git clone https://<Personal Access Token>#dev.azure.com/<Organization Name>/<Project Name>/_git/<Project Name>.wiki
PS:
Every DevOps project has a hidden repository, which named '<Project Name>.wiki', this repository can't be access via the repository UI list, also can't be listed via the List Repositories REST API. This repository also unable to be managed as other common repositories. Only 'Security for Wiki'. The repository will store all of the information in the pages of wiki permanently unless you delete the file in the repo.
And the comments section of the wiki is implemented quite differently, it is not based on a git repo and does not provide an explicit manage method. If you accidentally delete an image in a comment from the wiki, you won't have any way to get it back.
I built a website on github and would like to protect it from someone copying my repository and running the same website (either online or offline for themselves).
The website is fairly basic and builds on github action, which excute on schedule a Rmarkdown file that produces (updates) the index.html file. I want to avoid people being able to copy and freely execute that Rmarkdown file. I wonder if I could encrypt that specific file, and simply use a secret key with github actions to decrypt it when updating the website. Is this possible and would it be a good solution?
I also thought about having a private repository with my Rmarkdown file and simply push the html file to the public repository via github action, the problem is the github action takes a while to execute and I would quickly run out of the computation time (2000-3000 mins/month) offered by github.
I also thought about having a private repository with my Rmarkdown file and simply push the html file to the public repository via github action
That would have been the first approach, but since the RMarkdown process consumes to much tasks, it needs to be executed elsewhere.
Since other online free plans (like RStudio Cloud) are also limited in their project hours per month, another approach would be to call your own managed server (for instance, a Google Cloud compute engine, or Digital Ocean Droplet) where:
the RMarkdown file would reside (meaning, it would not be in the GitHub repository at all: no need to obfuscate/encrypt anything)
the process can take place
the generated index.html can uploaded back to your repository, and the rest of your GitHub action can publish the pages.
I was recently told by my IT department that I can't use Github as a code repository, so I'm using Azure Repos in Azure Devops.
I am primarily a designer, and my only usage for Github was to render HTML, CSS, and Javascript as a working prototype in Github Pages that can be shared to anyone with an internet connection.
I am not at all familiar with Azure DevOps or Azure Repos, is there any way to show my front end code as a generated page using Azure? Would I have to use something like Jekyll or Hugo?
Is there any way to show my front end code as a generated page using
Azure? Would I have to use something like Jekyll or Hugo?
Displaying the front-end UI directly in Azure Repos is still a not-supported scenario for now.
Azure Repos in Azure Devops Service supports Git and TFVC version control system to manage the code. But it doesn't mean it supports same functions like Github, at least Azure Repos itself doesn't have the feature to render HTML, CSS, and Javascript and display the front-end UI.
Also, I checked the Azure Devops extensions here and didn't find one extension that meet your needs. So I think what you want is now not supported for Azure Repos. You may use the Azure Repos to host the HTML, CSS, and Javascript files like what Github repos do, clone it locally and use third-party tool to display the UI when necessary.
Also, you may post a feature request with details about what you want with Azure Devops Repos here. If it gets enough votes, the team would consider it seriously! Hope all above helps :)
I need help to understand better how to create complete CI/CD with Azure Devops for APim. Ok I already has explored the tools and read docs:
https://github.com/Azure/azure-api-management-devops-resource-kit
But I still have questions, my scenario:
APim dev instance with APi and operations created and others settings, as well APim prod instance created but empty.
I ran the extract tool and got the templates (not all), still need the Master (linked templates), and on this point seat my doubt, I already have 2 repos too(dev and prod).
How can I create the Master template, and how my changes from dev environment will be automatically applied to prod?
I didn't used the policyXMLBaseUrl parameters not sure what Path insert there, although seems #miaojiang inserted a folder from azure storage.
After some search and tries I deployed API's and Operations from an environment to another, but we still don't have a full automated scenario, where I make a change in a instance and that is automatically available.Is necessary to edit policies and definitions directly on the repositories or run the extract tool again.
My company creates a lot of projects in Azure DevOps, and they all have the same structure -- same members, same permissions. Each project has different Git repositories within it, but that's the only thing (other than the name) that differs between them. It would be helpful to have a template so that everything is set up correctly each time we need a new one.
I don't see a way to do this through the web interface. I have the sense that I could probably do it with a script, but I don't know where to begin with that (including which tool to use). Where should I start?
It looks like there is now a way to do this without the Azure DevOps CLI (as long as your project that you want to template is one of the supported types (Agile, Scrum and Basic)). There is a tool available here that will step you through the process.
There is also an excellent blog post here that gives you an overview.
Yes, you can accomplish most of the configuration by script. For the beginning you might take a look at the Azure Devops CLI, which allows you to perform several actions on Azure Devops, like:
Create projects, Users and configure security
Create repositories, pipelines and set branch permissions
Create and manage work items
...