mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 21:19:01 +01:00 
			
		
		
		
	feat(export/zip): basic tree navigation
This commit is contained in:
		
							parent
							
								
									4d5e866db6
								
							
						
					
					
						commit
						d8958adea5
					
				@ -333,6 +333,9 @@ async function exportToZip(taskContext: TaskContext, branch: BBranch, format: "h
 | 
			
		||||
 | 
			
		||||
                if (note) {
 | 
			
		||||
                    content = renderNoteForExport(note, branch, basePath);
 | 
			
		||||
 | 
			
		||||
                    // TODO: Fix double rewrite.
 | 
			
		||||
                    content = rewriteFn(content, noteMeta);
 | 
			
		||||
                } else {
 | 
			
		||||
                    const cssUrl = basePath + "style.css";
 | 
			
		||||
                    // <base> element will make sure external links are openable - https://github.com/zadam/trilium/issues/1289#issuecomment-704066809
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,16 @@
 | 
			
		||||
<%
 | 
			
		||||
const linkClass = `type-${note.type}` + (activeNote.noteId === note.noteId ? " active" : "");
 | 
			
		||||
const isExternalLink = note.hasLabel("shareExternal");
 | 
			
		||||
const linkHref = isExternalLink ? note.getLabelValue("shareExternal") : `./${note.shareId}`;
 | 
			
		||||
let linkHref;
 | 
			
		||||
 | 
			
		||||
if (isExternalLink) {
 | 
			
		||||
    linkHref = note.getLabelValue("shareExternal");
 | 
			
		||||
} else if (note.shareId) {
 | 
			
		||||
    linkHref = `./${note.shareId}`;
 | 
			
		||||
} else {
 | 
			
		||||
    linkHref = `#${note.getBestNotePath().join("/")}`;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const target = isExternalLink ? ` target="_blank" rel="noopener noreferrer"` : "";
 | 
			
		||||
%>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user