GithubHelp home page GithubHelp logo

daisy / epubcheck-website Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 1.03 MB

Website with end-user documentation about EPUBCheck

Home Page: https://daisy.github.io/epubcheck-website/

License: MIT License

JavaScript 41.04% CSS 24.65% Shell 3.47% Nunjucks 30.83%

epubcheck-website's Introduction

EPUBCheck Website

Purpose

  • Download EPUBCheck
  • End-user documentation
  • Developer documentation
  • About page with donors section

Site architecture

This is an 11ty project.

  • Build with npm run build
  • Serve the files locally with npm run serve. Browse to localhost:8080.
  • Pretty-format the HTML and CSS output with gulp

Source files are in src. They are typically in markdown or nunjucks format.

Documentation files are in src/docs. The indices for documentation sections live in the corresponding json file, e.g. dev.json or user.json. Each documentation page must have the tag docs (added automatically for the dev and user folders; you need to add it yourself if you add another folder).

Versioning is tracked in versions.json. Add every new version here manually.

Features

Versioned documentation

This site will automatically grab old versions of itself and make those versions available under the "Documentation" page.

A user browsing an older version gets a warning that they are not looking at the most current version.

EPUBCheck code parsing

TBD

About the build process

When you run npm run build, it builds the site twice: once to _site, and once to _site/version/xxx.

It is necessary to build a second copy of the site in a versioned subdirectory, because the links will be different than in the top-level site. We also remove versions.js in this copy, just to reduce confusion, since it should never be called directly (rather, the top-level version should always be used).

Then, in the postbuild step, it zips up the contents of _site/version/xxx and puts it in _site/history. Then the original _site/version/xxx directory is deleted.

Also during postbuild, previous zipped versions of the site are downloaded from the live server (or localhost if you're testing), inflated, and served up in a _site/version/xxx subdirectory.

The zipped archives are also served up under _site/history, along with the current version's zip, because future builds of the site will need them.

Continuous integration

With Travis: either set TRAVIS_TAG manually to be the version number, or use a GitHub tagged release to set it automatically.

Settings

Environment variables

  • DOCSSITE_VERSION: The version, auto-populated from $TRAVIS_TAG
  • DOCSSITE_WRITE_VERSION: Write to a special version-number subdirectory. Set automatically.
  • DOCSSITE_HISTORY_URL: The URL to download history zipfiles from, e.g. http://example.com/mysite/history
  • DOCSSITE_ROOT_SUBDIR: The base subdirectory for the site, e.g. for http://example.com/mysite, the value should be mysite.
  • URL: The complete URL for the website.

Data files

site.json
  • title: Title of the site
  • docsSubdir: This is a magic string that will always be meaningful across versions as the home of the documentation section (even if it just redirects to elsewhere).

Do not use beginning or ending slashes with this property.

versions.json

Array of all versions to date.

githubReleases.js

Gets the latest EPUBCheck release from GitHub and makes the download info for it available to page templates.

env.js

Environment variables, made available to page templates.

epubcheck-website's People

Contributors

gregoriopellegrino avatar marisademeglio avatar rdeltour avatar

Watchers

 avatar  avatar  avatar  avatar

epubcheck-website's Issues

Add a page "Getting help" for users?

I think it might be useful: some users who are not used to the command line might have problems and not know who to ask. We could suggest asking #eprdctn or opening an issue on GitHub.

Cache GitHub release

Right now, the GitHub release data is retrieved from the GitHub API each time the site is built. This quickly runs into rate limits. We could possibly cache the information for use when the API fails.

Automatic version tracking?

There was an experiment to add TRAVIS_TAG to versions.json, so that the versions would not have to be tracked manually.

What this experiment didn't cover was having Travis recommit this file to the repo after the prebuild process changes it.

Ask the EPUBCheck team what they prefer - to configure it manually or have CI in charge of modifying a file and committing changes to the main repo.

Online URL

Hi,
is the website already online? In case what is the URL?

Thanks,
Gregorio

What process could we use?

On my side I would have written the part on the installation guide (issue #7 ), but what process do we use to consider it closed?

Do I ask you for validation? Or do I close it myself and then we'll see it all at the end?

Consider renaming environment variables

... to whatever the EPUBCheck team would prefer. At the moment, several of them are prefixed with DOCSSITE_ as they relate to the versioned documentation feature. Not sure if they prefer verbosity or terseness.

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.