- Lists
/api/lists/* Purpose: Bookmarks, collections Hosts: docs.microsoft.com, ppe.docs.microsoft.com
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Standard page title</title> | |
<style> | |
@media print { | |
.hidden-print { | |
display: none; | |
} |
Writing down some thoughts about server-side templating solutions for Docs.
Today Docs.Rendering & docs-render follow roughly the same process. This is by design, for the initial release of docs-render we're prioritizing backwards compatibility, template reuse, time to market.
The heavy parts of handling a request look roughly like this:
{ | |
"docs.microsoft.com": { | |
"apiBrowser": "https://docs.microsoft.com/api/apibrowser", | |
"assessments": "https://docs.microsoft.com/api/assessments", | |
"assessmentsBranch": "https://review.docs.microsoft.com/api/assessments/branches", | |
"auth": { | |
"docs": "https://docs.microsoft.com/api/profiles/auth", | |
"github": "https://docs.microsoft.com/api/githubauth", | |
"identityPlatform": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", | |
"signOut": "https://docs.microsoft.com/api/profiles/signout", |
<template> | |
<label repeat.for="option of options"> | |
<input type="radio" name="periodOptions" model.bind="option" checked.bind="$parent.selectedOption" click.delegate="clicked()"/> | |
${option.text} | |
</label> | |
<p><pre><code>${selectedOption | stringify}</code></pre></p> | |
</template> |
<template> | |
<form submit.delegate="submit()"> | |
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>--> | |
<div class="form-group"> | |
<label class="control-label" for="first">First Name</label> | |
<input type="text" class="form-control" id="first" placeholder="First Name" | |
value.bind="firstName & validate"> | |
</div> |
left | center | right | none |
---|---|---|---|
😊 | 😊 | 😊 | 😊 |
aaaaaaaaaaaaaaaaaaaaa | aaaaaaaaaaaaaaaaaaa | aaaaaaaaaaaaaaaaa | aaaaaaaaaaaaaaaaa |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>GistRun</title> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@primer/css@17.2.1/dist/primer.css" integrity="sha256-0PtaET8NN28OuNfpLRetkG6xdDLuTDYdIb8nZzpPLlQ=" crossorigin="anonymous"> | |
<!-- UNCOMMENT FIX: --> | |
<!-- | |
<style> |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>GistRun</title> | |
<style> | |
:root { | |
--duration: 1500ms; | |
--timing: cubic-bezier(.5,0,0,1) | |
} |
import escape_html from "escape-html"; | |
import { Readable } from "stream"; | |
// following imports are for testing | |
import { createReadStream } from "fs"; | |
import * as assert from "assert"; | |
export class TemplateResult { | |
constructor( | |
public readonly strings: TemplateStringsArray, | |
public readonly values: unknown[] |