ebrowser v1.0.44
[uweb.git] / en / url2site / index.html
blob7a3f4d4ecf5bd571eb2a73c9407c85a160ea332b
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1" />
7 <link rel="stylesheet" href="../style.css#" type="text/css" />
8 <title>Any url as website</title>
9 <script type="text/javascript">
10 function findLang(){
11 let href = location.href;
12 for(let i=href.length-1;i>0;i--){
13 if('/'==href.charAt(i) && '/'==href.charAt(i-3))
14 return i;
16 return 0;
18 function nav2(page){
19 let i = findLang();
20 location.href = location.href.substring(0,i+1)+page;
22 function nav2Lang(lang){
23 let i = findLang();
24 let href = location.href;
25 location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
27 </script>
28 </head>
29 <body>
30 <header class='header'>
31 <a class="logo" href="javascript:void(0)" onclick="return nav2('index.html#')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html#')">Tags</a>
33 <nav>
34 </nav>
35 </header>
36 <br />
38 <div class="container">
39 <h1 class="title">Any url as website
40 <br>
41 <span class="subtitle"></span>
42 </h1>
43 <ul class="tags">
45 </ul>
46 <p>The <a href="../index.html#">uweb</a> internal link &quot;<a href="../links/index.html">i:0m</a>&quot; make any url such as download or indirect links visitable as a website. The second part of <a href="../mirrors/index.html#">mirrors</a> has examples using the following tricks:</p>
47 <ul>
48 <li>&quot;i:0m04:[url]&quot;: to treat the [url] content as html with bookmarklet.</li>
49 <li>&quot;i:0m?:[url]&quot;: to treat the [url] content as html, handling css/js properly.</li>
50 <li>&quot;i:0m?[postfix]:[url]&quot;: auto append query postfix to url to retrieve content.</li>
51 <li>&quot;i:0mi:5h:[url]&quot;: similar to &quot;i:0m?:[url]&quot;, to treat the [url] content as html (for download or no-script links etc.)</li>
52 <li>&quot;i:0mi:5h?[postfix]::[url]&quot;: similar to &quot;i:0m?[postfix]:[url]&quot;. auto append query postfix to url to retrieve content.</li>
53 <li>&quot;i:0mi:5h/[regex]/[replacement]::[url]&quot;: use the result of regular expression replacement to retrieve the content.</li>
54 </ul>
55 <p>For more complicated links such as cloud storage shared links, which need user gestures to reach temporary generated content link, use<br>
56 &quot;i:0m/.../[local.html]:[url]&quot;, where the local file &quot;/.../[local.html]&quot; processes &quot;[url]&quot; as needed.</p>
58 </div>
59 <p>Last Modified: 7 April 2024<br>
60 more details on global redirection url<br>
61 <pre></pre>
62 </p>
64 <script id='jsgiscus'
65 src='https://giscus.app/client.js'
66 data-repo="torappinfo/uweb"
67 data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
68 data-category="Announcements"
69 data-category-id="DIC_kwDOEgNLGc4CQjsh"
70 data-mapping="title"
71 data-strict="0"
72 data-reactions-enabled="1"
73 data-emit-metadata="0"
74 data-input-position="top"
75 data-theme="light"
76 data-lang="en"
77 data-loading="lazy"
78 crossorigin="anonymous" async>
79 </script>
81 <footer class="site-footer">
82 <div class="container">
83 &copy; 2018-2024 Richard H. Cao
84 </div>
85 </footer>
86 <!-- This document is licensed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at <https://www.gnu.org/licenses/>. -->
89 </body>
90 </html>