-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate robolectric.org to use MkDocs #212
Conversation
overrides/blog-post.html
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is exactly the same as in MkDocs Material, except for the following section:
robolectric.github.io/overrides/blog-post.html
Lines 155 to 187 in dfd8caf
<!-- START Robolectric modification --> | |
<!-- Share post --> | |
<ul class="md-post__meta md-nav__list"> | |
<li class="md-nav__item md-nav__item--section"> | |
<div class="md-post__title"> | |
<span class="md-ellipsis"> | |
Share | |
</span> | |
</div> | |
<nav class="md-nav"> | |
<ul class="md-nav__list md-typeset"> | |
<li class="md-nav__item"> | |
<div class="md-nav__link"> | |
{% include ".icons/fontawesome/brands/x-twitter.svg" %} | |
<span class="md-ellipsis"> | |
<a href="https://x.com/intent/tweet?text={{ page.title }}&url={{ config.site_url }}{{ page.url }}&via=robolectric" rel="nofollow" target="_blank" title="Share on X">Share on X</a> | |
</span> | |
</div> | |
</li> | |
<li class="md-nav__item"> | |
<div class="md-nav__link"> | |
{% include ".icons/fontawesome/brands/facebook.svg" %} | |
<span class="md-ellipsis"> | |
<a href="https://facebook.com/sharer.php?u={{ config.site_url }}{{ page.url }}" rel="nofollow" target="_blank" title="Share on Facebook">Share on Facebook</a> | |
</span> | |
</div> | |
</li> | |
</ul> | |
</nav> | |
</li> | |
</ul> | |
<!-- END Robolectric modification --> |
@MGaetan89 Thanks. It looks aswsooooooome. @hoisie Please take a look at current status from above link. I like this one very much. |
@MGaetan89 I changed the base branch for you. And I will merge it to dev branch after a detail reviewing. |
As requested in robolectric#212 (comment), I've extracted the changes that turn the links to the Javadoc into relative links in a dedicated PR.
As requested in #212 (comment), I've extracted the changes that turn the links to the Javadoc into relative links in a dedicated PR.
@MGaetan89 Maybe we can merge it to dev branch now? |
I want to use squash to merge this PR. |
Sure, you can go ahead and merge it 👍🏻 |
@MGaetan89 Please continue it with javadoc directory movement. |
* Update Robolectric website * Update MkDocs and MkDocs Material * Fix javadoc URLs * Continue deploying from the `new_website` branch until ready to merge * Fix anchor in `device-configuration.md` * Disable the footer feature * Automatically create excerpt for blog posts * Update mkdocs-material
This PR removes the custom CSS linked in the generated Javadoc Jar. That CSS file is no longer available since the new website: robolectric/robolectric.github.io#212 This closes robolectric/robolectric.github.io#276
This PR removes the custom CSS linked in the generated Javadoc Jar. That CSS file is no longer available since the new website: robolectric/robolectric.github.io#212 This closes robolectric/robolectric.github.io#276
This PR removes the custom CSS linked in the generated Javadoc Jar. That CSS file is no longer available since the new website: robolectric/robolectric.github.io#212 This closes robolectric/robolectric.github.io#276
Description
The goal of this PR is to migrate robolectric.org from the current HTML5 Up template to MkDocs.
This allows us to not have to maintain HTML pages and related assets (CSS/JS), by delegating that to MkDocs, unless some specific customisation in the layout is necessary.
Unless I've missed something, the link to each page remains the same as with the current website. So there shouldn't be any broken link from external tools.
You can see what the new website looks like here.
New website features
Maintainer changes
Changes made
_includes
,_layouts
,_sass
,assets
andimages
folders, as their contents are now managed by MkDocs.docs/blog/posts
folder.Maintaining the new website
Configuration
The configuration of the new website is in the
mkdocs.yml
file. This file is similar to the previous_config.yml
file for Jekyll.From there, you can customise the website metadata, theme, plugins, navigation, ...
You can find all the available options in the documentation.
Adding pages
To add a new page, create a new Markdown file in the
docs
folder. By default, it will not show up anywhere in the navigation, but you will be able to add links to it as follow[my link](my_new_page.md)
.To add it to the navigation, edit the
nav
section in themkdocs.yml
file.You can use the front-matter bloc at the beginning of your Markdown file to customise the layout of the page. For example:
Adding a blog post
To add a new post, create a new Markdown file in the
docs/blog/posts
folder. On the list of posts, only the title and first paragraph will be displayed.Here a sample post that you can reuse:
Things to look out for
#7FC06B
for the brand colour on the website (extracted from the logo). Let me know if it should be something else.docs/blog/.authors.yml
. Please make sure that the information I've put there are correct.docs/images/robolectric-stacked.png
. Maybe someone else should have a go at it?Helpful links