This website is a clone of the Keras website.
The following changes have been made from the official Keras website:
- Multilingual support
- Dark mode support
- Documentation errors fixed
This site can run locally as a Docker container.
The image build is performed only once. Or, if the content is updated, it is executed.
$ docker build -t keras_site_image .
$ docker run -d --name keras_site -p 8080:80 keras_site_image
Open http://localhost:8080
.
Once the container is created with the above command, you can stop or start the container.
$ docker start keras_site_local # Start the container
$ docker stop keras_site_local # Stop the container
$ docker rm keras_site_local # Delete the container
If you delete the container, you will need to recreate it.
- Keras: https://keras.io
- Import official documentation
- Hugo: https://gohugo.io/
- Web server
- Hextra: https://imfing.github.io/hextra/
- Hugo-based documentation support plugin
VSCode runs on a Docker container based on devcontainer.json
.
- Press Command + Shift + P
- Select install extension from location
- Install the extension from this location:
/workspaces/keras_kr_doc/paste-extension/
- In the file, do
Insert Markdown Output
[`keras.callbacks.Callback`](/api/callbacks/base_callback#callback-class)
Change this link to:
[`keras.callbacks.Callback`]({{< relref "/docs/api/callbacks/base_callback#callback-class" >}})
Apply the regex as follows:
- Find:
\((\/[^\)]+)\)
- Replace:
({{< relref "/docs$1" >}})
[`keras.callbacks.Callback`](https://keras.io/api/callbacks/base_callback#callback-class)
[`tf.data.Dataset`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset)
Change these links to: (Do not change links other than keras.io.)
[`keras.callbacks.Callback`]({{< relref "/docs/api/callbacks/base_callback#callback-class" >}})
[`tf.data.Dataset`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset)
The regular expression is applied as follows.
- Find:
\[([^\]]+)\]\(https:\/\/keras\.io(\/[^\)]+)\)
- Replace:
[$1]({{< relref "/docs$2" >}})
[\[source\]](https://github.com/keras-team/keras/tree/v3.6.0/keras/src/backend/tensorflow/trainer.py#L555)
Change this link to the following:
{{< keras/source link="https://github.com/keras-team/keras/tree/v3.6.0/keras/src/backend/tensorflow/trainer.py#L555" >}}
The regular expression is applied as follows:
- Find:
\[\\\[source\\\]\]\((.+?)\)
- Replace:
{{< keras/source link="$1" >}}