Skip to content

Commit 02716b3

Browse files
Merge pull request #12 from spdlearn/feat/add-gtm
Add GTM, Open Graph, robots.txt, and llms.txt to docs
2 parents 1b14174 + 9f731c5 commit 02716b3

6 files changed

Lines changed: 74 additions & 2 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<users>
3+
<user>EFD667D3D31E1B9BB3E714ADCE472409</user>
4+
</users>

docs/source/_extra/llms.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPD Learn
2+
3+
> SPD Learn is a pure PyTorch library for geometric deep learning on Symmetric Positive Definite (SPD) matrices. It provides differentiable Riemannian operations, broadcast-compatible layers, and reference implementations of published neural network architectures (SPDNet, TSMNet, EEGSPDNet, TensorCSPNet, PhaseSPDNet, GREEN) for SPD-valued data such as EEG and fMRI covariance matrices.
4+
5+
Key notes for LLMs:
6+
- Prefer the "API Reference" for exact function signatures, layer parameters, and model constructors.
7+
- Prefer "Tutorials" for end-to-end workflows (installation through training).
8+
- The library follows a functional-first design: `spd_learn.functional` (pure functions) -> `spd_learn.modules` (layers) -> `spd_learn.models` (architectures).
9+
- Requires Python 3.11+ and PyTorch 2.0+.
10+
- Licensed under BSD-3-Clause.
11+
12+
## Getting Started
13+
- [Installation](https://spdlearn.org/installation.html): Install via pip, from source, and optional dependencies
14+
- [User Guide](https://spdlearn.org/user_guide.html): Practical introduction to SPD matrices and building models
15+
16+
## API Reference
17+
- [API Reference](https://spdlearn.org/api.html): Full API — functional ops, modules (layers), models, and utilities
18+
19+
## Theory & Background
20+
- [Theory](https://spdlearn.org/theory.html): Mathematical foundations of Riemannian geometry for SPD matrices
21+
- [Notation](https://spdlearn.org/notation.html): Symbol conventions used in the documentation
22+
- [Geometric Concepts](https://spdlearn.org/geometric_concepts.html): Key geometric concepts explained
23+
- [Numerical Stability](https://spdlearn.org/numerical_stability.html): Numerical precision and stability considerations
24+
- [Glossary](https://spdlearn.org/glossary.html): Definitions of key terms
25+
26+
## Examples & Tutorials
27+
- [Examples](https://spdlearn.org/generated/auto_examples/index.html): Applied examples and tutorials index
28+
- [Tutorials](https://spdlearn.org/generated/auto_examples/tutorials/index.html): Step-by-step tutorials for learning SPD Learn
29+
- [Visualizations](https://spdlearn.org/generated/auto_examples/visualizations/index.html): Visual demonstrations of SPD operations
30+
- [Applied Examples](https://spdlearn.org/generated/auto_examples/applied_examples/index.html): Real-world applications on EEG, fMRI, and neuroimaging data
31+
32+
## Community
33+
- [FAQ](https://spdlearn.org/faq.html): Frequently asked questions
34+
- [Contributing](https://spdlearn.org/contributing.html): How to contribute to SPD Learn
35+
- [References](https://spdlearn.org/references.html): Academic references and bibliography
36+
- [GitHub Repository](https://github.com/spdlearn/spd_learn): Source code and issue tracker

docs/source/_extra/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
User-agent: *
2+
Allow: /
3+
4+
Sitemap: https://spdlearn.org/sitemap.xml

docs/source/_templates/layout.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% extends "pydata_sphinx_theme/layout.html" %}
2+
3+
{% block extrahead %}
4+
{{ super() }}
5+
<!-- Google Tag Manager -->
6+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
7+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
8+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
9+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
10+
})(window,document,'script','dataLayer','GTM-NF9467W8');</script>
11+
<!-- End Google Tag Manager -->
12+
{% endblock %}
13+
14+
{% block content %}
15+
<!-- Google Tag Manager (noscript) -->
16+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NF9467W8"
17+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
18+
<!-- End Google Tag Manager (noscript) -->
19+
{{ super() }}
20+
{% endblock %}

docs/source/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"sphinx_gallery.gen_gallery",
2727
"matplotlib.sphinxext.plot_directive",
2828
"sphinx_sitemap", # SEO: Generate sitemap.xml
29+
"sphinxext.opengraph", # SEO: Open Graph metadata for social previews
2930
]
3031

3132
# -- BibTeX configuration -----------------------------------------------------
@@ -302,8 +303,14 @@
302303
# Point 6: SEO - Add canonical URLs
303304
html_baseurl = "https://spdlearn.org/"
304305

305-
# Point 7: Prevent duplicate images - don't copy extra files
306-
html_extra_path = []
306+
# Point 7: Copy root-level site files (robots.txt, BingSiteAuth.xml, etc.)
307+
html_extra_path = ["_extra"]
308+
309+
# Point 8: Open Graph metadata for social media previews
310+
ogp_site_url = "https://spdlearn.org/"
311+
ogp_image = "https://spdlearn.org/_static/spd_learn.png"
312+
ogp_description_length = 200
313+
ogp_type = "website"
307314

308315
# -- Linkcheck configuration -------------------------------------------------
309316

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ docs = [
6060
'sphinx_gallery',
6161
'sphinx-copybutton',
6262
'sphinx-sitemap',
63+
'sphinxext-opengraph',
6364
'sphinxcontrib-bibtex',
6465
'numpydoc',
6566
'memory_profiler',

0 commit comments

Comments
 (0)