mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
Integrate handling of translation tag into static html building, add default description to translate tags
This commit is contained in:
parent
ed648074f2
commit
30a8ff329a
4 changed files with 61 additions and 14 deletions
|
@ -20,7 +20,7 @@ module.exports = function translatePlugin(babel) {
|
|||
}
|
||||
/* assume translate element only has one child which is the text */
|
||||
const text = path.node.children[0].value.trim();
|
||||
let description;
|
||||
let description = "no description given";
|
||||
const attributes = path.node.openingElement.attributes;
|
||||
for (let i = 0; i < attributes.length; i++) {
|
||||
if (attributes[i].name.name === "desc") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue