title: Post a bookdown folder to microsoft teams
body: <h1>Create a Teams tab whose <em>web content</em> is a folder of linked html/aspx documents, where the &quot;landing page&quot; is index.html/aspx.</h1>
  <p>I want the <strong>web content</strong>(referenced below) to be a folder of linked <code>html/aspx</code> documents I upload to teams.  (Not an externally hosted web page.)</p>
  <pre><code>Tabs are Teams-aware webpages embedded in Microsoft Teams. They are simple
   HTML &lt;iframe&gt; tags that point to domains declared in the app manifest and 
  can be added as part of a channel inside a team, group chat, or personal 
  app for an individual user. You can include custom tabs with your app to 
  embed your own web content in Teams or add Teams-specific functionality to 
  your web content.
  </code></pre>
  <p>Here I document what I have tried to solve this problem, pointers, even if to a tutorial, would be welcome.</p>
  <p>I would like to include a &quot;book&quot; created by RStudio Bookdown <a href="https://bookdown.org/" rel="nofollow noreferrer">https://bookdown.org/</a> in a Teams tab.  <code>Bookdown</code> creates an <code>index.html</code> <code>HTML</code> document and other <code>HTML</code> documents connected with relative links. The r package is created by <strong>Yihui Xie</strong>.  Microsoft has advise about creating a content page:  <a href="https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/create-tab-pages/content-page" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/create-tab-pages/content-page</a>  This page states that</p>
  <pre><code>A content page is a webpage that is rendered within the Teams client
  </code></pre>
  <p>That seems to hint that this can be done.</p>
  <pre><code>For your page to display in Teams, you must include the Microsoft Teams 
  JavaScript client SDK and include a call to microsoftTeams.initialize() 
  after your page loads. That is how your page and the Teams client 
  communicate:
  </code></pre>
  <p>The MS document indicates that the ending should be <code>aspx</code> not <code>html</code>.  There should be the line <code>&lt;script src= 'https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js'&gt;&lt;/script&gt;</code> in the <code>&lt;head&gt;</code> section.  This is for the &quot; Teams client JavaScript SDK&quot;  Also the line <code>microsoftTeams.initialize();</code> needs to be in the <code>script</code> section.</p>
  <p>I created a <em>Hello World</em> document with the content listed in the example:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  
      &lt;script src= 'https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js'&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;script&gt;
      microsoftTeams.initialize();
      &lt;/script&gt;
  
  &lt;/body&gt;
  
  </code></pre>
  <p>If you can load that page to a tab in <em>Teams</em> and have it active without the user having to &quot;download,&quot;  please tell me how you did it.</p>
  <p>There is one other piece that is beyond my ability:</p>
  <pre><code>Ensure that the all URL domains used in your tabs are included in the validDomains array in your manifest. For more information, see validDomains in the manifest schema reference. However, be mindful that the core functionality of your tab exists within Teams and not outside of Teams.
  </code></pre>
  <p>Has anyone done this? and can you tell me how to do it?</p>
  <p>Of course if the idea is going in the wrong direction and there is a better way, please let me know that as well.</p>
  <p>Thanks.</p>