mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
176 lines
No EOL
27 KiB
HTML
176 lines
No EOL
27 KiB
HTML
<!DOCTYPE html><html lang="ro"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Pages and Styles · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta property="og:title" content="Pages and Styles · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="Docusaurus furnizează suport pentru scrierea paginilor ca Componente de Reacție înăuntrul dosarului `siteweb/pagini` ce va avea același header, footer și stiluri ca și restul site-ului."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
|
||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||
|
||
ga('create', 'UA-44373548-31', 'auto');
|
||
ga('send', 'pageview');
|
||
</script><link rel="stylesheet" href="/css/code-blocks-buttons.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
|
||
document.addEventListener("DOMContentLoaded", function(){
|
||
addBackToTop(
|
||
{"zIndex":100}
|
||
)
|
||
});
|
||
</script><link rel="stylesheet" href="/css/main.css"/></head><body class="sideNavVisible doc separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/ro"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/ro/versions.html"><h3>next</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/docs/ro/next/installation" target="_self">Documente</a></li><li class=""><a href="/ro/help" target="_self">Ajutor</a></li><li class=""><a href="/ro/users" target="_self">Users</a></li><li class=""><a href="/ro/about-slash" target="_self">About /</a></li><li class=""><a href="/blog" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_self">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg"/>Română</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/en">English</a></li><li><a href="/es-ES">Español</a></li><li><a href="/tr">Türkçe</a></li><li><a href="/zh-CN">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Translate</a></li></ul></div></li><script>
|
||
const languagesMenuItem = document.getElementById("languages-menu");
|
||
const languagesDropDown = document.getElementById("languages-dropdown");
|
||
languagesMenuItem.addEventListener("click", function(){
|
||
if(languagesDropDown.className == "hide") {
|
||
languagesDropDown.className = "visible";
|
||
} else {
|
||
languagesDropDown.className = "hide";
|
||
}
|
||
});
|
||
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i>›</i><span>API</span></h2></div><div class="navGroups"><div class="navGroup navGroupActive"><h3>Pentru a începe</h3><ul><li class="navListItem"><a class="navItem" href="/docs/ro/next/installation">Installation</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/site-preparation">Site Preparation</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/site-creation">Creating your site</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/publishing">Publishing your site</a></li></ul></div><div class="navGroup navGroupActive"><h3>Ghiduri</h3><ul><li class="navListItem"><a class="navItem" href="/docs/ro/next/blog">Adding a Blog</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/custom-pages">Custom Pages</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/search">Enabling Search</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/navigation">Navigation and Sidebars</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/translation">Traduceri & Localizări</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/versioning">Versioning</a></li></ul></div><div class="navGroup navGroupActive"><h3>API</h3><ul><li class="navListItem"><a class="navItem" href="/docs/ro/next/commands">CLI Commands</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/doc-markdown">Markdown Features</a></li><li class="navListItem navListItemActive"><a class="navItem navItemActive" href="/docs/ro/next/api-pages">Pages and Styles</a></li><li class="navListItem"><a class="navItem" href="/docs/ro/next/site-config">siteConfig.js</a></li></ul></div></div></section></div><script>
|
||
var toggler = document.getElementById('navToggler');
|
||
var nav = document.getElementById('docsNav');
|
||
toggler.onclick = function() {
|
||
nav.classList.toggle('docsSliderActive');
|
||
};
|
||
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/ro" target="_blank" rel="noreferrer noopener">Translate</a><h1>Pages and Styles</h1></header><article><div><span><p>Docusaurus furnizează suport pentru scrierea paginilor ca Componente de Reacție înăuntrul dosarului <code>siteweb/pagini</code> ce va avea același header, footer și stiluri ca și restul site-ului.</p>
|
||
<h2><a class="anchor" aria-hidden="true" id="urls-for-pages"></a><a href="#urls-for-pages" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>URLs for Pages</h2>
|
||
<p>Orice fișiere <code>.js</code> din <code>siteweb/pagini</code> va fi redată către html static folosind calea către fișier după "pagini". Fișierele din <code>siteweb/pagini/en</code> deasemenea va fi copiată în <code>pagini</code> și va SUPRASCRIE orice fișiere cu același nume din <code>pagini</code>. Spre exemplu, pagina pentru fișierul <code>siteweb/pagini/en/ajutor.js</code> va fi găsită la url-ul <code>${baseUrl}en/ajutor.js</code> la fel ca și url-ul <code>${baseUrl}ajutor.js</code>, unde <code>${baseUrl}</code> este câmpul<code>baseUrl</code> setat în <a href="/docs/ro/next/site-config">fișierul siteConfig.js</a>.</p>
|
||
<h2><a class="anchor" aria-hidden="true" id="titles-for-pages"></a><a href="#titles-for-pages" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Titles for Pages</h2>
|
||
<p>By default, the title of your page is <code><title> • <tagline></code> where <code>title</code> and <code>tagline</code> fields are set in <a href="/docs/ro/next/site-config"><code>siteConfig.js</code></a>. You can exclude the tagline in the title by setting <code>disableTitleTagline</code> to <code>true</code>. If you want to set a specific title for your custom pages, add a <code>title</code> class property on your exported React component.</p>
|
||
<p>Exemplu:</p>
|
||
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> React = <span class="hljs-built_in">require</span>(<span class="hljs-string">'react'</span>);
|
||
|
||
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyPage</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
|
||
render() {
|
||
<span class="hljs-comment">// ... your rendering code</span>
|
||
}
|
||
}
|
||
|
||
MyPage.title = <span class="hljs-string">'My Custom Title'</span>;
|
||
|
||
<span class="hljs-built_in">module</span>.exports = MyPage;
|
||
</code></pre>
|
||
<h2><a class="anchor" aria-hidden="true" id="page-require-paths"></a><a href="#page-require-paths" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Page Require Paths</h2>
|
||
<p>Docusaurus provides a few useful React components for users to write their own pages, found in the <code>CompLibrary</code> module. This module is provided as part of Docusaurus in <code>node_modules/docusaurus</code>, so to access it, pages in the <code>pages</code> folder are temporarily copied into <code>node_modules/docusaurus</code> when rendering to static html. As seen in the example files, this means that a user page at <code>pages/en/index.js</code> uses a require path to <code>'../../core/CompLibrary.js'</code> to import the provided components.</p>
|
||
<p>What this means to the user is that if you wish to use the <code>CompLibrary</code> module, make sure the require path is set correctly. For example, a page at <code>page/mypage.js</code> would use a path <code>'../core/CompLibrary.js'</code>.</p>
|
||
<p>If you wish to use your own components inside the website folder, use <code>process.cwd()</code> which will refer to the <code>website</code> folder to construct require paths. For example, if you add a component to <code>website/core/mycomponent.js</code>, you can use the require path, <code>'process.cwd() + /core/mycomponent.js'</code>.</p>
|
||
<h2><a class="anchor" aria-hidden="true" id="provided-components"></a><a href="#provided-components" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Provided Components</h2>
|
||
<p>Docusaurus provides the following components in <code>CompLibrary</code>:</p>
|
||
<h3><a class="anchor" aria-hidden="true" id="complibrarymarkdownblock"></a><a href="#complibrarymarkdownblock" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>CompLibrary.MarkdownBlock</code></h3>
|
||
<p>A React component that parses markdown and renders to HTML.</p>
|
||
<p>Exemplu:</p>
|
||
<pre><code class="hljs css jsx"><span class="hljs-keyword">const</span> MarkdownBlock = CompLibrary.MarkdownBlock;
|
||
|
||
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">MarkdownBlock</span>></span>
|
||
[Markdown syntax for a link](http://www.example.com)
|
||
<span class="hljs-tag"></<span class="hljs-name">MarkdownBlock</span>></span></span>;
|
||
</code></pre>
|
||
<h3><a class="anchor" aria-hidden="true" id="librăriecompcontainer"></a><a href="#librăriecompcontainer" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>LibrărieComp.Container</code></h3>
|
||
<p>A React container component using Docusaurus styles. Has optional padding and background color props that you can configure.</p>
|
||
<p><strong>Props</strong></p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
|
||
<tr><td><code>background</code></td><td>One of <code>'dark'</code>, <code>'highlight'</code>, <code>'light'</code></td><td><code>null</code></td><td>Background styling of the element.</td></tr>
|
||
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<p><strong>Example</strong></p>
|
||
<pre><code class="hljs css jsx"><Container
|
||
padding={['bottom', 'top']}
|
||
background="light"
|
||
className="myCustomClass">
|
||
...
|
||
</Container>
|
||
</code></pre>
|
||
<h3><a class="anchor" aria-hidden="true" id="librăriecompblocgrilă"></a><a href="#librăriecompblocgrilă" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>LibrărieComp.BlocGrilă</code></h3>
|
||
<p>A React component to organize text and images.</p>
|
||
<p><strong>Props</strong></p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
|
||
<tr><td><code>layout</code></td><td>One of <code>'twoColumn'</code>, <code>'threeColumn'</code>, <code>'fourColumn'</code></td><td><code>'twoColumn'</code></td><td>Number of column sections in the <code>GridBlock</code>.</td></tr>
|
||
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
|
||
<tr><td><code>contents</code></td><td>Array of content objects</td><td><code>[]</code></td><td>Contents of each section of the GridBlock. Refer to the next table for the fields available on a content object.</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<p><strong>Content Object</strong></p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
|
||
<tr><td><code>content</code></td><td>String</td><td>-</td><td>The text of this section, which is parsed using Markdown</td></tr>
|
||
<tr><td><code>image</code></td><td>String</td><td>-</td><td>The path of the display image</td></tr>
|
||
<tr><td><code>imageAlt</code></td><td>String</td><td>-</td><td>The text that will be shown in case the image is not available</td></tr>
|
||
<tr><td><code>imageAlign</code></td><td>One of <code>'top'</code>, <code>'left'</code>, <code>'bottom'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Image alignment relative to the text</td></tr>
|
||
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<p><strong>Example</strong></p>
|
||
<pre><code class="hljs css jsx"><GridBlock
|
||
align=<span class="hljs-string">"center"</span>
|
||
layout=<span class="hljs-string">"threeColumn"</span>
|
||
className=<span class="hljs-string">"myCustomClass"</span>
|
||
contents={[
|
||
{
|
||
<span class="hljs-attr">title</span>: <span class="hljs-string">`[Learn](<span class="hljs-subst">${siteConfig.baseUrl}</span>docs/tutorial.html)`</span>,
|
||
<span class="hljs-attr">content</span>: <span class="hljs-string">'Learn how to use this project'</span>,
|
||
<span class="hljs-attr">image</span>: siteConfig.baseUrl + <span class="hljs-string">'img/learn.png'</span>,
|
||
<span class="hljs-attr">imageAlt</span>: <span class="hljs-string">'Learn how to use this project'</span>,
|
||
<span class="hljs-attr">imageLink</span>: siteConfig.baseUrl + <span class="hljs-string">'docs/tutorial.html'</span>,
|
||
},
|
||
{
|
||
<span class="hljs-attr">title</span>: <span class="hljs-string">'Frequently Asked Questions'</span>,
|
||
<span class="hljs-attr">content</span>: <span class="hljs-string">'Questions gathered from the community'</span>,
|
||
<span class="hljs-attr">image</span>: siteConfig.baseUrl + <span class="hljs-string">'img/faq.png'</span>,
|
||
<span class="hljs-attr">imageAlign</span>: <span class="hljs-string">'top'</span>,
|
||
},
|
||
{
|
||
<span class="hljs-attr">title</span>: <span class="hljs-string">'More'</span>,
|
||
<span class="hljs-attr">content</span>: <span class="hljs-string">'Lots of documentation is on this site'</span>,
|
||
},
|
||
]}
|
||
/>
|
||
</code></pre>
|
||
<p>More examples of how these components are used can be found in the <a href="/docs/ro/next/site-preparation">generated example files</a> as well as in Docusaurus' own repo for its website set-up.</p>
|
||
<h2><a class="anchor" aria-hidden="true" id="translating-strings"></a><a href="#translating-strings" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Translating Strings</h2>
|
||
<p>When translations are enabled, any pages inside <code>website/pages/en</code> will be translated for all enabled languages. Urls for non-English pages will use their language tags as specified in the <code>languages.js</code> file. E.g. The url for a French page of <code>website/pages/en/help.js</code> would be found at <code>${baseUrl}fr/help.html</code>.</p>
|
||
<p>When writing pages that you wish to translate, wrap any strings to be translated inside a <code><translate></code> tag. e.g.,</p>
|
||
<pre><code class="hljs css jsx"><p>
|
||
<translate>I like translations</translate>
|
||
</p>
|
||
</code></pre>
|
||
<p>You can also provide an optional description attribute to provide context for translators. e.g,</p>
|
||
<pre><code class="hljs css jsx"><a href="/community">
|
||
<translate desc="Footer link to page referring to community GitHub and Slack">
|
||
Community
|
||
</translate>
|
||
</a>
|
||
</code></pre>
|
||
<p>Add the following require statement as well:</p>
|
||
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> translate = <span class="hljs-built_in">require</span>(<span class="hljs-string">'../../server/translate.js'</span>).translate;
|
||
</code></pre>
|
||
<p>Note that this path is valid for files inside <code>pages/en</code> and should be adjusted accordingly if files are in different locations, as discussed <a href="#page-require-paths">above</a>.</p>
|
||
<h2><a class="anchor" aria-hidden="true" id="using-static-assets"></a><a href="#using-static-assets" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Using Static Assets</h2>
|
||
<p>Static assets should be placed into the <code>website/static</code> folder. They can be accessed by their paths, excluding <code>static</code>. For example, if the site's <code>baseUrl</code> is <code>/docusaurus/</code>, an image in <code>website/static/img/logo.png</code> is available at <code>/docusaurus/img/logo.png</code>.</p>
|
||
<h2><a class="anchor" aria-hidden="true" id="styles"></a><a href="#styles" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Styles</h2>
|
||
<p>You should configure your site's primary, secondary, and code block colors using the <code>colors</code> field in <code>siteConfig</code> as specified <a href="/docs/ro/next/site-config">here</a>. You can also configure other colors in the same way as described in the <code>siteConfig</code> doc.</p>
|
||
<p>You can provide your own custom styles by adding them anywhere in the <code>website/static</code> folder. Any <code>.css</code> files you provide in the <code>static</code> folder will get concatenated to the end of Docusaurus' provided styles, allowing you to add to or override Docusaurus default styles as you wish.</p>
|
||
<p>An easy way to figure out what classes you wish to override or add to is to <a href="/docs/ro/next/commands">start your server locally</a> and use your browser's inspect element tool.</p>
|
||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="doc-markdown">← Markdown Features</a><a class="docs-next button" href="site-config">siteConfig.js →</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#urls-for-pages">URLs for Pages</a></li><li><a href="#titles-for-pages">Titles for Pages</a></li><li><a href="#page-require-paths">Page Require Paths</a></li><li><a href="#provided-components">Provided Components</a><ul class="toc-headings"><li><a href="#complibrarymarkdownblock"><code>CompLibrary.MarkdownBlock</code></a></li><li><a href="#librăriecompcontainer"><code>LibrărieComp.Container</code></a></li><li><a href="#librăriecompblocgrilă"><code>LibrărieComp.BlocGrilă</code></a></li></ul></li><li><a href="#translating-strings">Translating Strings</a></li><li><a href="#using-static-assets">Using Static Assets</a></li><li><a href="#styles">Styles</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div><h5>Docs</h5><a href="
|
||
/docs/ro/installation.html">Getting Started</a><a href="
|
||
/docs/ro/versioning.html">Versioning</a><a href="
|
||
/docs/ro/translation.html">Localization</a><a href="
|
||
/docs/ro/search.html">Adding Search</a></div><div><h5>Community</h5><a href="/ro/users.html">User Showcase</a></div><div><h5>More</h5><div class="social"><a class="github-button" href="https://github.com/facebook/Docusaurus" data-count-href="/facebook/Docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">Docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://code.facebook.com/projects/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2018 Facebook Inc.</span></section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||
var search = docsearch({
|
||
|
||
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
|
||
indexName: 'docusaurus',
|
||
inputSelector: '#search_input_react'
|
||
});
|
||
</script></body></html> |