Coder Social home page Coder Social logo

pandoc-website's Introduction

Pandoc website

This repository contains the data files and build scripts for pandoc's website.

pandoc-website's People

Contributors

jgm avatar mb21 avatar not-my-profile avatar mrzool avatar tarleb avatar adunning avatar bpj avatar hanjoosten avatar igalic avatar ma124 avatar ithinkihaveacat avatar pothitos avatar purefun avatar raymondehlers avatar sid-kap avatar waldyrious avatar wolf-so avatar the-solipsist avatar

Stargazers

vancaem avatar LZ91X  avatar Desperado avatar Justonelove LLC avatar Christophe Dervieux avatar Hafiz C. avatar Nick Butcher avatar Tacito Vito Westerberg avatar Tommi avatar  avatar tg-z avatar Mahdi Abdurrahman avatar Xiangyun Huang avatar Neil Haria avatar  avatar Jc' avatar Will Wolff-Myren avatar  avatar Kolen Cheung avatar Kai Li avatar somename123 avatar Heechan Park avatar Daegwon Nacyot Kim avatar Dennis Iversen avatar Angus H. avatar  avatar Dr M. Kaddour YAHYAOUI avatar xd1le avatar

Watchers

 avatar  avatar James Cloos avatar  avatar

pandoc-website's Issues

TOC is not more placed on the right

With the new website (following I guess )

I noticed a few change probably undesired. Here is one

Now I get this:
image

with the TOC being at the end after footnote
image

This is probably something with the bootstrap grid system. Maybe because of the margins
image
Which make the 2 element in row to be too large despite col-md-3 and col-md-9 being 12 width.
If I remove the margin
image

I correctly get the TOC on the right
image

It may not be the underlying issue but could be related.

installing.html: outdated links

I didn't find installing.html in this repo, but here is a short diff fixing outdated URLs in the Linux section:

--- installing.html	2017-11-03 21:41:26.903970995 +0100
+++ installing.html.orig	2017-11-03 21:32:10.464649671 +0100
@@ -158,7 +158,7 @@
 </ul>
 <h2 id="linux">Linux</h2>
 <ul>
-<li><p>First, try your package manager. Pandoc is in the <a href="https://packages.debian.org/pandoc">Debian</a>, <a href="https://packages.ubuntu.com/pandoc">Ubuntu</a>, <a href="https://www.slackbuilds.org/result/?search=pandoc&sv=">Slackware</a>, <a href="https://www.archlinux.org/packages/community/x86_64/pandoc/">Arch</a>, <a href="https://apps.fedoraproject.org/packages/pandoc">Fedora</a>, <a href="https://nixos.org/nixos/packages.html">NiXOS</a>, <a href="https://software.opensuse.org/package/pandoc">openSUSE</a>, and <a href="http://packages.gentoo.org/package/app-text/pandoc">gentoo</a> repositories. Note, however, that versions in the repositories are often old.</p></li>
+<li><p>First, try your package manager. Pandoc is in the <a href="http://packages.debian.org/lenny/pandoc">Debian</a>, <a href="http://www.ubuntu.com">Ubuntu</a>, <a href="http://www.linuxpackages.net/search_view.php?by=name&amp;name=pandoc&amp;ver=">Slackware</a>, <a href="https://www.archlinux.org/packages/community/x86_64/pandoc/">Arch</a>, <a href="https://apps.fedoraproject.org/packages/pandoc">Fedora</a>, <a href="http://nixos.org/nixos/">NiXOS</a>, <a href="https://software.opensuse.org/package/pandoc">openSUSE</a>, and <a href="http://packages.gentoo.org/package/app-text/pandoc">gentoo</a> repositories. Note, however, that versions in the repositories are often old.</p></li>
 <li><p>We provide a binary package for amd64 architecture on the download page. This provides both pandoc and pandoc-citeproc. The executables are statically linked and have no dynamic dependencies. Both a tarball and a deb installer are provided.</p>
 <pre><code>sudo dpkg -i $DEB</code></pre>
 <p>where <code>$DEB</code> is the path to the downloaded deb, will install the <code>pandoc</code> and <code>pandoc-citeproc</code> executables and man pages.</p>

