mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
feat(docs): let's try to deploy our stuff to mkdocs
This commit is contained in:
94
docs/index.md
vendored
Normal file
94
docs/index.md
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
# Trilium Notes Documentation
|
||||
|
||||
Welcome to the official documentation for **Trilium Notes** - a hierarchical note-taking application with a focus on building large personal knowledge bases.
|
||||
|
||||

|
||||
|
||||
## What is Trilium Notes?
|
||||
|
||||
Trilium Notes is a powerful, feature-rich note-taking application designed for building and managing extensive personal knowledge bases. It offers:
|
||||
|
||||
- **Hierarchical organization** with unlimited nesting of notes
|
||||
- **Rich text editing** with markdown support
|
||||
- **Powerful search** capabilities
|
||||
- **Note relations** and attributes for semantic connections
|
||||
- **Scripting support** for automation and customization
|
||||
- **Synchronization** between devices
|
||||
- **Encryption** for sensitive notes
|
||||
- **Web clipper** for saving web content
|
||||
|
||||
## Quick Links
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-rocket-launch-outline: **[Quick Start Guide](User%20Guide/quick-start.md)**
|
||||
|
||||
Get up and running with Trilium in minutes
|
||||
|
||||
- :material-download: **[Installation](User%20Guide/installation.md)**
|
||||
|
||||
Download and install Trilium on your platform
|
||||
|
||||
- :material-docker: **[Docker Setup](User%20Guide/docker.md)**
|
||||
|
||||
Deploy Trilium using Docker containers
|
||||
|
||||
- :material-book-open-variant: **[User Guide](User%20Guide/index.md)**
|
||||
|
||||
Comprehensive guide to all features
|
||||
|
||||
- :material-code-braces: **[Script API](Script%20API/index.md)**
|
||||
|
||||
Automate and extend Trilium with scripting
|
||||
|
||||
- :material-wrench: **[Developer Guide](Developer%20Guide/index.md)**
|
||||
|
||||
Contributing and development documentation
|
||||
|
||||
</div>
|
||||
|
||||
## Features Overview
|
||||
|
||||
### Note Organization
|
||||
- Create unlimited hierarchical note structures
|
||||
- Clone notes to appear in multiple locations
|
||||
- Use attributes and relations for metadata
|
||||
- Template system for consistent note creation
|
||||
|
||||
### Content Types
|
||||
- **Text notes** with rich formatting
|
||||
- **Code notes** with syntax highlighting
|
||||
- **Canvas notes** for drawing and diagrams
|
||||
- **File attachments** of any type
|
||||
- **Web view** for embedded content
|
||||
- **Mermaid diagrams** support
|
||||
|
||||
### Advanced Features
|
||||
- **Full-text search** with advanced operators
|
||||
- **Note map** visualization
|
||||
- **Day notes** for journaling
|
||||
- **Book notes** for long-form content
|
||||
- **Protected notes** with encryption
|
||||
- **Note versioning** and history
|
||||
|
||||
### Automation & Integration
|
||||
- JavaScript-based scripting
|
||||
- Custom widgets and themes
|
||||
- REST API for external integrations
|
||||
- Web clipper browser extension
|
||||
- Import/export in multiple formats
|
||||
|
||||
## Getting Help
|
||||
|
||||
- **[FAQ](support/faq.md)** - Frequently asked questions
|
||||
- **[Troubleshooting](support/troubleshooting.md)** - Common issues and solutions
|
||||
- **[Community Forum](https://github.com/triliumnext/trilium/discussions)** - Ask questions and share tips
|
||||
- **[Issue Tracker](https://github.com/triliumnext/trilium/issues)** - Report bugs and request features
|
||||
|
||||
## Contributing
|
||||
|
||||
Trilium is open-source and welcomes contributions! Check out our [Contributing Guide](Developer%20Guide/contributing.md) to get started.
|
||||
|
||||
## License
|
||||
|
||||
Trilium Notes is licensed under [AGPL-3.0](https://github.com/triliumnext/trilium/blob/master/LICENSE).
|
||||
111
docs/javascripts/extra.js
vendored
Normal file
111
docs/javascripts/extra.js
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
// Custom JavaScript for Trilium Notes documentation
|
||||
|
||||
// Add smooth scrolling for anchor links
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Smooth scroll for internal links
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
const target = document.querySelector(this.getAttribute('href'));
|
||||
if (target) {
|
||||
target.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Add copy button to code blocks if not already present
|
||||
const codeBlocks = document.querySelectorAll('pre code');
|
||||
codeBlocks.forEach(block => {
|
||||
if (!block.parentElement.querySelector('.copy-button')) {
|
||||
const button = document.createElement('button');
|
||||
button.className = 'copy-button';
|
||||
button.textContent = 'Copy';
|
||||
button.addEventListener('click', () => {
|
||||
navigator.clipboard.writeText(block.textContent);
|
||||
button.textContent = 'Copied!';
|
||||
setTimeout(() => {
|
||||
button.textContent = 'Copy';
|
||||
}, 2000);
|
||||
});
|
||||
block.parentElement.appendChild(button);
|
||||
}
|
||||
});
|
||||
|
||||
// Add external link indicators
|
||||
document.querySelectorAll('a[href^="http"]').forEach(link => {
|
||||
if (!link.hostname.includes('trilium')) {
|
||||
link.classList.add('external-link');
|
||||
link.setAttribute('target', '_blank');
|
||||
link.setAttribute('rel', 'noopener noreferrer');
|
||||
}
|
||||
});
|
||||
|
||||
// Platform detection for download buttons
|
||||
const platform = detectPlatform();
|
||||
const downloadButtons = document.querySelectorAll('.download-button');
|
||||
downloadButtons.forEach(button => {
|
||||
if (button.dataset.platform === platform) {
|
||||
button.classList.add('recommended');
|
||||
button.innerHTML += ' <span class="badge">Recommended</span>';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Detect user's platform
|
||||
function detectPlatform() {
|
||||
const userAgent = navigator.userAgent.toLowerCase();
|
||||
if (userAgent.includes('win')) return 'windows';
|
||||
if (userAgent.includes('mac')) return 'macos';
|
||||
if (userAgent.includes('linux')) return 'linux';
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
// Add search shortcuts
|
||||
document.addEventListener('keydown', function(e) {
|
||||
// Ctrl/Cmd + K to focus search
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === 'k') {
|
||||
e.preventDefault();
|
||||
const searchInput = document.querySelector('.md-search__input');
|
||||
if (searchInput) {
|
||||
searchInput.focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Version selector enhancement
|
||||
const versionSelector = document.querySelector('.md-version__current');
|
||||
if (versionSelector) {
|
||||
// Add version comparison tooltip
|
||||
versionSelector.addEventListener('mouseenter', function() {
|
||||
const tooltip = document.createElement('div');
|
||||
tooltip.className = 'version-tooltip';
|
||||
tooltip.textContent = 'Click to view other versions';
|
||||
this.appendChild(tooltip);
|
||||
});
|
||||
}
|
||||
|
||||
// Analytics event tracking for documentation
|
||||
if (typeof gtag !== 'undefined') {
|
||||
// Track external link clicks
|
||||
document.querySelectorAll('a[href^="http"]').forEach(link => {
|
||||
link.addEventListener('click', () => {
|
||||
gtag('event', 'click', {
|
||||
'event_category': 'external_link',
|
||||
'event_label': link.href
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Track code copy events
|
||||
document.querySelectorAll('.copy-button').forEach(button => {
|
||||
button.addEventListener('click', () => {
|
||||
gtag('event', 'copy_code', {
|
||||
'event_category': 'engagement',
|
||||
'event_label': window.location.pathname
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
13
docs/javascripts/mathjax.js
vendored
Normal file
13
docs/javascripts/mathjax.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// MathJax configuration for mathematical notation support
|
||||
window.MathJax = {
|
||||
tex: {
|
||||
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
||||
displayMath: [['$$', '$$'], ['\\[', '\\]']],
|
||||
processEscapes: true,
|
||||
processEnvironments: true
|
||||
},
|
||||
options: {
|
||||
ignoreHtmlClass: 'no-mathjax',
|
||||
processHtmlClass: 'mathjax'
|
||||
}
|
||||
};
|
||||
121
docs/stylesheets/extra.css
vendored
Normal file
121
docs/stylesheets/extra.css
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
/* Custom styles for Trilium Notes documentation */
|
||||
|
||||
/* Grid cards for homepage */
|
||||
.md-typeset .grid {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.md-typeset .grid.cards > ul {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.md-typeset .grid.cards > ul > li {
|
||||
border: 1px solid var(--md-default-fg-color--lightest);
|
||||
border-radius: .25rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
transition: border-color .25s, box-shadow .25s;
|
||||
}
|
||||
|
||||
.md-typeset .grid.cards > ul > li:hover {
|
||||
border-color: var(--md-accent-fg-color);
|
||||
box-shadow: 0 0 0 .1rem var(--md-accent-fg-color--transparent);
|
||||
}
|
||||
|
||||
/* Improve code block appearance */
|
||||
.md-typeset pre > code {
|
||||
font-size: .85rem;
|
||||
}
|
||||
|
||||
/* Better admonition spacing */
|
||||
.md-typeset .admonition {
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
/* Trilium brand colors */
|
||||
:root {
|
||||
--trilium-primary: #4a5568;
|
||||
--trilium-accent: #805ad5;
|
||||
}
|
||||
|
||||
/* Custom badge styles */
|
||||
.badge {
|
||||
background-color: var(--md-accent-fg-color);
|
||||
border-radius: .125rem;
|
||||
color: var(--md-accent-bg-color);
|
||||
display: inline-block;
|
||||
font-size: .75rem;
|
||||
font-weight: 700;
|
||||
padding: .125rem .375rem;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Version badge */
|
||||
.version-badge {
|
||||
background-color: var(--md-primary-fg-color);
|
||||
margin-left: .5rem;
|
||||
}
|
||||
|
||||
/* Platform badges */
|
||||
.platform-badge {
|
||||
margin: 0 .25rem;
|
||||
}
|
||||
|
||||
.platform-badge.windows {
|
||||
background-color: #0078d4;
|
||||
}
|
||||
|
||||
.platform-badge.macos {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.platform-badge.linux {
|
||||
background-color: #fcc624;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/* Improve table readability */
|
||||
.md-typeset table:not([class]) {
|
||||
font-size: .85rem;
|
||||
}
|
||||
|
||||
.md-typeset table:not([class]) th {
|
||||
background-color: var(--md-default-bg-color);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* API reference styling */
|
||||
.api-method {
|
||||
background-color: var(--md-code-bg-color);
|
||||
border-radius: .125rem;
|
||||
font-family: var(--md-code-font-family);
|
||||
font-weight: 600;
|
||||
padding: .125rem .25rem;
|
||||
}
|
||||
|
||||
.api-method.get {
|
||||
color: #10b981;
|
||||
}
|
||||
|
||||
.api-method.post {
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
.api-method.put {
|
||||
color: #f59e0b;
|
||||
}
|
||||
|
||||
.api-method.delete {
|
||||
color: #ef4444;
|
||||
}
|
||||
|
||||
/* Responsive improvements */
|
||||
@media screen and (max-width: 76.1875em) {
|
||||
.md-typeset .grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user