Skip to content

Commit a4d090a

Browse files
committed
Merge branch 'master' into develop
2 parents 5d82f4f + 5768111 commit a4d090a

File tree

5 files changed

+33
-8
lines changed

5 files changed

+33
-8
lines changed

_elastic/indexer.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from elasticsearch import Elasticsearch, RequestsHttpConnection
77
from elasticsearch.helpers import bulk
88
from requests_aws4auth import AWS4Auth
9+
from bs4 import BeautifulSoup
910

1011

1112
def build_documents(version, build_folder):
@@ -22,8 +23,15 @@ def build_documents(version, build_folder):
2223
slug = data["current_page_name"] + ".html"
2324
parent_title = data["parents"][0]["title"] if data["parents"] else ""
2425
html = data["body"]
26+
soup = BeautifulSoup(html, 'html.parser')
27+
h1_elements = [a.get_text().replace("¶", "") for a in soup.find_all("h1")]
28+
h2_elements = [a.get_text().replace("¶", "") for a in soup.find_all("h2")]
29+
h3_elements = [a.get_text().replace("¶", "") for a in soup.find_all("h3")]
30+
plain_text = soup.get_text()
31+
2532
element = {"version": version, "title": title, "parent_title": parent_title,
26-
"slug": slug, "html": html}
33+
"slug": slug, "html": html, "h1": h1_elements, "h2": h2_elements,
34+
"h3": h3_elements, "plain": plain_text}
2735
yield element
2836

2937

@@ -74,7 +82,11 @@ def create_index(self):
7482
"title" : { "type" : "text" },
7583
"parent_title" : { "type" : "text" },
7684
"version": {"type": "text"},
77-
"url" : { "type" : "text" }
85+
"url" : { "type" : "text" },
86+
"h1" : { "type" : "text" },
87+
"h2" : { "type" : "text" },
88+
"h3" : { "type" : "text" },
89+
"plain" : { "type" : "text" }
7890
}
7991
}
8092
}

_themes/conan/static/css/search.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ input{
6969
margin-bottom: 2px;
7070
margin-left: 40px;
7171
width: 20%;
72-
display: inline-block;
72+
display: inline-table;
7373
border-right: 1px solid #CCCCCC;
7474
text-align: right;
7575
padding-right: 20px;
@@ -83,10 +83,10 @@ input{
8383
font-size: 0.9em;
8484
margin-bottom: 2px;
8585
margin-left: 20px;
86-
width: 65%;
87-
display: inline-block;
86+
display: inline-table;
8887
color: #222222;
8988
vertical-align: top;
89+
width: 60%;
9090
}
9191

9292
#search{

integrations/build_system/cmake/cmake_find_package_multi_generator.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ Usage
2727
$ conan install . -g cmake_find_package_multi -s build_type=Release
2828
2929
These commands will generate several files for each dependency in your graph, including a ``XXXConfig.cmake`` that can be located
30-
by the CMake `find_package(XXX) <https://cmake.org/cmake/help/v3.0/command/find_package.html>`_ command, with XXX as the package name.
30+
by the CMake `find_package(XXX CONFIG) <https://cmake.org/cmake/help/v3.0/command/find_package.html>`_ command, with XXX as the package name.
31+
32+
.. important::
33+
34+
Add the ``CONFIG`` option to ``find_package`` so that *module mode* is explicitly skipped by CMake. This helps to
35+
solve issues when there is for example a ``FindXXXX.cmake`` file in CMake's default modules directory that could be loaded instead of the
36+
``XXXXConfig.cmake`` generated by Conan.
3137

3238
The name of the files follows the pattern ``<package_name>Config.cmake``. So for the ``zlib/1.2.11@conan/stable`` package,
3339
a ``zlibConfig.cmake`` file will be generated.

reference/generators/cmake_find_package_multi.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ is declared like this:
5959
6060
The targets are also transitive. So, if your project depends on a packages ``A`` and ``B``, and at the same time
6161
``A`` depends on ``C``, the ``A`` target will contain automatically the properties of the ``C`` dependency, so
62-
in your `CMakeLists.txt` file you only need to ``find_package(A)`` and ``find_package(B)``.
62+
in your `CMakeLists.txt` file you only need to ``find_package(A CONFIG)`` and ``find_package(B CONFIG)``.
63+
64+
.. important::
65+
66+
Add the ``CONFIG`` option to ``find_package`` so that *module mode* is explicitly skipped by CMake.
67+
This helps to solve issues when there is for example a ``FindXXXX.cmake`` file in CMake's default modules directory
68+
that could be loaded instead of the ``XXXXConfig.cmake`` generated by Conan.
6369

6470
You also need to adjust `CMAKE_PREFIX_PATH <https://cmake.org/cmake/help/v3.0/variable/CMAKE_PREFIX_PATH.html>`_ and
6571
`CMAKE_MODULE_PATH <https://cmake.org/cmake/help/v3.0/variable/CMAKE_MODULE_PATH.html>`_ so CMake can locate all

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ sphinxcontrib-spelling
33
elasticsearch>=6.0.0,<7.0.0
44
boto3
55
requests
6-
requests-aws4auth
6+
requests-aws4auth
7+
beautifulsoup4

0 commit comments

Comments
 (0)