Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: v22 updates DO NOT MERGE #416

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"default": true,
"MD004": { "style": "asterisk"},
"MD013": false,
"MD033": false,
"MD036": false,
"MD040": true,
"MD041": false,
"MD049": true
}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -j auto
SPHINXBUILD = sphinx-build
SPHINXPROJ = Dash
SOURCEDIR = .
Expand Down
39 changes: 18 additions & 21 deletions _static/js/lang.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
$(document).ready(function() {
/* Select current language */
$('#langselect').val(DOCUMENTATION_OPTIONS['LANGUAGE']);

/* Set alternate links
var langs = [ "de", "en", "es", "fr", "pt", "vi", "el", "ru", "ko", "ja", "zh-Hans", "zh-Hant", "ar", "x-default" ];
var pageURL = $(location).attr("href");
pageURL = pageURL.replace("https://docs.dash.org/" + DOCUMENTATION_OPTIONS['LANGUAGE'] , "");
$.each(langs, function(index, value) {
var link = document.createElement('link');
link.rel = "alternate";
link.hreflang = value;
if (value == "x-default") {
link.href = "https://docs.dash.org/en" + pageURL;
} else if (value == "zh-Hans") {
link.href = "https://docs.dash.org/zh_CN" + pageURL;
} else if (value == "zh-Hant") {
link.href = "https://docs.dash.org/zh_TW" + pageURL;
} else {
link.href = "https://docs.dash.org/" + value + pageURL;
}
jQuery('head').append(link);
});*/

// Define paths where the language selector should be hidden
var excludePattern = [
"/docs/core/"
];

// Get the current path of the page
var pagePath = $(location).attr("pathname");
console.log(pagePath)
// Check if the current page path contains the exclude pattern
var shouldHideLangSelector = pagePath.includes(excludePattern);

if (shouldHideLangSelector) {
$('#langselect').hide();
} else {
$('#langselect').show(); // Ensure it's shown if not excluded
}
});

