Softlion.NotionSharp.TemplateProjects 1.0.10

Install the template (it will download from nuget automatically):
     > dotnet new -i Softlion.NotionSharp.TemplateProjects
     
     Get help on parameters for this template:
     > dotnet new blazorblog --help
     
     -p|--page       Title of a page on Notion which contains all the pages of the blog
                     string - Required

     -k|--key        value of the notion tokenV2 cookie
                     string - Optional
                     Default: __YourNotionKey__

     -b|--browserId  value of the notion browserId cookie
                     Guid - Optional
                     Default: __YourNotionBrowserId__

     -us|--userId    value of the notion userId cookie
                     Guid - Optional
                     Default: __YourNotionUserId__
     
     Create a new website in the current folder, using this template:
     > dotnet new blazorblog --page "My Public Blog" --key xxXxxXXxxXxxxXXxxx...xxXxxX --browserId aabbccdd-aabb-aabb-aabb-aabbccddaabb --userId eeffeeff-eeff-eeff-eeff-eeffeeffeeff
     
     You can also use this simple command:
     > dotnet new blazorblog --page "My Public Blog"
     
     But if you do so, you should add the values as user secrets (remember that secrets work in debug mode only):
     > dotnet user-secrets init
     > dotnet user-secrets set "Notion:Key" "xxXxxXXxxXxxxXXxxx...xxXxxX"
     > dotnet user-secrets set "Notion:BrowserId" "aabbccdd-aabb-aabb-aabb-aabbccddaabb"
     > dotnet user-secrets set "Notion:UserId" "eeffeeff-eeff-eeff-eeff-eeffeeffeeff"
     > dotnet user-secrets set "Notion:CmsPageTitle" "Public blog"
 
     To uninstall this template:
     > dotnet new -u Softlion.NotionSharp.TemplateProject.Blog
     
     To list all installed templates and get uninstall instructions:
     > dotnet new --uninstall --help

     To build a docker image of the blazor blog and test it:
     right clic the project, clic Publish then choose Docker.
     Or use these commands:
     > docker build -t yourdockerhub.com/demonotionblog:1.0.0 .
     > docker run -p8080:5000 yourdockerhub.com/demonotionblog:1.0.0
     > start http://localhost:8080/
     Don't forget to set up your notion keys in appsettings.Production.json before, as user secrets are not used in Release mode.
     Note: the prebuilt docker image vapolia/demonotionblog:latest is made for helm and is missing the appsettings-secrets.Production.json file.

     To push the blog to a kubernetes cluster:
     > helm upgrade demonotionblog helm\notionsharpblog --install -f your-value.yaml --dry-run
     > start http://localhost:5080/
     Check helm\notionsharpblog\values.yaml for the available values.

     Example of a simple your-values.yaml file suitable for minikube:

         appSettingsSecrets:
           appsettings-secrets.Production.json: |-
             {
               "Notion": {
                 "Key": "aabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd",
                 "BrowserId": "aabbccdd-aabb-aabb-aabb-aabbccddaabb",
                 "UserId": "eeffeeff-eeff-eeff-eeff-eeffeeffeeff",
                 "CmsPageTitle": "My Blog"
               }
             }

         #For minikube only
         service:
           type: LoadBalancer
           port: 5080

dotnet new --install Softlion.NotionSharp.TemplateProjects::1.0.10
This package contains a .NET Core Template Package you can call from the shell/command line.

Release Notes

1.0.10 upgrade libraries. better styles.
     1.0.9 better styles
     1.0.8 helm: force image pull.
     1.0.7 fix incorrect helm ingress. Set page title.
     1.0.6 the blog title is now the root notion's page title
     1.0.5 remove link to SDK
     1.0.4 styles now match Notion's
     1.0.0 initial version

  • .NETStandard 2.1

    • No dependencies.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.10 49 6/15/2020
1.0.9 155 6/14/2020
1.0.8 73 6/11/2020
1.0.7 76 6/11/2020
1.0.6 41 6/10/2020
1.0.5 80 6/10/2020
1.0.4 87 6/10/2020
1.0.3 47 6/10/2020
1.0.2 54 6/10/2020
1.0.0 91 5/27/2020