-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Search: index from html files for mkdocs projects #7208
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
readthedocs/search/tests/data/mkdocs/in/gitbook/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
<!DOCTYPE html> | ||
|
||
<!-- | ||
Gitbook them https://gitlab.com/lramage/mkdocs-gitbook-theme | ||
From https://lramage.gitlab.io/mkdocs-gitbook-theme/ | ||
--> | ||
|
||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> | ||
<title>Mkdocs - GitBook Theme - Mkdocs - GitBook Theme</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
|
||
<meta name="generator" content="mkdocs-1.1.2, mkdocs-gitbook-1.0.7"> | ||
|
||
<link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon"> | ||
<meta name="HandheldFriendly" content="true"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | ||
<meta rel="next" href="" /> | ||
<link href="./css/style.min.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<div class="book"> | ||
<div class="book-summary"> | ||
|
||
<nav role="navigation"> | ||
<ul class="summary"> | ||
<li> | ||
<a href="." target="_blank" class="custom-link">Mkdocs - GitBook Theme</a> | ||
</li> | ||
<li class="divider"></li> | ||
<li class="chapter active" data-path=""> | ||
<a href=".">Mkdocs - GitBook Theme</a> | ||
<li class="header">Post</li> | ||
|
||
<li> | ||
<a href="post/2015-10-30/" class="">Oldest Post</a> | ||
</li> | ||
|
||
<li> | ||
<a href="post/2018-12-31/" class="">Older Post</a> | ||
</li> | ||
|
||
<li> | ||
<a href="post/2019-01-02/" class="">Latest Post</a> | ||
</li> | ||
|
||
<li class="divider"></li> | ||
|
||
|
||
|
||
<li><a href="http://www.mkdocs.org"> | ||
Published with MkDocs | ||
</a></li> | ||
|
||
<li><a href="https://github.com/GitbookIO/theme-default"> | ||
Theme by GitBook | ||
</a></li> | ||
</ul> | ||
|
||
</nav> | ||
|
||
</div> <!-- end of book-summary --> | ||
|
||
<div class="book-body"> | ||
<div class="body-inner"> | ||
<div class="book-header" role="navigation"> | ||
|
||
<!-- Title --> | ||
<h1> | ||
<i class="fa fa-circle-o-notch fa-spin"></i> | ||
<a href="." ></a> | ||
</h1> | ||
|
||
</div> <!-- end of book-header --> | ||
|
||
<div class="page-wrapper" tabindex="-1" role="main"> | ||
<div class="page-inner"> | ||
|
||
<section class="normal markdown-section"> | ||
|
||
<h1 id="mkdocs-gitbook-theme">Mkdocs - GitBook Theme</h1> | ||
<p><a href="LICENSE"><img alt="Apache 2.0 License" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg?style=flat-square" /></a> | ||
<a href="https://pypi.python.org/pypi/mkdocs-gitbook"><img alt="PyPI" src="https://img.shields.io/pypi/v/mkdocs-gitbook.svg?style=flat-square" /></a></p> | ||
<h2 id="installation">Installation</h2> | ||
<p>First, install the package via PyPI:</p> | ||
<pre><code class="sh">pip install mkdocs-gitbook | ||
</code></pre> | ||
|
||
<p>Then include the theme in your <code>mkdocs.yml</code> file:</p> | ||
<pre><code class="yaml">theme: | ||
name: gitbook | ||
</code></pre> | ||
|
||
<h2 id="motivation">Motivation</h2> | ||
<p>Gitbook was a static-site generator written in JavaScript.</p> | ||
<p>Mkdocs is a static-site generator written in Python.</p> | ||
<p><strong>Gitbook is <a href="https://docs.gitbook.com/v2-changes/important-differences#cli-toolchain">no longer a static-site generator</a>, <a href="https://docs.gitbook.com/v2-changes/important-differences#git-hosting-and-integration">nor does it use git</a>, nor is it <a href="https://www.gnu.org/philosophy/free-sw.html">free</a> or <a href="https://opensource.org/osd">open source</a>!</strong></p> | ||
<h2 id="screenshot">Screenshot</h2> | ||
<p><a href="https://gitlab.com/lramage/mkdocs-gitbook-theme"><img src="img/screenshot.png" alt="Default theme for GitBook for Mkdocs"></a></p> | ||
<h2 id="license">License</h2> | ||
<p>SPDX-License-Identifier: <a href="https://spdx.org/licenses/Apache-2.0">Apache-2.0</a></p> | ||
|
||
|
||
</section> | ||
|
||
</div> <!-- end of page-inner --> | ||
</div> <!-- end of page-wrapper --> | ||
|
||
</div> <!-- end of body-inner --> | ||
|
||
</div> <!-- end of book-body --> | ||
<script src="./js/main.js"></script> | ||
<script src="./js/gitbook.min.js"></script> | ||
<script src="./js/theme.min.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is definitely part of the complexity that an "only HTML" parser runs into. We're definitely going to end up parsing random navigation and other content on pages, just because we're relying on heuristics instead of the tool telling us what the exact main content is.
I don't think we can avoid that, but definitely a downside of generic HTML parsing.
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.
yeah, that's why I want just to write a guide for authors of theme/static site generators. That would also make their site to be better indexed by search engines and work better with screen readers.