bbc / morty-docs Goto Github PK
View Code? Open in Web Editor NEWGenerate a static website from markdown files
License: Apache License 2.0
Generate a static website from markdown files
License: Apache License 2.0
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
cc @niklasR
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.
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):
To Reproduce
See failing unit test on mixed-dated-files-ordering-issue branch.
Expected behaviour
One or both of:
Also worth considering whether the current behaviour should be configurable, rather than always on.
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:
npm ci
npm start
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
Describe the bug
/
, e.g. [my text](/some/path/to/file.md)
links to the path provided relative to the root of the repository.morty
)morty-docs
currently does not support setting a top-level prefix when generating the HTML and so these links are broken.broxy
using morty
but are fine when viewed in GitHubTo Reproduce
Steps to reproduce the behaviour:
morty
)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?
Since Travis will no longer build OSS, move to GitHub actions instead.
Is your feature request related to a problem? Please describe.
Markdown tables not rendered correctly:
Usually get rendered in github to:
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.
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.
Describe the bug
Internal links try to open as .md
rather than .html
files.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
The new markdown file link opens as a .html
document.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
60ch
units (falling back to approx ~ 33em
units if that's not supported)h1
headings and Reith Sans for the rest of the textI would be happy to submit a PR for this change if the project maintainers are OK with it.
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!
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
index.md
file in their repositoryindex.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
Describe the bug
File/folder structures are not correctly generated, resulting in incorrect paths & broken links
To Reproduce
Steps to reproduce the behavior:
default-md-files
, so the structure looks like:default-md-files
|- README.md
|- docs
|- ADRs
|- ADR-001-navigation-overrides.md
|- ...
|- handle-key-event.png
...
npm start
for morty-docsExpected behavior
The ADRs listed here should be listed inside the ADRs
index
Expected behavior
The link generated should be localhost:8080/docs/ADRs/ADR-001-navigation-overrides.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.