(The openSUSE link also currently gives 404, but has been cached by Google last night, so I guess it's only a temporary problem.)

filters.md: where does Text.Pandoc.JSON come from?

There are a few example filters that use Text.Pandoc.JSON, but it is not mentioned that this module is from pandoc-types.

This throws off people who are not familiar with Haskell, but want to follow along and try writing Pandoc filters.

Perhaps a note or link will help?

Add license

I propose a libre license, such as the CC-BY-SA-4.0-Int-or-later license, be applied to this project.

`Download the latest installer` button downloads arm64 package on Intel Macs

I just got around to updating to the lastest version and discovered that the Download the latest installer for macOS button downloads the latest *-arm64-macOS.pkg on my Intel Mac. I didn't notice until I ran the installer and it failed saying it couldn't be installed on my Mac without further explanation. Then I noticed the file name and figured out what happened. I've since downloaded and installed the latest *-x86_64-macOS.pkg from the Github releases page.

However, I wonder if the Installing Pandoc page on the website can be updated to detect the correct Mac architecture automatically?

*Thanks for the Apple Silicon builds, by the way. One of these days I'll get a new Mac and greatly appreciate it. :)

Make MANUAL's TOC collapsable

I was just thinking about how to split the MANUAL.html into several smaller pages without breaking the links with hashes.

I've an attempt to a solution: use JavaScript to only show the relevant section. For this to work, we need pandoc --section-divs MANUAL.html, then inject the following js at the bottom of the file (maybe put it in collapseTOC.js and rename that file):

(function(){
var defaultSection = 'description';
var sections = jQuery('main > div > section');
var sectionIdents = [];
var toSection = {}; // map from every hash in document to section
var tocItems = jQuery('#toc > ul > li');

sections.each(function(i, el) {
  var sectionIdent = el.getAttribute('id');
  sectionIdents.push(sectionIdent);
  toSection[sectionIdent] = sectionIdent;
  $(el).find('[id]').each(function(i, child) {
    toSection[child.getAttribute('id')] = sectionIdent;
  });
});

sections.each(function(i, el) {
  if (sectionIdents[i-1]) {
    $(el).append('<a href="#' + sectionIdents[i-1] + '">Previous Section</a>');
  }
  if (sectionIdents[i+1]) {
    $(el).append('<a href="#' + sectionIdents[i+1] + '">Next Section</a>');
  }
});

function showOnlyCurrentSection() {
  var targetSection = toSection[location.hash.substr(1)] || defaultSection;
  sections.each(function(i, el) {
    if (el.getAttribute('id') === targetSection) {
      el.style.display = 'block';
    } else {
      el.style.display = 'none';
    }
  });
  tocItems.each(function(i, el) {
    var children = el.children;
    var subSections = children[1];
    if (subSections) {
      if (children[0].getAttribute('href').substr(1) === targetSection) {
        subSections.style.display = 'block';
      } else {
        subSections.style.display = 'none';
      }
    }
  });
}
window.addEventListener('hashchange', showOnlyCurrentSection, false);
showOnlyCurrentSection();
})();

TODO:

  • styling of the next/previous buttons
  • make better sections (roll the synopsis into description, group the Producing slide shows with pandoc, EPUB and Jupiter into one?)

Arguments in "Create a PDF" are in the wrong order

The manual, under the section Creating a PDF states:

To produce a PDF, specify an output file with a .pdf extension:

pandoc test.txt -o test.pdf

AFAICT the arguments are in the wrong order; the input file has to follow all other arguments.

pandoc -o test.pdf test.txt

I stumbled on this because I kept on getting Unexpected newline when doing something similar in a GitHub Action.

Anchor links on header are no more visible

The anchor that were added quite recently (#50) are placed on the left but no more shown now

image

Maybe because there is less room on the left than before (I remember previous version of MANUAL was centered so more room on the left).

Probably some CSS tweaks to do, or place the anchor link on the right after header instead ?

Navigation Menus don't expand without JavaScript

I recently started using NoScript, and I noticed that the subsections on the Pandoc homepage navigation menu (eg links under "Documentation") do not expand without JavaScript enabled. This isn't a real problem for me specifically, but I believe it makes the page difficult to navigate with accessibility tools like screen readers.

I'm not sure about the best way to fix this. Perhaps you could have the subsections expanded by default and use JavaScript to collapse them? Or maybe have a fully-expanded copy of the menu in a noscript block?

@mb21: looks like you worked on the menus recently. Any thoughts on this?

wrong link to uninstall-script for macos

Here you can find instructions on how to install/uninstall pandoc on different operating systems. For macOS, there's a link to a script, which uninstalls pandoc. This link returns a "404 - Not found", the right version can be found here. Can you fix this, please?

Add anchor links to headers

Anchor links next to headers can make it easier and more pleasant to link to certain sections in an HTML document. As an example, GitHub does this by showing a small link next to a heading when hovering.

This could be done with a Lua filter and a little bit of CSS. Untested PoC:

function Header (h)
  if h.identifier ~= '' then
    h.content:insert(1, pandoc.Link({pandoc.Str 'πŸ”—'}, h.identifier), '', {class = 'anchor-link'})
    return h
  end
end
.anchor-link {
  position: relative;
  left: -1em;
  display: hidden;
}

h1:hover > .anchor-link, h2:hover > .anchor-link, h3:hover > .anchor-link {
  display: inline-block;
}

CC @cderv who came up with the idea.

try pandoc: allow back and forth conversion

Hello, someone recommended the "Try Pandoc" site as an easy way to author MediaWiki page in Markdown.

I was curious if it would be possible (or accepted?) to change the page to both directions (as separate buttons), instead of the conversion only going one direction? Thanks.

Detect OS and generate download link

I wrote the following JavaScript to progressively enhance the download link button.

It tries to detect the OS and find the latest pandoc release URL via the GitHub REST API. If the JS fails for some reason, the fallback would be the current button.

Only later did I realize that for:

unauthenticated requests, the rate limit allows for [only] up to 60 requests per hour.

So we would have to construct the download URL when we generate the static site. Possibly with a lua filter?

Hope this is useful..

(function() {
  // from https://stackoverflow.com/a/38241481/214446
  var userAgent = window.navigator.userAgent
    , platform = window.navigator.platform
    , macosPlatforms = ['Macintosh', 'MacIntel']
    , windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE']
    , iosPlatforms = ['iPhone', 'iPad', 'iPod']
    , target = null
    , detected
    ;
  if (macosPlatforms.indexOf(platform) !== -1) {
    detected = 'macOS';
    target = '-macOS.pkg';
  } else if (iosPlatforms.indexOf(platform) !== -1) {
  } else if (windowsPlatforms.indexOf(platform) !== -1) {
    if (userAgent.indexOf("WOW64") !== -1 || userAgent.indexOf("Win64") !== -1){
      // from https://stackoverflow.com/a/6866569/214446
      detected = 'Windows (64-bit)';
      target = '-windows-x86_64.msi';
    } else {
      detected = 'Windows (32-bit)';
      target = '-windows-i386.msi';
    }
  } else if (/Android/.test(userAgent)) {
  } else if (!os && /Linux/.test(platform)) {
    detected = 'Linux (64-bit)';
    target = '-amd64.deb';
  }

  if (target) {
    fetch("https://api.github.com/repos/jgm/pandoc/releases")
    .then(function(data) {
        return data.json();
    })
    .then(function(json) {
      var assets = json[0].assets.filter(function(a){
        return a.name.endsWith(target)
      });
      if (assets[0]) {
        var btn = document.getElementById('download-btn');
        btn.setAttribute('href', assets[0].browser_download_url);
        btn.innerHTML += 'detected ' + detected;
      }
    });
  }
})();

Missing License

I want to use the HTML template from this repository but I could not find a license. What are the terms and conditions if I want to reuse parts of the repository?

Thanks for your time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.