Comments (8)
I'm not sure I understand, where are these supposed be available? in the GitHub previews of the documentation?
from pandoc-goodies.
You mean like this?
from pandoc-goodies.
Exactly.
I use a local website generated with pandoc. Atleast file links like
file:///home/user/site/index.html#Notes
do not jump to their respectice header and links like
file:///home/user/site/exercises#Exercise%20II..html
do not work at all.
The last one is generated when following a link.
Also, with linked local files (i.e. pdfs) it is always a .html
attached, resulting in file.pdf.html
, but this could be a pandoc config thing.
from pandoc-goodies.
Pandoc has some options to control how the headings anchor IDs in the final document are generated, and these will always be linkable. I don't remember the various options out of my head (I'll look them up), but you should be able to look at the generated HTML source and extract those anchors.
You should also be careful about case-sensitiveness, for usually anchors are converted to lowercase.
Let me check Pandoc docs and I'll be back with some options discussion...
from pandoc-goodies.
http://pandoc.org/MANUAL.html#extension-auto_identifiers
http://pandoc.org/MANUAL.html#heading-identifiers
from pandoc-goodies.
Thanks I'll look into it!
from pandoc-goodies.
There are various options regarding the algorithms used to produce a valid anchor.
What I find strange is that it doesn't mention the HTML output for those extensions, but I know as a fact that it supports it.
If you tell pandoc to autogenerate a TOC for the html docs/web-pages you can easily test how these links work.
Let me know if you managed to solve it.
from pandoc-goodies.
Hi, thanks for your help again!
I managed to use the header identifiers. I initally used vimwikis nameing convention, which does not work with pandoc. Maybe I will look into writing a converter, for now I just look the identifer up or just write simpler headers 😆
The .html
problem was fixed by writing a filter. Mine is
sed 's/\(jpg\|pdf\).html/\1/g' | sed -e 's/\(href=".*\)\.html/\1/g'
from pandoc-goodies.
Related Issues (10)
- $table-of-contents$ instead of $toc$ HOT 2
- Floating Header Link in GitHub HOT 5
- Line numbering? HOT 4
- How is the underlying of line numbers controlled? HOT 7
- native gfm task list as lua-filter HOT 7
- how to use it for convert markdown to html? HOT 4
- GitHub.html5 and `<....` HOT 9
- Pandoc version requirement? HOT 1
- unexpected "-", expecting letter HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandoc-goodies.