-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from vssio/feature/code-highlight
Feature/code highlight
- Loading branch information
Showing
10 changed files
with
95 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 |
---|---|---|
@@ -1,29 +1,7 @@ | ||
package command | ||
|
||
import ( | ||
"github.com/vssio/go-vss/internal/config" | ||
) | ||
|
||
// Meta contains the common fields required by all commands. | ||
type Meta struct { | ||
Config *config.Config | ||
Version string | ||
Revision string | ||
} | ||
|
||
// SetupConfig initializes the Config field of the Meta struct. | ||
// If the Config field is already initialized, it does nothing. | ||
// NOTE: This method is intended to be called inside a command that requires Config | ||
func (m *Meta) SetupConfig() error { | ||
if m.Config == nil { | ||
var err error | ||
m.Config, err = config.LoadConfig() | ||
if err != nil { | ||
return err | ||
} | ||
m.Config.Dist = "dist" | ||
m.Config.Static = "static" | ||
m.Config.Layouts = "layouts" | ||
} | ||
return nil | ||
} |
This file contains 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 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 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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# Examples | ||
|
||
色々な例を紹介していきます。 | ||
|
||
|
||
## Code Highlight | ||
|
||
```python | ||
def hello(): | ||
print("Hello, World!") | ||
``` |
This file contains 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 |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
<meta name="description" content="{{description}}" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism-atom-dark.min.css"> | ||
</head> | ||
|
||
<body> | ||
|
@@ -39,9 +38,6 @@ | |
{{{contents}}} | ||
</div> | ||
|
||
<!-- Scripts --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/components/prism-core.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/plugins/autoloader/prism-autoloader.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-fbbOQedDUMZZ5KreZpsbe1LCZPVmfTnH7ois6mU1QK+m14rQ1l2bGBq41eYeM/fS" crossorigin="anonymous"></script> | ||
</body> | ||
</html> |
This file contains 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