
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
lander
Advanced tools
HTML landing page generator for LSST PDF documentation deployed from Git to LSST the Docs.
Lander
.. image:: https://img.shields.io/pypi/v/lander.svg :target: https://pypi.python.org/pypi/lander :alt: Python Package Index .. image:: https://img.shields.io/travis/lsst-sqre/lander.svg :target: https://travis-ci.org/lsst-sqre/lander :alt: Travis CI build status
HTML landing page generator for LSST PDF documentation deployed from Git to LSST the Docs.
Lander works with Python 3.5 or above. You can install it from PyPI::
pip install lander
Run lander -h for command line help.
To create a landing page website, run lander with the local PDF file's path::
lander --pdf
The built PDF landing page site is available, by default, from the _build directory.
View the site in a browser by running a Python web server::
cd _build && python -m http.server 8000 --bind 127.0.0.1
With the --lsstdoc <tex path> argument, Lander will attempt to scrape metadata from the source of a lsstdoc-class LaTeX file, including:
See https://lsst-texmf.lsst.io for information about the lsstdoc class.
If you're running on Travis CI, set the --env=travis to get metadata from Travis's environment variables:
$TRAVIS_COMMIT$TRAVIS_BRANCH$TRAVIS_TAG$TRAVIS_REPO_SLUG$TRAVIS_JOB_NUMBERLander tries to get as much metadata from the environment as possible (including from the Git repository and the LaTeX document itself), but sometimes this isn't possible.
In this case you can explicitly set metadata with these flags (see lander -h for more information):
--abstract--authors (see note)--title--handle (such as LDM-151)--repo-url (such as https://github.com/lsst/ldm-151)--repo-branch (such as master)--date (such as 2017-05-22)--docushare-url (prefer the multi-version form, https://ls.st/ldm-151*)--authors should be a JSON-formatted array, even for a single author.
For example::
--authors "["First Author", "Second Author"]"
To include ancillary files with the main PDF document, provide their file paths with the --extra-download argument.
These extra files are listed in the Downloads section of the landing page.
The main PDF is always included first in this list.
For example::
--extra-download demo.ipynb
Lander works well with LSST the Docs. Lander can upload pages directly to LSST the Docs for you with these configurations:
--upload — provide this flag to indicate a build should be uploaded.--ltd-product — Name of the product on LSST the Docs.--keeper-url or $LTD_KEEPER_URL.--keeper-user or $LTD_KEEPER_USER.--keeper-password or $LTD_KEEPER_PASSWORD.--aws-id or $LTD_AWS_ID.--aws-secret or $LTD_AWS_SECRET.Note: these are advanced configurations and are typically added to a CI configuration automatically or by a Documentation Engineer.
Reach out to #square-docs-support <https://rubin-obs.slack.com/messages/C07QK9N14BY/>_ on Slack for help.
You need both Python 3.5+ and node.js_ to develop Lander.
Clone and install dependencies (use a Python virtual environment of your choice)::
git clone https://github.com/lsst-sqre/lander cd lander npm install -g gulp-cli npm install gulp assets pip install -e ".[dev]"
We use pytest for unit testing and style checks::
make pytest
You can also run end-to-end trials of landing page builds::
make test
These integration tests clone real LSST documents, compiles them with Docker, and builds landing pages to simulate continuous delivery workflows in production.
Look for sites in _tests.
The default gulp_ workflow creates website assets and generates a test website::
gulp
This gulp task runs a browsersync_ server and refreshes the page whenever CSS, JavaScript, or HTML assets change.
If you want to only build CSS, icon, and JavaScript assets, run this task::
gulp assets --env=deploy
This is how assets are built on CI for releases of Lander.
Lander uses squared_ for visual design. All Lander CSS should be committed to the squared_ repo so that LSST SQuaRE web projects share a common visual language.
To make it easier to write Sass in squared_ while developing landing pages in Lander, we recommend linking a clone of squared_ to Lander's node_modules.
Assuming you're starting from the lander/ root directory::
git clone https://github.com/lsst-sqre/squared ../squared npm link ../squared
Some patterns:
If you're working on a branch in squared_, then update squared's version in package.json to that branch.
For example: "squared": "lsst-sqre/squared#tickets/DM-10503".
This allows Travis to install the development version of squared_ when testing Lander.
Remember to make a release of squared_ before releasing a new version of Lander, see below.
scss/app.scss in the lander repo imports Sass partials from squared_ and other packages (including inuitcss_).
package.json with the released version of squared_.
Using tagged npm releases is preferred to GitHub branches to make builds of releases repeatable.git tag -s 0.1.0 -m "v0.1.0". Use the PEP 440_ schema.git push --tags. This will automatically create a Lander release on PyPI.This project is open sourced under the MIT license.
See LICENSE <./LICENSE>_ for details.
.. _squared: https://github.com/lsst-sqre/squared
.. _PEP 440: https://www.python.org/dev/peps/pep-0440/
.. _inuitcss: https://github.com/inuitcss/inuitcss
.. _browsersync: https://browsersync.io
.. _gulp: http://gulpjs.com
.. _node.js: https://nodejs.org/en/
########## Change Log ##########
Generate meta tags and microdata consistent with the Technote project <https://technote.lsst.io/user-guide/metadata.html>__:
These changes improve compatibility for Ook to ingest Lander landing pages.
--date argument.pkg_resources for some environments.pydantic<2.0.0.--version mode, regardless of whether it was set on the command-line or not.This is the first release of Lander! The version 1 release line is based on the 0.1 releases, and this line will continue to be maintained for existing users of Lander.
A new version of Lander is under development, version 2.0, that will include a plugin interface for adding custom document parsers and website themes.
lsst-projectmeta-kit to 0.3.5 for better author parsing.requests to 2.20.0 (security).$TRAVIS_BUILD_WEB_URL to get a URL to the build.
This is better than computing the build URL during the travis-ci.org to travis-ci.com transition.setuptools_scm for version string management.\input and \include commands in TeX source.lsst-projectmeta-kit 0.3.1 for more reliable metadata.jsonld generation (works around pandoc issues converting some documents to plain text).
There's a new integration test make dmtn070 that demos this.make pytest to run pytest with the correct arguments instead of using --add-opts in setup.cfg. This lets us run pytest directly with ad hoc arguments.make test to run both pytest and the integration tests.metadata.jsonld document alongside the landing page content (e.g., index.html).
This content can be ingested by other tools into the LSST Projectmeta database.LsstLatexDoc object.docushare.lsstcorp.org to docushare.lsst.org.
This ensures that ls.st short links can continue to be verified.abstract_plain and title_plain.
This fixes cases where the abstract is not set in the underlying LaTeX document.DM-12569 <https://jira.lsstcorp.org/browse/DM-12569>_).LsstLatexDoc.revision_datetime to obtain the date of a document.
This method uses a combination of parsing the \date LaTeX command, looking at content
Git commits, and falling back to 'now' to get an appropriate timestamp.DM-11821 <https://jira.lsstcorp.org/browse/DM-11821>_)\input and \include) and macros (\def and \newcommand).master and lsstdraft is not present in a lsstdoc document's options.skip_cleanup: true to .travis.yml to prevent CSS and JS assets from bring cleaned up before creating a release.TRAVIS_PULL_REQUEST environment variable) and if so, abort the page build and upload.
This is to prevent duplicate uploads from both branch and PR-based Travis jobs.metasrc>=0.1.1,<0.2.remove_comments and remove_trailing_whitespace feature from metasrc.
This improves the accuracy of metadata extraction from tex source.
For example, comment characters won't appear in extract abstract content.Initial version.
PDFObject <https://pdfobject.com>_.tex source (more work on this is needed).
Otherwise, it gets data from environment variables (including Travis CI variables).
Finally, metadata can be specified explicitly with command line arguments.MIT License
Copyright (c) 2017 Association of Universities for Research in Astronomy, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
HTML landing page generator for LSST PDF documentation deployed from Git to LSST the Docs.
We found that lander demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.