如何在Azure Devops Wiki 的表中创建彩色行?我想创建如下所示的东西
.table-striped th {
height: 45px;
background-color: #bfff00 !important;
color: #191919;
}
.table-striped tr:nth-child(even) td {
background-color: #4287f5;
}
Run Code Online (Sandbox Code Playgroud)
<div>
<table class="table-striped">
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
</table>
</div>
Run Code Online (Sandbox Code Playgroud)
Azure Wiki 中创建表格的主要方式是 Markdown 表,据我发现 Markdown不支持 color。也许有什么窍门?
从Azure Wiki 语法帮助中我发现 HTML 标签和 YAML 表也受支持,但我能够实现的一切都是通过span
markdown 内的标签着色:
<span style="background-color: red">57065</span>|<span style="background-color: red">4560</span>|<span style="background-color: …
Run Code Online (Sandbox Code Playgroud) 如何在 Azure Devops wiki 上创建与 Microsoft 的外观相同的表?
现在我正在使用这种模式,但想使用与微软用于其文档的相同风格。
|H1|H2|
|-|-|
|Content|
Run Code Online (Sandbox Code Playgroud)
结果==>
H1 | 氢2 |
---|---|
内容 |
现在用户可以按页面订阅维基。wiki 中有大约 100 个页面,并且新页面的创建也非常频繁。那么,如果 wiki 有任何更改,有什么方法可以收到通知吗?
我关注了这个bug,据说官方还没有支持。
因此,如果有人有这方面的最新更新,或者有任何解决方法可以订阅整个 wiki,请更新。
如果有API来获取所需的信息也能解决目的。
请告诉我如何使用 Rest API 和 powershell 更新(例如文本)Azure DevOps Wiki 页面。也许有人有一个更新 Wiki 页面的脚本。我可以使用此 powershell 脚本创建 Wiki 页面和内容。例如:
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user,$token)))
$uri = "https://dev.azure.com/fabrikam/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=SamplePage731&api-version=5.0"
$body = @"
{
"content": "test"
}
"@
$result = Invoke-RestMethod -Uri $uri -Method Put -ContentType "application/json" -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Body $body
Run Code Online (Sandbox Code Playgroud)
错误按摩:
Invoke-RestMethod : {"$id":"1","innerException":null,"message":"添加操作中指定的页面 '/SamplePage129' 已存在于 wiki 中。请指定新的页面路径。" ,"typeName":"Microsoft.TeamFoundation.Wiki.Server.WikiPageAlreadyExistsException, Microsoft.TeamFoundation.Wiki.Server","typeKey":"WikiPageAlreadyExistsException","errorCode":0,"eventId":3000} 位于第 22 行字符:11 + $结果 = Invoke-RestMethod -Uri $uri -Method Put -ContentType "appli ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke- …