GithubHelp home page GithubHelp logo

morty-docs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

morty-docs's Issues

Directories in indexes are not in any order

Describe the bug๐Ÿž
When the index produced by morty-docs contains directories these are presented in a random order.

Expected behavior ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป
Directories should be ordered the same way as files

Screenshots ๐Ÿ“ท
Screenshot 2020-07-20 at 17 15 01

cc @niklasR

Morty makes use of third-party hosted resources

A Morty page loads:

https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
https://use.fontawesome.com/releases/v5.8.1/css/all.css

These are third-party resources distributing sites, with which the BBC does not have H&H approved, or any control over the content of. Since these are CSS it's relatively low risk, but it could be possible for a malicious actor (potentially with legitimate access to these hosting endpoints), to change the resources at the URLs, or to leak some information about the referrer through access logs.

I'd suggest this could be fixed along with #38.

Date ordering behaviour - unhandled edge cases

Describe the bug
There are unhandled edge cases around Morty's date ordering behaviour (if files are prefixed with a date in the format YYYY-MM-DD, they are sorted as most recent at the top):

  • Only supports this particular date format. Is this correct? A mixture of date formats will prevent the sorting from working correctly.
  • A mix of dated and non-dated files can result in dated files not being grouped together, depending on ordering of files.

To Reproduce
See failing unit test on mixed-dated-files-ordering-issue branch.

Expected behaviour
One or both of:

  • More date formats should be supported
  • Dated files should be grouped together

Also worth considering whether the current behaviour should be configurable, rather than always on.

Running locally requires node 12

Describe the bug
Morty-docs will not run locally when using a node version < 12

When running npm start the following appears in the logs

error TypeError: dirPaths.flat is not a function
    at getDirectoryPaths (/path/to/morty-docs/build/src/helpers/get-directory-paths.js:16:31)
    at generateIndexes (/path/to/morty-docs/build/src/generate-indexes.js:32:23)
    at transform (/path/to/morty-docs/build/src/transform.js:26:21)
    at mortyDocs (/path/to/morty-docs/run.js:12:17)

To Reproduce
Steps to reproduce the behavior:

  1. On a system using node 10
  2. Run npm ci
  3. Then run npm start
  4. See error

Expected behavior
I expect the documentation to tell me node 12 is required

Additional context
It may be worth updating package.json to explitily state node 12 (or above) is required via

"engines" : { "node" : ">=0.12" },
"engineStrict" : true

Links from repository root are incorrect when website is hosted with a prefix

Describe the bug

  • In GitHub Flavoured MarkDown, a link starting with /, e.g. [my text](/some/path/to/file.md) links to the path provided relative to the root of the repository.
  • Sites are often hosted with a top-level prefix (e.g. sites hosted on morty)
  • morty-docs currently does not support setting a top-level prefix when generating the HTML and so these links are broken.
  • For example, the links at the top of this document are broken when hosted on broxy using morty but are fine when viewed in GitHub

To Reproduce
Steps to reproduce the behaviour:

  1. Create a link relative to the root of the repository in a markdown file
  2. Convert to HTML
  3. Host on a site with a top-level prefix (e.g. morty)
  4. See the broken links

Expected behaviour
Support should be available to add a top-level prefix to MarkDown links starting with /.

Additional context
Is this a bug or a missing feature?

Markdown Table Support

Is your feature request related to a problem? Please describe.
Markdown tables not rendered correctly:

For example, currently:
Screenshot 2020-01-15 at 10 03 11

Usually get rendered in github to:

Screenshot 2020-01-15 at 10 04 03

Describe the solution you'd like

Mark down tables rendered as HTML tables when published via morty-docs.

Additional context

We use lots of tables in our documentation; this would be an improvement on multiple pages.

Include links to websites built using morty-docs as a way of introducing the reader to what morty-docs does

Is your feature request related to a problem? Please describe.
I'd love to give Morty-Docs a try, but I'd be more willing to invest the time if I had a sample Morty-Doc-generated website to view (and perhaps even the source Markdown files)

Describe the solution you'd like
A clear and concise description of what you want to happen.

Additional context
Add any other context or screenshots about the feature request here.

Local links broken - .md rather than .html files attempt to open

Describe the bug
Internal links try to open as .md rather than .html files.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to a Morty Doc with internal links
  2. Click on one of the links

Expected behaviour
The new markdown file link opens as a .html document.

Updating the styles to improve legibility and use BBC Reith typefaces

Is your feature request related to a problem? Please describe.

  • The body text is a bit small and the line spacing is a bit tight
  • The width of the body is quite wide, so lines of text are quite long, but research shows roughly 60 characters per line is the best for readability.
  • It would be nice to add the BBC Reith typefaces

Describe the solution you'd like

  • Update the font styles to match GEL guidelines around font styles, which should improve legibility and the reading experience
  • Give the body a max-width of 60ch units (falling back to approx ~ 33em units if that's not supported)
  • Use black text for headings
  • Use Reith Serif for h1 headings and Reith Sans for the rest of the text

I would be happy to submit a PR for this change if the project maintainers are OK with it.

Explanation of the name

Could the readme have a brief line explanation of where the name comes from? If I see a project with a name unrelated to what it does, I always like to know! I'm probably just nosey!

Enable viewing other documents in the same directory / directory navigation

Is your feature request related to a problem? Please describe.
When deep linking into documents published by Morty one hits a dead end.
For example if I browse a fascincating ADR published by a team
https://broxy.tools.bbc.co.uk/morty-docs/web/architecture/adr-046-content-direction.html

There isn't an obvious way in the page to navigate to view the other ADR's in that directory without munging the URL by hand. It reduces the opportunity to learn once ones interest has been piqued!

Describe the solution you'd like
A link to the companion index page whenever one is present
Example from above (hand crafted by guessing!)
https://broxy.tools.bbc.co.uk/morty-docs/web/architecture/index.html

Don't override existing index files

Problem

  • All index files are generated automatically, even if the user has supplied an index.md file in their repository
  • This prevents users from defining their own top-level landing page / controlling the end-user's navigation through the site

Solution

  • If an index.html file has already been created for a given folder, don't override it with a generated one.

e.g. Ideally this page: https://broxy.tools.bbc.co.uk/morty-docs/fabl/ would actually look like this: https://broxy.tools.bbc.co.uk/morty-docs/fabl/README.html

File listing is incorrect

Describe the bug
File/folder structures are not correctly generated, resulting in incorrect paths & broken links

To Reproduce
Steps to reproduce the behavior:

  1. Clone this repo
  2. Clone lrud and place the markdown files inside default-md-files, so the structure looks like:
default-md-files
  |- README.md
  |- docs
      |- ADRs
        |- ADR-001-navigation-overrides.md
        |- ...
      |- handle-key-event.png
      ...
  1. run npm start for morty-docs
  2. navigate to the local website, and see that the links generated are not how the file/folder structure looks

Screenshot
Screenshot 2019-11-14 at 09 22 42

Expected behavior
The ADRs listed here should be listed inside the ADRs index

Screenshot
Screenshot 2019-11-14 at 09 23 13

Expected behavior
The link generated should be localhost:8080/docs/ADRs/ADR-001-navigation-overrides.html

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.