$(function(){
Expand All @@ -41,7 +38,7 @@ $(function(){
// Convert language codes
var siteLang = DOCUMENTATION_OPTIONS['LANGUAGE'];
var currentLang = convertLangCode(siteLang);
var newLang = convertLangCode($('#langselect').val());;
var newLang = convertLangCode($('#langselect').val());

pageURL = pageURL.replace(siteURL + currentLang, "");
var newFullURL = siteURL + newLang + pageURL;
Expand Down
115 changes: 104 additions & 11 deletions _templates/sidebar-main.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,113 @@
</li>
</ul>

<!-- Core docs (external site) -->
<!-- Core docs -->
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Core Docs</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal"
href="https://docs.dash.org/projects/core/en/stable/docs/reference/introduction.html">Blockchain Reference</a></li>
<li class="toctree-l1"><a class="reference internal"
href="https://docs.dash.org/projects/core/en/stable/docs/api/remote-procedure-calls.html">API Reference</a>
<!-- Core Reference Section -->
<li class="toctree-l1 has-children"><a class="reference internal"
href="docs/core/reference/introduction.html">Core
Reference</a>
<input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox" />
<label class="toctree-toggle" for="toctree-checkbox-4"><i class="fa-solid fa-chevron-down"></i></label>
<ul>
<li class="toctree-l2"><a class="reference internal" href="docs/core/reference/introduction.html">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/reference/block-chain.html">Blockchain</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/reference/transactions.html">Transactions</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/reference/wallets.html">Wallets</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/reference/p2p-network.html">P2P Networks</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/reference/improvement-proposals.html">Improvement
Proposals</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal"
href="https://docs.dash.org/projects/core/en/stable/docs/guide/introduction.html">Core Guides</a></li>
<li class="toctree-l1"><a class="reference internal"
href="https://docs.dash.org/projects/core/en/stable/docs/examples/introduction.html">Core Examples</a></li>
<li class="toctree-l1"><a class="reference internal"
href="https://docs.dash.org/projects/core/en/stable/docs/dashcore/wallet-arguments-and-commands.html">Dash Core Wallet</a></li>

<!-- Core API Reference Section -->
<li class="toctree-l1 has-children"><a class="reference internal"
href="docs/core/api/dash-core-apis-hash-byte-order.html">Core
API Reference</a>
<input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" type="checkbox" />
<label class="toctree-toggle" for="toctree-checkbox-5"><i class="fa-solid fa-chevron-down"></i></label>
<ul>
<li class="toctree-l2"><a class="reference internal" href="docs/core/api/dash-core-apis-hash-byte-order.html">Hash Byte Order</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/api/remote-procedure-calls.html">Remote Procedure Calls
(RPCs)</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/api/http-rest.html">HTTP REST</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/api/zmq.html">ZeroMQ (ZMQ) Notifications</a></li>
</ul>
</li>

<!-- Core Guides Section -->
<li class="toctree-l1 has-children"><a class="reference internal"
href="docs/core/guide/introduction.html">Core Guides</a>
<input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" type="checkbox" />
<label class="toctree-toggle" for="toctree-checkbox-6"><i class="fa-solid fa-chevron-down"></i></label>
<ul>
<li class="toctree-l2"><a class="reference internal" href="docs/core/guide/introduction.html">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/guide/dash-features.html">Dash Features</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/guide/block-chain.html">Blockchain</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/guide/transactions.html">Transactions</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/guide/contracts.html">Contracts</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/guide/wallets.html">Wallets</a></li>
</ul>
</li>

<!-- Core Examples Section -->
<li class="toctree-l1 has-children"><a class="reference internal"
href="docs/core/examples/introduction.html">Core Examples</a>
<input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" type="checkbox" />
<label class="toctree-toggle" for="toctree-checkbox-7"><i class="fa-solid fa-chevron-down"></i></label>
<ul>
<li class="toctree-l2"><a class="reference internal" href="docs/core/examples/introduction.html">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/examples/configuration-file.html">Configuration
File</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/examples/testing-applications.html">Testing
Applications</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/examples/transaction-tutorial.html">Transaction
Tutorial</a></li>
</ul>
</li>

<!-- Dash Core Wallet Section -->
<li class="toctree-l1 has-children"><a class="reference internal"
href="docs/core/dashcore/wallet-arguments-and-commands.html">Dash Core Wallet</a>
<input class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" type="checkbox" />
<label class="toctree-toggle" for="toctree-checkbox-8"><i class="fa-solid fa-chevron-down"></i></label>
<ul>
<li class="toctree-l2"><a class="reference internal"
href="docs/core/dashcore/wallet-arguments-and-commands.html">Arguments and Commands</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/dashcore/wallet-configuration-file.html">Configuration
Files</a></li>
</ul>
</li>

<!-- Additional Resources Section -->
<li class="toctree-l1 has-children"><a class="reference internal"
href="docs/core/resources/glossary.html">Additional
Resources</a>
<input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" type="checkbox" />
<label class="toctree-toggle" for="toctree-checkbox-9"><i class="fa-solid fa-chevron-down"></i></label>
<ul>
<li class="toctree-l2"><a class="reference internal" href="docs/core/resources/glossary.html">Glossary</a></li>
<li class="toctree-l2"><a class="reference external" href="https://insight.dash.org/insight/">Mainnet Block
Explorer</a></li>
<li class="toctree-l2"><a class="reference external"
href="https://insight.testnet.networks.dash.org:3002/insight/">Testnet Block
Explorer</a></li>
<li class="toctree-l2"><a class="reference external" href="http://faucet.testnet.networks.dash.org/">Testnet Faucet
</a></li>
<li class="toctree-l2"><a class="reference external"
href="https://www.dash.org/providers-and-tools/#custody-and-api">API Services
</a></li>
<li class="toctree-l2"><a class="reference internal"
href="docs/user/developers/integration-sdks.html">SDK Resources
</a></li>
<li class="toctree-l2"><a class="reference internal" href="docs/core/dips/README.html">Dash Improvement
Proposals</a></li>
<li class="toctree-l2"><a class="reference external" href="https://bitcoin.org/bitcoin.pdf">Bitcoin Whitepaper</a>
<li class="toctree-l2"><a class="reference external"
href="https://docs.dash.org/projects/core/en/21.0.0/docs/index.html">Previous Version of Docs</a>
</li>
</ul>
</li>
</ul>

Expand Down
15 changes: 13 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import os
import subprocess
os.chdir(os.path.dirname(os.path.abspath(__file__)))

# Clone the DIPs repository and process DIPs so they are rendered properly
if not os.path.exists('_external_repo'):
subprocess.check_call(['git', 'clone', 'https://github.com/dashpay/dips.git', '_dips'])
subprocess.check_call(['./scripts/dip-format.sh'])
subprocess.check_call('cd _dips/ && find . -name ".git" -prune -o -print -exec cp --parents \{} ../docs/core/dips/ \;', shell=True)
subprocess.check_call('cd', shell=True)
subprocess.check_call('rm -rf _dips/', shell=True)

# -- General configuration ------------------------------------------------

Expand Down Expand Up @@ -73,6 +84,8 @@
'README.md',
'.devcontainer',
'transifex',
'docs/core/api/ai-prompt.md',
'docs/img/dev/gifs/README.md',
'docs/user/wallets/electrum/dip3_p2sh_howto.md',
'venv'
]
Expand Down Expand Up @@ -116,7 +129,6 @@

# -- intersphinx configuration -----------------------------------------------
intersphinx_mapping = {
"core": ("https://docs.dash.org/projects/core/en/stable/", None),
"platform": ("https://docs.dash.org/projects/platform/en/stable/", None),
}

Expand All @@ -139,7 +151,6 @@
#
html_theme_options = {
"external_links": [
{"name": "Core docs", "url": "https://docs.dash.org/projects/core/en/stable/docs/index.html"},
{"name": "Platform docs", "url": "https://docs.dash.org/projects/platform/en/stable/docs/index.html"},
{"name": "Dash.org", "url": "https://www.dash.org"},
{"name": "Forum", "url": "https://www.dash.org/forum"},
Expand Down
Loading
Loading