Skip to content

Commit

Permalink
💡 Fix link errors in the docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrikerMan committed Jun 18, 2020
1 parent 68d7bab commit 8e9e1e3
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
Binary file added docs/_static/fonts/RobotoSlab/roboto-slab.eot
Binary file not shown.
7 changes: 4 additions & 3 deletions docs/conf.py
Expand Up @@ -139,7 +139,7 @@ def update_markdown_content(folder: str):
with open(file, 'r') as original:
content = original.read()
with open(file, 'w') as new:
new_content = content.replace('.md)', '.html)')
new_content = content.replace('.md)', ')')
new.write(new_content)


Expand Down Expand Up @@ -183,10 +183,11 @@ def setup(app):
# Change readme to rst file, and include in Sphinx index
with open(rst_readme, 'w') as f:
md_content = open(original_readme, 'r').read()
md_content = md_content.replace('(./docs/', '(./')
md_content = md_content.replace('(./docs/', '(../')
md_content = md_content.replace('(./examples/',
'(https://github.com/BrikerMan/Kashgari/blob/v2-trunk/examples/')
md_content = md_content.replace('.md)', '.html)')
md_content = md_content.replace('index.md)', ')')
md_content = md_content.replace('.md)', ')')
f.write(convert(md_content))
print(f'Saved RST file to {rst_readme}')

Expand Down
2 changes: 1 addition & 1 deletion docs/embeddings/bert-embedding.rst
Expand Up @@ -6,7 +6,7 @@ Bert Embedding



BertEmbedding is a simple wrapped class of `Transformer Embedding </embeddings/transformer-embedding.html>`_. If you need load other kind of transformer based language model, please use the `Transformer Embedding </embeddings/transformer-embedding.html>`_.
BertEmbedding is a simple wrapped class of `Transformer Embedding <../transformer-embedding>`_. If you need load other kind of transformer based language model, please use the `Transformer Embedding <../transformer-embedding>`_.

.. note::
When using pre-trained embedding, remember to use same tokenize tool with the embedding model, this will allow to access the full power of the embedding
Expand Down
2 changes: 1 addition & 1 deletion docs/embeddings/index.rst
Expand Up @@ -21,7 +21,7 @@ Kashgari provides several embeddings for language representation. Embedding laye

All embedding classes inherit from the ``Embedding`` class and implement the ``embed()`` to embed your input sequence and ``embed_model`` property which you need to build you own Model. By providing the ``embed()`` function and ``embed_model`` property, Kashgari hides the the complexity of different language embedding from users, all you need to care is which language embedding you need.

You could check out the Embedding API here: `link <../api/embeddings>`_
You could check out the Embedding API document `here <../apis/embeddings/>`_

Quick start
-----------
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions scripts/docs-lint.sh
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e

docker run --rm -it -u $(id -u):$(id -g) -v "$PWD/_site":/mnt linkchecker/linkchecker index.html
2 changes: 1 addition & 1 deletion scripts/docs-live.sh
Expand Up @@ -2,6 +2,6 @@

echo "Build and Run API documents"

sh scripts/docs.sh
sh scripts/docs-generate.sh

python3 -m http.server --directory _site

0 comments on commit 8e9e1e3

Please sign in to comment.